baslangic = 1 while True: with open("dosya.txt", "a") as f: f.write(str(baslangic) + "\n") baslangic += 1