String interpolation: Difference between revisions

Content deleted Content added
{{header|REXX}}: added the REXX language. -- ~~~~
Python: new string formatting
Line 107:
apples = 4
print "I have %d apples" % apples
# or in newer versions:
print "I have {} apples".format(apples)
print "I have {a} apples".format(a=apples)
</source>