Number 1 to 100

This python script will just produce a number ranging from 1 to 100 and it will save the result to a text file named "python1to100.txt". Even you don't create the text file from the terminal, this python script will create the file containing the numbers.

I actually used this script in "Tryhackme - Burpsuite: Intruder" since there is a challenge that needs a bunch of number from 1 to 100.

number = 0 

with open("python1to100.txt","w") as file:
	for i in range(100):
		number = number + 1
		file.write(str(number) + "\n")
		print(number)

Last updated