Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pt = [{'min': 1.158, 'max': 1.150, 'id': 269097, 'to': 1532003820, 'from': 1532003760, 'check': 1.15852, 'no_check': 1.15822, 'volume': 0},{'min': 1.1, 'max': 1.17, 'id': 269098, 'to': 1532003880, 'from': 1532003820, 'check': 1.158615, 'nocheck': 1.158515, 'volume': 0}]
- y = [item[0] for item in pt]
- z = [item[0] for item in pt]
- print(y)
- print(z)
- File "test_YourM.py", line 19, in <module>
- y = [item[0][0] for item in pt]
- File "test_YourM.py", line 19, in <listcomp>
- y = [item[0][0] for item in pt]
- KeyError: 0
Add Comment
Please, Sign In to add comment