s1 = 'Hello'
s2 = 'Python'

f'{s1} {s2}'#fast,f-string

s1 + ' ' + s2

' '.join(s1, s2)

'%s %s' % (s1, s2)

'{} {}'.format(s1, s2)

Template('$s1 $s2').substitute(s1=s1, s2=s2)#low

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2021-07-13
相关资源
相似解决方案