Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Blatant Assignment Help

Name: Anonymous 2009-04-03 3:40

hey /prog/

I'm having some trouble with my python assignment and was wondering if you could offer some help.

The bit i am having trouble with is i have to read a bunch of names from a text file that have values after them and sort them out.

the file looks like this

steve A6 A3 A1
kevin A2 A6
nikki A1 A5 A4

what I'm trying to is sort them into nested lists (dictionaries?) or a better way if you know of one.

eg. list(0) = steve
     steve(1) = A3
     list(2(2) = A5
      etc.

but I have no idea how to go about it, I've got functions to read the files char by char or by line, and then split them at '\n' but I don't know the best way to actually sort them.

thanks for your help.

Name: Anonymous 2009-04-03 4:41

>>8

oh god, i'm glad I gave up trying to learn whatever variant of c/c++/c# that is.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List