#Python includes several different ways to sort things. One handy way to sort is to use the built-in `sorted()` function!
Let's learn about that today!
#python_builtins_by_driscollis
π§΅ππ
Let's learn about that today!
#python_builtins_by_driscollis
π§΅ππ
This last example shows how to sort a list of tuples. You can use the optional `key` parameter to sort by different items within the tuple using a `lambda`
In this case, you sort by student age!
Note: This example comes from the Python docs: docs.python.org
In this case, you sort by student age!
Note: This example comes from the Python docs: docs.python.org
Thanks for learning about how to use Python's `sorted()` function with me.
Follow me for more great tips on #Python!
Follow me for more great tips on #Python!
Loading suggestions...