Python 格式化输出字符串

字符串输出

print('hello world')

name = 'tom'

print('我的名字是%s' % name)

print(f'我的名字是{name}')

猜你喜欢

转载自www.cnblogs.com/LIjunqiang/p/13162908.html