Tag: function

Python Programming Tutorial for Beginners – Part 5 – String concatenation
Tech Tips

Python Programming Tutorial for Beginners – Part 5 – String concatenation

String Concatenation String Concatenation is adding, joining or putting 2 or more strings together. In python, we do this with the plus sign or addition operator. Let's experiment a bit - but first let us create a new file called geezam_python_strings.py and inside that file lets type what I have copied on screen here or just follow me as I go a = "Geezam" b = "python" c = "for" d = "beginners" e = " " words = a + b+ c + d print(words) From the result, we can see we joined the string variables a,b,c and d together into the variable d. The output doesn't look so good so let's add some spaces using the e variable which is literally just a string that is a space. niceWords = a + e + b + e + c + e + d print(niceWords) The strings that we concatenate don't even need to be within a v...