how to sort a list in python with if

Solutions on MaxInterview for how to sort a list in python with if by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "how to sort a list in python with if"
Roberto
12 Sep 2017
1a = [1, 1, 2, 3, 5, 8, 13, 3, 34, 55, 89]
2print([aa for aa in a if aa <5])