Führt Python eine variable Interpolation ähnlich wie "string # {var}" in Ruby durch?

In Python, es ist mühsam zu schreiben:

print "foo is" + bar + '.'

Kann ich etwas tun, wie dieses in Python?

print "foo is #{bar}."

InformationsquelleAutor der Frage mko | 2012-08-03

Schreibe einen Kommentar