Python program to How to Use File ReadLine Method

text = []
fp = open("Add Your File path here Read-Text.php")
data = []
i = fp.readline()
while i != '':
 data.append(i)
 i = fp.readline()
fp.close()
print(data)

 

 

 

Output:

Python beginners - ProgramPython beginners - Program

     

 

Subscribe For Daily Updates

100+ Python Pattern Examplespython pattern examples - star patterns, number patterns