Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Lists Disemvowel

how do you start?

I have started using a try block. And then attempted a for loop, but do not know how to proceed using either.

1 Answer

Steven Parker
Steven Parker
231,269 Points

You won't need "try" for this problem. But the loop is a good idea!

The most popular solutions to this tend to use one of two approaches:

  • convert the string to a list, modify the list with the "remove" list method, and re-assemble it
  • modify the string directly using the "replace" string method

The built-in "help" can be useful for looking up syntax details.