World's Best AI Learning Platform with profoundly Demanding Certification Programs
Designed by IITian's, only for AI Learners.
Download our e-book of Introduction To Python
4 (4,001 Ratings)
218 Learners
Vishal Mohite
5 months ago
FileName = ("path\poem.txt")
data=file(FileName).readlines()
for i in range(len(data)):
print data[i]
Summer is here.
Sky is bright.
Birds are gone.
Nests are empty.
Where is Rain?
FileName = ("path\poem.txt")
data=file(FileName).readlines()
data.sort()
for i in range(len(data)):
print data[i]
Birds are gone.
Nests are empty.
Sky is bright.
Summer is here.
Where is Rain?