Create a for loop that prompts the user for a habby 3 times,then appends each one to habbies.
habbies = []
for item in range(3):
habby = raw_input("Enter a habby:")
habbies.append(habby)
habbies = [] 是系统生成码,运行了之后,说我habbies没定义,habbies =[]就是定义habbies为一个空列表,困扰了几天。
最后怎么解决的?
把系统生成码删掉,我又重新写一遍一模一样的,竟然是这样解决的