hi I am trying this code but cannot get it to work properly. It comes up with invalid syntax. Please can someone suggest something.
Thanks in advance
def USB():
import os
letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
letternumber = 0
while letternumber < 26:
letter = letters[letternumber]
filepath = (letter':\\Python')
true = os.path.exists(filepath)
if true == True:
os.mkdir(letter':\\Python\Folder')
letter = 30
elif true == False:
letternumber = letternumber + 1
USB()
Thanks in advance
def USB():
import os
letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
letternumber = 0
while letternumber < 26:
letter = letters[letternumber]
filepath = (letter':\\Python')
true = os.path.exists(filepath)
if true == True:
os.mkdir(letter':\\Python\Folder')
letter = 30
elif true == False:
letternumber = letternumber + 1
USB()