So in python I'm trying to access a file path in the order of 000X
So I start by setting a string to
path = '0001' and then point to and open the file path
filepath = open('/home/pi/Pictures' + path + '.JPG', 'rb') so I do my business and now want to access the next file of extension 0002
intpath = int(path) intpath = intpath + 1 path = str(intpath) I'm sure this is inefficient, but I'm starting out. Unfortunately, this makes path '2' and not '0002'....any idea how I can maintain the leading zeros?