concat string with variable python code example
Example 1: python concatenate strings
print “{0} {1} is {2} years old.” format(fname, lname, age)
Example 2: combine two strings python
>>> 'a' + 'b' + 'c'
'abc'
print “{0} {1} is {2} years old.” format(fname, lname, age)
>>> 'a' + 'b' + 'c'
'abc'