Random u's in my list output?


#1

I know this is going to be something simple, but the following code (with raw input being 'crush', 'kill', 'destroy') produces the output [u'crush', u'kill', u'destroy'] in the viewer.

hobbies = []

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

print hobbies

Where are these u's coming from because I'm beyond confused.

Interestingly enough when I use str() on the raw input the u's disappear, though I thought raw input was a string automatically


#2

@rubyjumper19934,
What you should be aware of is that in the course you are running Python version

import sys
print (sys.version)
2.7.3 (default, Jun 22 2015, 19:33:41) 
[GCC 4.6.3]

google search
python why random u with raw_input site:stackoverflow.com
http://stackoverflow.com/questions/19064321/cannot-understand-why-the-letter-u-prefixes-my-output-of-the-raw-input

python raw_input vs input site:stackoverflow.com
http://stackoverflow.com/questions/4915361/whats-the-difference-between-raw-input-and-input-in-python3-x

python getting the version site:stackoverflow.com
http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script