First time I've asked for help so please bear with me...
***Brain Freeze***
OK
Supposed to open a txt file. Assuming the txt file is formated properly. The file is a what I am assuming a list of names and ages. I created my own file...
kick me 989
bodybody 344
Santa Clause 0943
Bart Simpson 100
As Is 2856
Supposed to sort by the ages.
I will put the code i have in already.
def main():
infile = open('people.txt', 'r')
names = infile.readlines()
infile.close()
print names[0:1]
temp = names[0:1]
print temp
for item in temp:
item.split(' ')
print item
main()
Was trying to test this out but I kept messing up the indexing or listing.
Someone mentioned import string so Im going to try that.
I don't know how these boards work so Im crossing my fingers.
Also can someone show me how to encase my code ;)