[email protected] wrote:
Hi there
I am a student and is new to python. I would like to know how to exact a value
from a list that has been opened from a text file in python.
Exactly the same way that you would get a value from any other list.
>>> my_list = [10, 20, 30, 40, 50]
>>> print my_list[2] # get a value from the list
30
Don't forget that Python starts counting from 0, not 1.
Does this answer your question? If not, you will need to be more
specific about what you are trying to do.
--
Steven
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor