2024-04-19 18:03:23 发布
网友
if '.' not in filename: if not os.path.exists("shortcut"): os.mkdir("shortcut") shutil.copy(filename,"shortcut") **this row is line 70** os.remove(filename) print("shortcut don")
这是我的代码,我在运行代码时在下面的图片中遇到了这个错误
如果您有一个字符串,则只需在以下位置执行关键字:
strval = './test' if '.' not in strval: print('this won\'t happen') else: print('there was a period in the string')
如果您使用的是其他类型/函数,那么它应该具有类似的功能
如果您有一个字符串,则只需在以下位置执行关键字:
如果您使用的是其他类型/函数,那么它应该具有类似的功能
相关问题 更多 >
编程相关推荐