1. [‘A’,’B’,’C’]
2. [‘B’,’C’,’A’]
3. [5,7,9]
4. [9,5,7]
[‘A’,’B’,’C’]
1. Dictionary comprehension doesn’t exist
2. {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6:36}
3. {0: 0, 1: 1, 4: 4, 9: 9, 16: 16, 25: 25}
4. {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
1. Syntax error
2. {1:”check”,2:”check”,3:”check”}
3. “check”
4. {1:None,2:None,3:None}
{1:”check”,2:”check”,3:”check”}
1. { }
2. False
3. True
4. An exception is thrown
True
1. Returns True if any key of the dictionary is true
2. Returns False if dictionary is empty
3. Returns True if all keys of the dictionary are true
4. Method any() doesn’t exist for dictionary
Returns True if any key of the dictionary is true
1. {‘a’: 1, ‘b’: 2, ‘c’: 3}
2. An exception is thrown
3. {‘a’: ‘b’: ‘c’: }
4. {1: ‘a’, 2: ‘b’, 3: ‘c’}
{1: ‘a’, 2: ‘b’, 3: ‘c’}
1. An exception is thrown
2. {0: ‘A0’, 1: ‘A1’, 2: ‘A2’, 3: ‘A3’, 4: ‘A4’}
3. {0: ‘A’, 1: ‘A’, 2: ‘A’, 3: ‘A’, 4: ‘A’}
4. {0: ‘0’, 1: ‘1’, 2: ‘2’, 3: ‘3’, 4: ‘4’}
{0: ‘A0’, 1: ‘A1’, 2: ‘A2’, 3: ‘A3’, 4: ‘A4’}
1. An exception is thrown since the dictionary is empty
2. ‘ ‘
3. 0
4. 1
An exception is thrown since the dictionary is empty
1. 1
2. 0
3. An exception is thrown
4. ‘ ‘
0
1. An exception is thrown since the dictionary is empty
2. ‘ ‘
3. ‘A’
4. 0
‘ ‘