String interpolation: Difference between revisions

Content deleted Content added
Clean-up, added orphan, uncategorised tags using AWB
Invalid python detected!
Line 1:
{{Orphan|date=February 2011}}
 
'''String Interpolation''' is a common feature in many programming languages such as [[Python]], [[Ruby]], [[PHP]], [[Perl]] and etc. It means to insert a string or replace a variable with its value.It makes string formatting and specifying contents more intuitive.<ref>http://perlmeme.org/howtos/using_perl/interpolation.html</ref>
 
== Examples ==
=== Python ===
This is the example in python shell:
<source lang="text">
>>> a, b = 5, 6
>>> print $'a = $a, b = $b'
a = 5, b = 6
</source>
 
=== PHP ===
<source lang="PHP">