World's Best AI Learning Platform with profoundly Demanding Certification Programs
Designed by IITians, only for AI Learners.
Designed by IITians, only for AI Learners.
New to InsideAIML? Create an account
Employer? Create an account
Download our e-book of Introduction To Python
4.5 (1,292 Ratings)
559 Learners
Vishal Mohite
a year 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?