Pythonic——打印输出

Pythonic完美打印方式:

print("Hello %(name)s!" % {'name': 'ChenJun'})

student = {'name': 'Tom', 'age': 15, 'score': 96}
print('Student: %(name)s age: %(age)s' % student)

print("name: {name} age: {age}".format(name='ChenJun', age=100))

你可能感兴趣的:(python)