Appending to list with for loop


The code worked out fine, though when printing the result, in the list they showed 'u' in front of each items like below. Why this is happening and how can I get rid of it ?

result >>>

What is your hobby?: talk
What is your hobby?: play
What is your hobby?: lov
[u'talk', u'play', u'lov']

hobbies = []

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


You've also got square brackets, commas, apostrophes and spaces in there which also are not part of the data. How would you get rid of that? The u's is just one of several things printed in addition to your data. Or what if you wanted to print each one on its own line? Why would it be printing all those things? What would it print instead if not what it currently prints?


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