1. format
def event_log(name, time):
print('Event: {}, happens at {}'.format(name, str(time)))
2. 使用 +
连接符
def event_log(name, time):
print('Event: ' + name + ', happens at ' + str(time))
3. 使用占位符
def event_log(name, time):
print('Event: %s, happens at %s' % (name, str(time)))