Answers for "readline line"

2

readline in a file

myfile = open("demo.txt", "r")
myline = myfile.readline()
while myline:
    print(myline)
    myline = myfile.readline()
myfile.close()
Posted by: Guest on June-24-2021
0

Readline Python

f = open("C:\Users\Andreea Pantus\Desktop\An 2, Semestrul 2\Inteligenta artificiala, machine learning\ai-unibuc-24-22-2021\train.txt", "r")
print(f.readline())
Posted by: Guest on March-26-2021

Python Answers by Framework

Browse Popular Code Answers by Language