def get_drives():
    drives = []
bitmask = windll.kernel32.GetLogicalDrives()
for letter in string.uppercase:
    if bitmask & 1:
        drives.append(letter)
bitmask >>= 1
return drives
if __name__ == '__main__':
    pass
Is there a way to list all the available drive letters in python?