Discuss / Python / 表示的三种方法

表示的三种方法

Topic source

print('%.1f%%' % r)

print('{0:.1f}%'.format(r))

print(f'{r:.1f}%')


  • 1

Reply