Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Hello, working on a simple program but I am at a loss since I am not geting the results that I thought I would get. I am trying to get the user to enter a name and have that name added to the list. But instead of adding the name to the list it is creating a new element for each letter in the name instead of the name it's self. the results look like this printed out.

['mike', 'tom', 'bob', 'l', 'a', 'r', 's']

Here is the code...

name = ["mike", "tom", "bob"]
print name

name_entree = raw_input("Please enter a name: ")
person = name_entree
name += person

print
print name

# I know I covered this in the book but for the life of me I can't seem to find it. Any clarification would be great.

-Lars
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.