csev / py4e

Web site for www.py4e.com and source to the Python 3.0 textbook
http://www.py4e.com
2.88k stars 1.78k forks source link

Chapter 8/exercise 4:sort and print the list of unique words in alphabetical order #374

Closed Tutubaibai1 closed 2 years ago

Tutubaibai1 commented 2 years ago

I'm not 100% sure the wording in the original exercise is the best option. I think if something needs to be "in alphabetical order", (from a user's perspective, not a computer's perspective) we will not expect the difference betwee capitalized words and lowercase words. In this exercise, (in my opinion) it should be: ['already', 'and', 'arise', 'breaks', 'but', 'east', 'envious', 'fair', 'grief', 'is', 'it', 'juliet', 'kill', 'light', 'moon', 'pale', 'sick', 'soft', 'sun', 'the', 'through', 'what', 'who', 'window', 'with', 'yonder'] rather than: ['Arise', 'But', 'It', 'Juliet', 'Who', 'already', 'and', 'breaks', 'east', 'envious', 'fair', 'grief', 'is', 'kill', 'light', 'moon', 'pale', 'sick', 'soft', 'sun', 'the', 'through', 'what', 'window', 'with', 'yonder']

csev commented 2 years ago

Thanks - take a look at https://github.com/csev/py4e/commit/e58705b25760819b4310f25713ce1d0572498bd3 to see if you agree with my fix.

Tutubaibai1 commented 2 years ago

Thank you for the fast and effective fix. The new wording is great!

csev commented 2 years ago

Thanks for a well worded suggestion that made it easy to fix :)