Menu
Coddy logo textTech

Practice #2

Lesson 6 of 9 in Coddy's Python List Comprehension course.

challenge icon

Challenge

Easy

Given a list of tuples of three integers lst.

Create a list comprehension that takes in a list of tuples lst, and returns a new list named new_lst that stores the same tuples if the sum of the integers in the tuple is greater than 20. Also, each tuple in new_lst should be sorted in descending order.

Try it yourself

lst = eval(input())  # Don't change this line

All lessons in Python List Comprehension