import time
a = 0
amount = 1
while a < 100:
userfile = 'random{}'.format(amount)
file = open(userfile, 'a')
amount += 1
time.sleep(0.2)
print(userfile)
a += 1
I've made a program that creates files with a fixed file name. I'm trying to make it so the file name is a randomly generated set of letters but I don't know quite how to apply the random function to it.