Reading characters from a line. : Text File Read « File « Python
- Python
- File
- Text File Read
Reading characters from a line.
print "\nReading characters from a line."
text_file = open("read_it.txt", "r")
print text_file.readline(1)
print text_file.readline(5)
text_file.close()
Related examples in the same category