- 标准输出
python2要这么写
print 'helloworld'
python3.0以后,在print后要加括号
print('helloworld')
- 格式化输出
python2要这么写
def a(x,y):
print("%s : %s" %x,y)
python3.x要这么写
def a(x,y):
print("%s : %s" %(x,y))
python2要这么写
print 'helloworld'
python3.0以后,在print后要加括号
print('helloworld')
python2要这么写
def a(x,y):
print("%s : %s" %x,y)
python3.x要这么写
def a(x,y):
print("%s : %s" %(x,y))