Hi all!
I'm embarrassingly new at Python, so please forgive my probably simple
mistakes.
So I called readlines() on a file, and I'm wondering how I can check the
equality of a specific line with a raw_input set variable as a condition. For
example,
file = open('filename.txt,' 'r')
file.readlines()
variable_name = raw_input()
if file[2] == variable_name:
#whatever
This approach hasn't worked so far, does anyone have any tips? Thanks so much!!
-Tyler
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor