Python 判斷文件夾是否存在,否則創建該文件夾
if not os.path.exists(datatype):
os.makedirs(datatype)
print("目錄創建成功!")
if not os.path.exists(datatype):
os.makedirs(datatype)
print("目錄創建成功!")
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo