How to create a string made of 5 copies of the last two characters another string in Python

1 Answer

0 votes
def create_string(str):
	sub_str = str[-2:]
	return sub_str * 5

s = create_string('Python')

print(s)


  
  
'''
run:
  
ononononon
 
'''

 



answered Sep 1, 2021 by avibootz
...