📅  最后修改于: 2022-03-11 14:45:05.264000             🧑  作者: Mango
os.access('sample.txt', os.W_OK)
#Output False
f = open("sample.txt", "x") # create the file
#check again
os.access('sample.txt', os.W_OK)
#Output True