There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Is the range in alphabetic order? Like if I had [a-d] You could enter “c” and it would work, but if you put “z” it wouldn’t? I would also assume that it would be very similar with numbers
Yes that’s the correct interpretation for using a range in a character class for regular expressions, a single lowercase later from a to d inclusive (a, b, c, d). Python’s guide to this is at the following- https://docs.python.org/3/howto/regex.html#regex-howto
But the same expressions are covered in many places (sometimes in a nicer way if you’re trying to get it sorted quickly).
I don’t understand how to solve the problem using ranges when I can only use 1 range set. [a-c][o-l] doesn’t match anything in the test strings. The interpreter only allows me to use 1 range .
This one is a bit annoying. No idea if its the intended solution or not, but I used ..[bgk]
It feels like this should be done with several ranges but as others have said the interpreter only allows one. If anyone else has another way I’d love to hear it