I executed the following code:
import sys
x=sys.argv[1]
print x;
if x > 1:
print "It's greater than 1"
and here is the output:
C:\Python27>python abc.py 0
0
It's greater than 1
How the hell it’s greater than 1? in fact the if condition should fail, is there any fault with my code?
Because type of
xinx=sys.argv[1]isstr.Output =
<type 'str'>So in python,
Therefore you need