你好,我是悦创。
if not 的理解
l = None # 空 False
# not False >>> True
if not l:
print('ok')
else:
print('No')
print(not False)
原创...大约 1 分钟
你好,我是悦创。
l = None # 空 False
# not False >>> True
if not l:
print('ok')
else:
print('No')
print(not False)
你好,我是悦创。
星号 (*
) 可用于 Python 中的不同情况:
*args
, **kwargs
和关键字参数print(7 * 5)
print(2**4)
# ---output---
35
16