String-like class supporting case-insensitive comparisons
I'd like you to write a
FuzzyString class which acts like a string, but does comparisons in a case-insensitive way.
>>> greeting = FuzzyString('Hey TREY!') >>> greeting == 'hey Trey!' True >>> greeting == 'heyTrey' False >>> greeting 'Hey TREY!'
I'd like you to make sure equality and inequality match case-insensitively at first. I'd also like you to ensure that the string representations of your class match Python's string object's default string representations.
This is just a preview of the problem statement.
This exercise includes 3 bonuses and 9 hint links.
To solve this exercise, sign in to your Python Morsels account.
My name is Trey Hunner and I hold Python trainings for teams. I've spent countless hours refining my most interesting Python exercises into Python Morsels, a Python skill-building platform for folks who already know Python. Python Morsels is design to help you deepen your Python skills every week.
Sign up for Python Morsels to access this exercise and many more.Join Python Morsels ✨