with open("pythonuz.txt", 'w+') as yozish:
yozish.write("1: one\n2: two")
yozish.seek(0) print(yozish.readlines())
So‘rovnoma
- ['1: one\n2: two']
- 1: one
- 2: two
- IndexError