f=open("reeglid.txt", "r"); reegliread=f.readlines() f.close() for nr in range(len(reegliread)): rida=reegliread[nr][:-1] print "{",353+nr,":[",rida,"]},"