guest = []
list = 1
while list != '0':
name = input('Enter the name of one of your guests: ')
guest.append(name)
list = input('if there are no more guests press 0, otherwise press any other key ')
print(' ')
guest.sort()
print guest
"""Whenever I enter user input I get the following error "name '(user input)' is not defined."
While searching for similar questions I found the following code which works on other peoples machines, however it gives me a similar error:"""
shopList = []
maxLengthList = 6
while len(shopList) < maxLengthList:
item = input("Enter your Item to the List: ")
shopList.append(item)
print shopList
print "That's your Shopping List"
print shopList
"""When I enter a list item here I get the following error "name '(user input)' is not defined.
It seems that any time I use the following syntax: x = input('blahblahblah: ')
I get this error, as far as I can tell I am using the correct syntax, I'm not able to understand what this error means or why I am getting it. Any assistance or explanation is greatly appreciated, thanks."""