正如其他编程语言一样,接触python的第一条指令即经典的‘hello world!’
在python3中 在屏幕上输出‘hello world’只需要:
print ('hello world!')
注意 :与python2不同的是多了一对括号 ()
python3 中的数学运算符
print (5 + 3)
输出:
8
此为int整形变量的相加,换做字符串相加即为字符串的拼接
print(‘5’ + ‘3’)
输出:
53
正如其他编程语言一样,接触python的第一条指令即经典的‘hello world!’
在python3中 在屏幕上输出‘hello world’只需要:
print ('hello world!')
注意 :与python2不同的是多了一对括号 ()
python3 中的数学运算符
print (5 + 3)
输出:
8
此为int整形变量的相加,换做字符串相加即为字符串的拼接
print(‘5’ + ‘3’)
输出:
53