U's in my print out of hobbies


#1

Whats going on, why is it doing this?

hobbies = []

for i in range(3):
    hobbies.append(raw_input("What is your hobby? "))

print hobbies


What is your hobby?  puppies
What is your hobby?  fries
What is your hobby?  guys
[u'puppies', u'fries', u'guys']
None


#2

A u prefix denotes the value has type unicode rather than str.

You can think of unicode as a general representation of some text, which can be encoded in many different ways into a sequence of binary data represented via str.


#3

hobbies.append(str(raw_input("What is your hobby? ")))
does work for me :wink: