Python:判断一个字典是否为空

import numpy as np
from collections import OrderedDict

a = np.array([1,2,3,4,5])

b = np.random.choice(a,size=4,replace=False)
print(b)
print(a[[1,2,3]])
c = OrderedDict()
if c:
    print("不空")
else:
    print("空的")

 

你可能感兴趣的:(Python学习)