KnowledgeBoat Logo

Computer Science

Write a program that inputs a string and then prints it equal to number of times its length, e.g.,

Enter string : "eka"
Result ekaekaeka

Python

Python Data Handling

32 Likes

Answer

str = input("Enter string: ")
len = len(str)
opStr = str * len
print("Result", opStr)

Output

Enter string: eka
Result ekaekaeka

Answered By

18 Likes


Related Questions