About 104,000 results
Open links in new tab
  1. How to Repeat a String in Python? - GeeksforGeeks

    Dec 12, 2024 · Using Multiplication operator (*) is the simplest and most efficient way to repeat a string in Python. It directly repeats the string for a specified number of times.

  2. How to repeat individual characters in strings in Python

    Python: def LetterRepeater(times,word) : word1='' for letters in word: word1 += letters * times print(word1) word=input('Write down the word : ') times=int(input('How many times you want to …

  3. Repeat String in Python - W3Schools

    Sometimes we need to repeat the string in the program, and we can do this easily by using the repetition operator in Python. The repetition operator is denoted by a '*' symbol and is useful …

  4. 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 …

  5. How To Repeat A String Multiple Times In Python?

    Jan 29, 2025 · Let us learn some important methods to repeat a string multiple times in Python. Check out How to Split String by Whitespace in Python? Method 1. Use Multiplication …

  6. Python: Repeating Strings

    May 10, 2025 · In Python, repeating strings is a simple and powerful way to handle text. It allows you to create multiple copies of a string without writing repetitive code. String repetition is often …

  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. Demystifying Repeating Strings in Python: A Comprehensive Guide

    By far the easiest way to repeat a string is by multiplying it: When you use the * operator, Python handles repeating and concatenating the string for you under the hood. Some key …

  9. regex for repeating words in a string in Python - Stack Overflow

    May 7, 2025 · I have a good regexp for replacing repeating characters in a string. But now I also need to replace repeating words, three or more word will be replaced by two words.

  10. How to Repeat a String in Python? - phoenixNAP KB

    Aug 8, 2023 · Use the operator on a string to repeat the string a provided number of times. The syntax for the operation is: The code below demonstrates how to repeat the string " Hello, …

Refresh