I am not able to join a string properly.
Here is the code:
def mub(s):
count = 1
for i in range(len(s)):
words = s[i] * count
list_of = list(words)
print('-'.join(list_of),end='')
count+=1
mub('Abcd')
it gives me this as output : ab-bc-c-cd-d-d-d
but my desired output is this: a-bb-ccc-dddd
I think the mistake is after for loop.