python - how to create a program to have an output so it repeats each letter once more as it goes down the word? -
using python how can out out dooggg each letter repeats once more. have tried looks
# program 21 def double(source): pile = "" letter in source: pile = pile+letter+letter print pile print pile
but comes out looking
dd ddoo ddoogg
"".join(l*i i,l in enumerate(my_word,1))
i think should it
Comments
Post a Comment