Ready to get started with anonymous questions today? It's easy! Learn more.
for x in range(0, 10000) file = open('file_' + str(x) + '.txt', 'w') file.write('some text\n') file.close()
file = open('file_0.txt', 'w') for x in range(0, 10000) file.write('some text\n') <magic code to change file location so I don't need to create a new file object> file.close()
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.