In python:
import random
lst = ([])
i = 0
while i < 100:
lst.append(str(random.randint(0,99)))
i += 1
txt = " ".join(lst)
file = input("What file do you want to save your numbers to? ")
try:
f = open(file, 'a')
f.write(txt)
f.close()
except FileNotFoundError:
f = open(file, 'x')
f.close()
new_f = open(file, 'a')
new_f.write(txt)
new_f.close()