Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
brackets denote choosing between a number of characters in regex. in this case, picking one of "a", "e", "i", "o", "u", "A", "E", "I", "O", or "U".
I appreciate that you throroughly tested your solution.
CodeWars is a relatively safe environment for running code, obviously, but relying on an eval/exec call (especially if you're leaving it bare to the user of a function) should always evoke a deep, finger-curling pain.
It's important to note here that True in Python is basically 1, thus when you add two Trues it's coerced to 2, which allows this trick to work.
I think within the confines of the question (notably - indices start at 1), that's not necessarily a problem.