Can you multiply 2 strings in Python?
In fact, you can use Python to multiply strings, which is actually pretty cool when you think about it. You can take a string and double, triple, even quadruple it with only a little bit of Python.
How do you multiply strings in Python?
When you multiply a string by an integer, Python returns a new string. This new string is the original string, repeated X number of times (where X is the value of the integer). In the following example, we’re going to multiply the string ‘hello’ by a few integers. Take note of the results.