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

Making GUI Calculator in Tkinter Python

Unlocking Web Design: A Guide to Mastering CSS Layout Modes