//
C++ Python
NULL None
true True
false False
|| or
&& and
! not
str.size() len(str)
++ += 1
-- -= 1
Python 中可以直接表示二进制数,C++不可以。例如:
print 0b1, #1
print 0b10, #2
print 0b11, #3
print 0b100, #4
print 0b101, #5
print 0b110, #6
print 0b111 #7