I want to create a few folders based on a given range of numbers. For example, I want to create folders 500 through 520. Is there a way to create these folders using the range(500, 520) ?
Am I heading down the right path with this code?
import os
for i in range(500, 520):
os.mkdir(r'C:\Dir' + i)
I know this is wrong since i is an integer, but can someone guide me to the right direction?
Use string formatting: