content = input('请输入内容,该内容被当做字符串处理:')
print(content)
content = eval(input('请输入内容,该内容被当做代码处理:'))
print(content)
name = 'marry'
age = 18
print('我的姓名是:{0},我的年龄是:{1}'.format(name, age))
print('我的姓名是:%s,我的年龄是:%d' % (name, age))
f = open("test.txt", "w")
print("hello word", file=f)
print("hello word", end="")
print("1", "2", "3", sep=",")
print("hello word", flush=True)
grade = 89
print("%10d" % grade)
print("%-10d" % grade)
print("% d" % grade)
m = 5
s = 8
print("%02d:%02d" % (m, s))
f = 43.5
print("%f" % f)
print("%.2f" % f)
print("%o" % 100)
print("%x" % 100)
print("%e" % 1000000000)
print("%E" % 1000000000)
print("%g" % 23)
print("%g" % 23.34)
print("%g" % 12000000000)
print("%c" % 19997)
grade = 89
print("%d%%" % 89)