Skip to content
Advertisement

How do I repeat serial numbers from 000 to 999 in Python [closed]

I want to iterate serial numbers from 000 to 999 in Python and save them to a txt file

JavaScript

How do I start from a specific number and end at a specific number? The numbers start from zero

Each number begins on a new line

For example

JavaScript

Advertisement

Answer

Use f string

JavaScript

output (‘out.txt’)

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement