算术运算符
+ , - , * , / , % , ** , //
a,b = 3,10
print(b / a)
print(b % a)
print(b ** a)
print(b // a)
3.3333333333333335
1
1000
3
字符串运算
字符串可以与字符串相加或与正整数相乘,结果为多个字符串拼接成的新字符串
字符串不可以参与减和除运算
a = '2a'
b = '111'
print(a + b + a)
print(a * 3,b * 2)
# 字符串拼接
I = 'information'
M = 'management'
S = 'system'
specialty = 'information ' + M + ' system'
print(specialty)
specialty = f'information {M} system'
print(specialty)
specialty = 'information {M} system'.format(M=M)
# specialty = 'information {} system'.format(M)
print(specialty)
2a1112a
2a2a2a 111111
information management system
information management system
information management system