$ python -c "print('True' if None < 0 else False)"
True
$ python3 -c "print('True' if None < 0 else False)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: unorderable types: NoneType() < int()
$ python -c "print('True' if None < 0 else False)"
True
$ python3 -c "print('True' if None < 0 else False)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: unorderable types: NoneType() < int()
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:d5403d36d6e18826af9aea65e113de8e6ed33208576c20f8d12b0e5336d9000d" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"None < 0" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 1, | |
"text": [ | |
"True" | |
] | |
} | |
], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |