线路问题
input = input("in or out? ")
.
你重新定义了
input
input("in or out? ")
,所以现在
是一根绳子。
解决办法是简单地改变
结果变量到另一个:
notes =[]
def newNote(notes):
note = input("Whats up")
notes.append(note)
return notes
choice = input("in or out? ")
if (choice == "in"):
newNote(notes)