Yes, it is definitely possible and better to do it that way.
The reason that the numbers are getting displayed is that your code is
appending a counter, which is a number, to
hobbies instead of
appending the user's input to that
list. When the user enters something you are not saving that input.
Here, the purpose of the variable is to serve as counter ...
for hobby in range(3):
You are using the variable
hobby as a counter. Instead, give the variable a name that is more commonly used for a counter, such as
for i in range(3):
In any case, that variable will refer to some counting numbers, and should not be the same variable as what you
Now within the loop, you can get the user's input, save it in the variable
append it to
hobby = raw_input("Your hobby: ")
After the loop ...
The output might not look nice in that format, so you might rather do this ...
for hobby in hobbies:
hobby gets neatly displayed on its own line.