for x in range(10,100):
for y in range(1,10):
if (x%10)>(x/10):
print x
break
for y in range(1,10):
if (x%10)>(x/10):
print x
break
2014-12-21
Python2 里面print可以直接接字符串或者運算。
Python3 里面print變成了一個函數,上面的寫法不支持了,必須用一個括號括起來,否則會報告語法錯誤。
print(45678+0x12fd2)
print("Learn Python in imooc")
print(0xff==255)
Python3 里面print變成了一個函數,上面的寫法不支持了,必須用一個括號括起來,否則會報告語法錯誤。
print(45678+0x12fd2)
print("Learn Python in imooc")
print(0xff==255)
2014-12-18
print r'''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.'''
Whether it's nobler in the mind to suffer.'''
2014-12-18
s = 'Python was started in 1989 by "Guido".\nPython is free and easy to learn.'
print s
print s
2014-12-18