how to add string in python code example
Example 1: how to add text to a string python
word = "hello"
name = "John"
sentence = word += name
Example 2: python concatenate strings
x = ‘apples’
y = ‘lemons’
z = “In the basket are %s and %s” % (x,y)
Example 3: python add strings
var1 = "foo"
var2 = "bar"
var3 = var1 + var2
Example 4: combine two strings python
>>> 'a' + 'b' + 'c'
'abc'