There are always many ways to solve a programming task. In this exercise you will practice to read, understand, and comment on different solutions to a coding challenge, as well as their advantages and disadvantages.
Write a script that sorts a list of tuples based on the number value in the tuple. For example:
unsorted_list = [('first_element', 4), ('second_element', 2), ('third_element', 6)]
sorted_list = [('second_element', 2), ('first_element', 4), ('third_element', 6)]
- Clone this repository!
- Read over all solutions one-by-one
- Create in-line code comments on the GitHub commits
- what is done well?
- what can be improved? (unnecessary code? style? logic? etc.)
- Can you find yet another solution to the task? If so, add it to your repo!