import random f = open("liczby_losowe.txt","w") for x in range(0, 25): f.write(str(random.randint(0,100))+"\n") f.close()