0

I have a string that I split up using the list function. For instance: the word "neighborhood" was split

['n', 'e', 'i', 'g', 'h', 'b', 'o', 'r', 'h', 'o', 'o', 'd']

but now I want to join the letters of 'e', 'i', 'g' together to make 'eighb' and join the letters 'o', 'r', 'h' together to make 'orh' and join the letters 'o', 'o', 'd' together to makes 'ood'

so complete end would equal ['n', 'eighb', 'orh', 'ood']. I wouldn't even know how to start. I am trying to define a word "syllables" and I thought about using a for loop, but I'm not sure that that is the best approach? Any clues on where I could start?

python_newbie
  • 113
  • 1
  • 2
  • 8

0 Answers0