What is string concatenation in Python and how is it used
String concatenation is a way of joining two strings together so that they are next to each other as one string. String concatenation in python is done with the + operator. For example:
“hello” + “world”
The result will be “helloworld”.
Conclusion
This concludes this marketing blog post. Hopefully, these marketing tips have aided you in your own personal endeavors.
Advanced Python Programming Cookbook
Quick & Easy
Advanced Python Programming Cookbook
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

The different ways to append strings in Python
We use two ways to append strings in python. On one hand, we use + operator and on the other hand, we use str.join() . These two ways of joining strings with the + operator and str.join() differ from each other based on what each of these methods does. str.join(sep) will join the string with sep so that you can add it to another string as well. + will add the string that you are joining together to the end of another string.
+ Operator
The most common way of joining strings is to use the + operator.
1. The Join String Operators [to append strings]
The join string operators add new strings to the end of existing strings.
In python, there are several different ways in which we can add or append a new string at the end of an existing string, and we call these joining methods: string concatenation, plus sign operator ( += ), and slice assignment ( *= ).
String Concatenation: Adding or Appendding Python Strings with + Operator
In python, there are several different ways in which we can add or append a new string at the end of an existing string, and we call these joining methods: string concatenation, plus sign operator (+), and slice assignment (*=).
Let’s see how each of these methods work by using them on some examples.
String Concatenation: Adding or Appendding Python Strings with + Operator: List Indexer, (1 to 3) [to append strings]

Examples of string concatenation in Python code
Here are three examples of the above paragraphs. The first one uses str.join() and the second is using + operator. In the last example, we used both of them so that you can understand them clearly . The first example is about joining strings together:
1) [some text] + ” ” + 3 = some text and 3.
2) a() + b() + c() = a(b(c)) [abstract molecule as an example]
3) [some text] * 2 * 5 * 9 * 18 * 27 * 36 * 125 * 235 / 8 = some text and 4.54
The second example is about concatenating strings:
4) “a” + “b” + “c” = a(b(c)) [abstract molecule as an example]
5) [“a”,”b”,”c”] + [“d”,”e”,”f”] = [“a(b(c))”, “d(e(f))”] [abstract molecule as an example]
and lastly, the third example is about concatenating strings with + operator:
6). a + b + c = a(b(c))
7) [“a”,”b”,”c”] + [“d”,”e”,”f”] = [“a(b(c))”, “d(e(f))”] [abstract molecule as an example]
Note that in the third example, “abstract molecule” is an object. For more information on this , see the blog post: [ What is Python List? ]