摘要:
四种方法: # 第一种 os.path.exists(file_path) # 第二种 os.path.isfile(file_path) # 第三种 pathlib模块 # 第四种 os.access(file_path,mode) # 第五种 try+open() 或者with open() 示 阅读全文
posted @ 2021-07-21 13:36
是我菜了
阅读(751)
评论(0)
推荐(0)
摘要:
1. 定义:Assert statements are a convenient way to insert debugging assertions into a program 2.依赖于__debug__变量,默认值为True 当不满足条件返回False 3.使用场景:检查先验条件时使用断言, 阅读全文
posted @ 2021-07-21 11:12
是我菜了
阅读(861)
评论(0)
推荐(0)

浙公网安备 33010602011771号