def print_menu():
print('1. Print phone numbers')
print('2. Add a phone number')
print('3. Remove a phone number')
print('4. Lookup a phone number')
print('5. Quit')
print()
我键入此代码,没有任何反应,它只显示任何内容。我真的不知道代码有什么问题,请有人帮忙!!!
答案 0 :(得分:3)
>>> def print_menu():
... print('1. Print phone numbers')
... print('2. Add a phone number')
... print('3. Remove a phone number')
... print('4. Lookup a phone number')
... print('5. Quit')
... print()
...
>>> print_menu()
1. Print phone numbers
2. Add a phone number
3. Remove a phone number
4. Lookup a phone number
5. Quit
()