Combining and Concatenating Strings in Python

You can concatenate strings in Python easily using the ‘+’ operator and also repeat a string using the ‘*’ operator.

The repeat operator can also take a variable or expression.

You can also combine strings from a Python List into a new string using the join() method.

Surprisingly you can also do the following without the ‘+’ operator. Although I’ld not recommend it as it does not make string concatenation explicit.

You can test your Python code using the online code editor.

Leave a Reply

Your email address will not be published. Required fields are marked *