1test_dict = {}
2
3if not test_dict:
4 print "Dict is Empty"
5
6
7if not bool(test_dict):
8 print "Dict is Empty"
9
10
11if len(test_dict) == 0:
12 print "Dict is Empty"
1>>> keys = [1,2,3,5,6,7]
2>>> {key: None for key in keys}
3{1: None, 2: None, 3: None, 5: None, 6: None, 7: None}
4