About 117,000 results
Open links in new tab
  1. Concatenation (+) and Repetition (*) in Python - codeburst

    Aug 25, 2020 · Sequences datatypes (both mutable and immutable) support a repetition operator * The repetition operator * will make multiple copies of that particular object and combines …

  2. python - Asterisk for multiplication and duplication - Stack Overflow

    Oct 4, 2019 · If you are using * with a string object then it will return you concated string with n times. However, if you use it with numbers then it will work as mathematical multiplication …

  3. Concatenation (+) and Repetition (*) in Python – All About AI-ML

    Aug 25, 2020 · When * is used with an integer it performs multiplication but with list, tuple or strings it performs a repetition. Syntax: a*b. Example 1: Repetition operator on Strings. …

  4. Arithmetic Operators in Python (+, -, *, /, //, %, **) - nkmk note

    May 11, 2025 · Python supports basic arithmetic operations—addition, subtraction, multiplication, division, and exponentiation—for numeric types (int and float). When used with sequences like …

  5. Python String Operations: Concatenation, Multiplication, Indexing

    There’s a lot more to strings than simply printing them out in IDLE. In this tutorial we will cover Python string operations: concatenation, multiplication, indexing and slicing. If you’re just …

  6. Bitwise Operators in Python ... Arithmetic Augmented Assignment Operators Bitwise Augmented Assignment Operators Concatenation and Repetition Operators Concatenation and Repetition …

  7. How to perform string repetition in Python | LabEx

    Learn efficient string repetition techniques in Python, explore multiplication operators, and discover practical methods to duplicate strings with ease and precision.

  8. repetition operator, *. We are accustomed to using the * symbol to represent multiplication, but when the operand on the left side of the * is a list, it becomes the repetition operator. The …

  9. Lesson 2: The Basic Elements > Overloaded operators | Python ...

    According to operator precedence, Python will first execute the expression inside the parenthesis, and so will concatenate the three strings resulting in "i am happy". It will then perform the …

  10. 5 Clever Techniques for Repeating Strings in Python

    We can use the multiplication operator to repeat a string a specific number of times, combine string repetition and slicing to repeat a string to a certain length, use the join () method to …

Refresh