for galaxy in xrange(10):
for system in xrange(499):
os.chdir('E:\Scripts')
os.makedirs(str(galaxy)+'_'+str(system))
os.chdir('E:\Scripts\%s_%s' % (galaxy, system)
outfile = open('%s_%s', 'w') % (galaxy, system)
outfile.write(str(o.galaxy_content(galaxy,system)))
outfile.close()
os.chdir('E:\Scripts')
my problem is the following, when I want to do the concatenation% s_% s to create the folder with os.chdir it creates everything well, my problem is when I want to create a .txt with the name% s_% s since it tells me invalid syntax.