Subash Chandran posted: "data = [("Apples", 5, "20"), ("Pears", 1, "5"), ("Oranges", 6, "10")] data.sort(key=lambda x:x[0]) print(data) OUTPUT [('Apples', 5, '20'), ('Oranges', 6, '10'), ('Pears', 1, '5')] from kite.co"
|
![](https://pixel.wp.com/t.gif?email_name=email_subscription&blog_id=164764788&_ui=206702828&email_id=316836a3f6afb3a25a4a0c396b792ae2&date_sent=2021-10-12&locale=en¤cy=PHP&country_code_signup=PH&domain=zumpdo.wordpress.com&frequency=0&digest=0&has_html=1&_en=wpcom_email_open&browser_type=php-agent&_aua=wpcom-tracks-client-v0.3&_ul=elancelorillatrendlist&_ut=wpcom%3Auser_id&blog_tz=5&blog_lang=en-gb&user_lang=en&_ts=1634014724866)
Subash Chandran posted: "data = [("Apples", 5, "20"), ("Pears", 1, "5"), ("Oranges", 6, "10")] data.sort(key=lambda x:x[0]) print(data) OUTPUT [('Apples', 5, '20'), ('Oranges', 6, '10'), ('Pears', 1, '5')] from kite.co"
|
Write a newfangled code fragment at an earlier stage to use it. Then call another method and make sure their input is the correct one. The s...
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.