大家?guī)兔匆幌?,拜?/h1>
#Enter a code
print 45678+0*12fd2
print 'Learn Python in imooc'
print 100 < 99
print 0*ff ==255
為什么不行?哪里出錯(cuò)了嗎?
#Enter a code
print 45678+0*12fd2
print 'Learn Python in imooc'
print 100 < 99
print 0*ff ==255
為什么不行?哪里出錯(cuò)了嗎?
2015-06-13
print 45678+0*12fd2
* 是乘法運(yùn)算,12fd2 卻不是表示一個(gè)數(shù)字,估計(jì)你要的是?print 45678+0x12fd2,0x12fd2表示一個(gè)以十六進(jìn)制表示的整數(shù)。
同理?print 0*ff ==255,應(yīng)該是?print 0xff ==255,0xff 就是整數(shù) 255 的十六進(jìn)制表示。