1.运算符
2.运算符优先级
3.表达式
length = 5
breadth = 2
area = length * breadth
print 'Area is', area
print 'Perimeter is', 2 * (length + breadth)
输出
$ python expression.py
Area is 10
Perimeter is 14
1.运算符
2.运算符优先级
3.表达式
length = 5
breadth = 2
area = length * breadth
print 'Area is', area
print 'Perimeter is', 2 * (length + breadth)
$ python expression.py
Area is 10
Perimeter is 14