Difference between raw_input and input? (For your hobby - Loops)



I figured out the correct answer to the problem, but I found the change I had to make was using "raw_input" instead of "input". I'm not sure what version of python the integrated console window runs, but I think it has something to do with my experience with the newer version of Python and using "input" as opposed to using "raw_input" that was a part of the older Python 2 version. I believe the issue has something to do with the output each function gives you, raw_input returns a string and input returns something else? Thanks again.

hobbies = []

for i in range(3):
    hobby = raw_input("What is a hobby of yours: ")


Find out what functions do by looking up their documentation (for the right version). Some documentation is available within python itself. You need to do this for just about any function that you use, how else would you figure out how they work?



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