Function in Python that repeats each character in a string twice - Source Code

def repeat(string):
    for item in string:
        print(item * 2, end="")

repeat("rehman")
Python

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

The "content" property in CSS

Guess The Number Game - You vs. Your Friend