進出口完成,它說,過程與退出代碼0結束沒有我restaurant_list或任何後Python腳本不調用主要功能,說過程中使用pycharm退出代碼爲0
def main():
# Make a list of resturaunts the resturaunteur could go to
restaurants_list = ['Mcdonalds', 'BurgerKing', 'Wendys', 'PaneraBread']
print(restaurants_list)
# Remove expensive resturaunt from the list
print('Here are the restaurants in the list')
print(restaurants_list)
# Get the restaurant to change
restaurant = input('Which restaurant to remove?')
# Remove the restauraunt
restaurants_list.remove(restaurant)
#Display the list
print('Here is the revised list')
print(restaurants_list)
if __name__ == "__main__":
main()
你有沒有**叫**'main' ?! – jonrsharpe
如何調用main? –
當我打電話給main時,仍然沒有工作() –