print('%c'%97)# aprint('%c %c %c'%(97,98,99))# a b cprint('%d + %d = %d'%(4,5,9))# 4 + 5 = 9print("我叫 %s 今年 %d 岁!"%('小明',10))# 我叫 小明 今年 10 岁!print('%o'%10)# 12print('%x'%10)# aprint('%X'%10)# Aprint('%f'%27.658)# 27.658000print('%e'%27.658)# 2.765800e+01print('%E'%27.658)# 2.765800E+01print('%g'%27.658)# 27.658
text ="I am %d years old."%22print("I said: %s."% text)# I said: I am 22 years old..print("I said: %r."% text)# I said: 'I am 22 years old.'