How parse nicely a string into three (or more) pieces? See, I have a file which consists of a bunch of lines like

NAME:0001;some text  
ANOTHERNAME:000103;some more text  
NEWNAME:42; blah blah


So what I need to do is to have a list of those names, list of numbers (IDs actually, so the order matters) and list of further comments. I wrote a code, which actually does work, but I'm afraid it's horrible and not pythonic at all.

reactions_file = open("reactions.txt","r")
lines = reactions_file.readlines()
reaction_names = []
reaction_other = []
reaction_IDs = []
reaction_notes = []
for line in lines:
    r_name = line.partition(":")[0]
    r_other = line.partition(":")[2]
    reaction_names.append(r_name)
    reaction_other.append(r_other)
for item in reaction_other:
    r_ID = item.partition(";")[0]
    r_note = item.partition(";")[2]
    reaction_IDs.append(r_ID)
    reaction_notes.append(r_note)
print(reaction_names)
print(reaction_IDs)
print(reaction_notes)
reactions_file.close()


How can it be changed to look less like written by newbie? :)
You can say:

&gt;&gt;&gt; import re
&gt;&gt;&gt; re.split('[:;]', 'NAME:0001;some text')
['NAME', '0001', 'some text']