Feb-05-2018, 08:35 PM
When I hear about something being repeated some number of times, with something joining those items together, I immediately think of a list, and the
str.join
method. Here's the docs for that: >>> help(str.join) Help on method_descriptor: join(...) S.join(iterable) -> str Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.Here's an example usage:
>>> " Spam ".join(["Eggs", "Eggs", "Eggs"]) 'Eggs Spam Eggs Spam Eggs'Hopefully, this will help you continue on your adventure :)