My file contains about 1602 elements like
1ajith
3abhiram
9bijo
2aaliya
etc..
I want to sort it. My desired output is:
1ajith
2aaliya
3abhiram
9bijo
Plz help me with your valuable ideas.
My file contains about 1602 elements like
1ajith
3abhiram
9bijo
2aaliya
etc..
I want to sort it. My desired output is:
1ajith
2aaliya
3abhiram
9bijo
Plz help me with your valuable ideas.
Should be something like this:
ins = open( "file.txt", "r" )
array = []
for line in ins:
array.append( line )
ins.close()
array = sorted(array)
for line in array :
print line