我写了一个函数来返回一个条件为假的字符串,但是每次它返回它时,字符串中都有逗号。我不知道为什么。
key = 0
test_dictionary = {1: 'a', 2: 'b', 3: 'c', 4: 'd'}
def show_value(a, b):
for item in b:
if item == a:
return(b[a])
if key == 0:
return(a, str('is not a valid key'))
狐的传说
暮色呼如
守着一只汪
收到一只叮咚
随时随地看视频慕课网APP
相关分类