text = 'This is my first test.\nThis is the second line.\nThis is the third line.'
my_file = open('my_file.txt', 'r')
content = my_file.readline()
print(content)
'''
This is my first test.
'''
second_read_time = my_file.readline()
print(second_read_time)
'''
This is the second line.
'''
text = 'This is my first test.\nThis is the second line.\nThis is the third line.'
my_file = open('my_file.txt', 'r')
content = my_file.readlines()
print(content)
'''
['This is my first test.\n', 'This is the second line.\n',
'This is the third line\n', 'This is appended file.']
'''
for item in content:
print(item)'''
This is my first test.
This is the second line.
This is the third line.
This is appended file.
'''