小编Cas*_*ste的帖子

有没有Python相当于Ruby的字符串插值?

Ruby示例:

name = "Spongebob Squarepants"
puts "Who lives in a Pineapple under the sea? \n#{name}."
Run Code Online (Sandbox Code Playgroud)

成功的Python字符串连接对我来说似乎很冗长.

python language-comparisons string-interpolation

328
推荐指数
5
解决办法
19万
查看次数