10. For your hobbies


#1


  1. For your hobbies

Code goes through, lesson completes however console prints this:

Tell us your hobbies!: golf
[u'golf']
Tell us your hobbies!: golf
[u'golf', u'golf']
Tell us your hobbies!: golf
[u'golf', u'golf', u'golf']
None

How can I get rid of the parenthesis and also the u? Why is there a u before the string?


Replace this line with your code. 

hobbies = []

# Add your code below!
for i in range(3):
    add = raw_input("Tell us your hobbies!: ")
    hobbies.append(add)
    print hobbies


#2

i had the same output , but if you run your code out of codecademy there is no ā€œuā€ and for parenthesis exist because function return list
in labs repl.it


#3

oh ok thanks. so its just a code academy thing? i was wondering what the problem was! lol


#4

Hello,

It's not a codecademy thing. When you deploy a RAW_INPUT statement then you probably need to define what do you want out of it. Let's say "str", Or "int". Try these and see if you are getting the answer you want. Let me know if you need any other help! :slight_smile:


#5

Try str before raw_input and test the output. Should help :slight_smile:


#7

@bo-hanhuang If you found solution please confirm it so others can have a look at it too. :slight_smile: Have fun coding!


#8

it worked for me thank you!


#9