For your hobbies


#1

https://www.codecademy.com/courses/python-beginner-en-cxMGf/1/2?curriculum_id=4f89dab3d788890003000096


hobbies = []

# Add your code below!
for i in range(3):
    hobbies.append(raw_input("What is your hobbies?"))
print hobbies

Why i get output [u'1', u'2', u'3'] when printing hobbies?(with 1,2,3 entered)
[u'1', u'2', u'3']
What is this "u'1" instead of just "1"?
captain?


#2

the u is from unicode, the data type raw_input uses to store the data, you can use str() to cast unicode into a string


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.