I have multiplied the original string and I want to add a space between them. How can I achieve it?
my_str = 'Data Science' print(my_str * 3)
Output:
Data ScienceData ScienceData Science
Advertisement
Answer
Try join
my_str = 'Data Science' ' '.join([my_str]*3) # -> 'Data Science Data Science Data Science'