Trying to print a Christmas tree using a sentence. Below is my code which does not quite work.
sentence = 'The whole Christmas tree.'
for word in sentence.split():
for i, char in enumerate(word, 1): # Avoid a separate counter
print(9 * " ", 2 * char * i)
desired output:
TT
hhhh
eeeeee
ww
hhhh
oooooo
llllllll
eeeeeeeeee
CC
hhhh
rrrrrr
iiiiiiii
ssssssssss
tttttttttttt
mmmmmmmmmmmmmm
aaaaaaaaaaaaaaaa
ssssssssssssssssss
tt
rrrr
eeeeee
eeeeeeee
..........