I need to repeat a word letter by letter using Python, comparing it to the size of another text.
For example:
ex_text = 'I am an example test text' # 25 characters
ex_word = 'coding'
rep_word = ''
for i in ex_word:
while len(rep_word) < len(ex_text):
rep_word += i
print(rep_word)
I'm trying to print something like:
codingcodingcodingcodingc
PS: Actually, it would be better if the output also consider the white spaces, like: c od in gcoding codi ngco.