String interpolation: Difference between revisions

Content deleted Content added
Python: new string formatting
remove REXX - an example of substitution not interpolation
Tag: section blanking
Line 50:
I have 4 apples
</source>
 
=== REXX ===
<source lang="REXX">
original = "Mary had a X lamb."
 
new = changestr('X', original, "little")
 
say 'original =' original
say 'replaced =' new
</source>
'''output'''
<pre>
original = Mary had a X lamb.
replaced = Mary had a little lamb.
</pre>
 
=== Ruby ===