#coding:utf8
input()
; py2中需要使用raw_input()
range
== py2中的 xrange
, 返回类似迭代器的东西,节省内存空间print()
, exec()
是一个方法,必须加上括号; py2中为print
, exec
eg:
# python3 import hashlib m = hashlib.sha256() m.update(b"Nobody inspects") # python2 import hashlib m = hashlib.md5() m.update("Nobody inspects")
原文:https://www.cnblogs.com/sea-stream/p/11188390.html