def larger_string(str, n):
result = ""
for i in range(n):
result = result + str
return resultprint(larger_string('abc', 2))
print(larger_string('.py', 3))
Output:
abcabc
.py.py.py
def larger_string(str, n):
result = ""
for i in range(n):
result = result + str
return resultprint(larger_string('abc', 2))
print(larger_string('.py', 3))
Output:
abcabc
.py.py.py
List to string conversion in python
Write Hello World Program in Python
Python program for implementation of Bubble Sort
Python program for Armstrong number
Python Program to find the area of triangle
How to add all number in list in python
Write a Python program to display the current date and time
What is Break statement in python
Python Program to display the Fibonacci sequence up to n-th term
Python program to Reversing a list using reversed()
Python code to count the number of occurrences in list
Write a Python program to test whether a number is within 100 of 1000 or 2000