Sorting in Python || Learn Python Programming (Computer Science)

Socratica October 8, 2017
Video Thumbnail
Socratica Logo

Socratica

View Channel

About

Socratica makes high-quality educational videos on ♾️ math 🧪 science 💻 computer programming and more! We're a couple of Caltech grads who believe you deserve better videos. You'll #LearnMore with us. 🦉 Check out our COURSES on our website!

Video Description

𝙎𝙩𝙖𝙮 𝙞𝙣 𝙩𝙝𝙚 𝙡𝙤𝙤𝙥 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: https://snu.socratica.com/python Sorting is a fundamental task in software engineering. In Python, there are a variety of ways to sort lists, tuples, and other objects. Today we talk about the sort() method which is an in-place algorithm for sorting lists. We also cover the sorted() function which can be used on more objects, and creates a sorted copy, leaving the original object unchanged. We were able to make this Python video with the help of our Patrons on Patreon! We would like to recognize the generosity of our VIP Patrons Matt Peters, Andrew Mengede, Martin Stephens, and Markie Ward. Thank you so much for helping us continue our work! To learn Python, start our Python Playlist HERE: http://bit.ly/PythonHelloWorld Subscribe to Socratica: http://bit.ly/1ixuu9W ♦♦♦♦♦♦♦♦♦♦ We recommend: Python Cookbook, Third edition from O’Reilly http://amzn.to/2sCNYlZ The Mythical Man Month - Essays on Software Engineering & Project Management http://amzn.to/2tYdNeP Shop Amazon Used Textbooks - Save up to 90% http://amzn.to/2pllk4B ♦♦♦♦♦♦♦♦♦♦ Ways to support our channel: ► Join our Patreon : https://www.patreon.com/socratica ► Make a one-time PayPal donation: https://www.paypal.me/socratica ► We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9 Thank you! ♦♦♦♦♦♦♦♦♦♦ Connect with us! Facebook: https://www.facebook.com/SocraticaStudios/ Instagram: https://www.instagram.com/SocraticaStudios/ Twitter: https://twitter.com/Socratica ♦♦♦♦♦♦♦♦♦♦ Python instructor: Ulka Simone Mohanty (@ulkam on Twitter) Written & Produced by Michael Harrison (@mlh496 on Twitter) ♦♦♦♦♦♦♦♦♦♦

You May Also Like

Up Your Gaming Setup

AI-recommended products based on this video

Loading...
Dell 15.6" FHD Touchscreen Student and Business Laptop – AMD Ryzen 7 7730U, Radeon Graphics, 16GB DDR4 RAM, 512GB SSD, USB-C, HDMI, SD Card Reader, Wi-Fi 5, Copilot Ready, Windows 11 Pro

Dell 15.6" FHD Touchscreen Student and Business Laptop – AMD Ryzen 7 7730U, Radeon Graphics, 16GB DDR4 RAM, 512GB SSD, USB-C, HDMI, SD Card Reader, Wi-Fi 5, Copilot Ready, Windows 11 Pro

(0)
$829.99
FREE delivery Aug 27 - Sep 3
Loading...
ACEMAGIC 2025 Laptop AMD Ryzen 7 5825U (8C/16T), 15.6“FHD Display,16GB RAM 512GB NVMe SSD, WiFi 6, Numeric Keyboard, Type_C, 54.72Wh Battery | Windows 11 Pro Laptop Computer for Work & Play

ACEMAGIC 2025 Laptop AMD Ryzen 7 5825U (8C/16T), 15.6“FHD Display,16GB RAM 512GB NVMe SSD, WiFi 6, Numeric Keyboard, Type_C, 54.72Wh Battery | Windows 11 Pro Laptop Computer for Work & Play

(17)
$584.99
FREE delivery Mon, Aug 11
Loading...
BOSGAME P3 Lite Mini PC, AMD Ryzen 7 6800H Mini Computer (8C/16T, up to 4.7GHz), 24GB DDR4 1TB M.2 NVMe SSD, Triple Display Desktop Gaming PC, Pre-in Win 11 Pro, Dual LAN, WiFi 6E, BT 5.2

BOSGAME P3 Lite Mini PC, AMD Ryzen 7 6800H Mini Computer (8C/16T, up to 4.7GHz), 24GB DDR4 1TB M.2 NVMe SSD, Triple Display Desktop Gaming PC, Pre-in Win 11 Pro, Dual LAN, WiFi 6E, BT 5.2

(67)
$549.00
FREE delivery Sun, Aug 10
Loading...
BOSGAME M4 Mini PC Oculink, AMD Ryzen 7 8745HS 32GB DDR5 RAM 1TB PCIe4.0 SSD,Radeon 780M Quad Displays,USB4,Dual LAN 2.5GbE LAN Micro Desktop Computer

BOSGAME M4 Mini PC Oculink, AMD Ryzen 7 8745HS 32GB DDR5 RAM 1TB PCIe4.0 SSD,Radeon 780M Quad Displays,USB4,Dual LAN 2.5GbE LAN Micro Desktop Computer

(65)
$859.00
FREE delivery Sun, Aug 10
Loading...
Seasonic Focus V4 GX-1000 (ATX3) - 1000W - 80+ Gold - ATX 3.0 & PCIe 5.1 Ready -Full-Modular -ATX Form Factor -Premium Japanese Capacitor -10 Year Warranty -Nvidia RTX 30/40 Super & AMD GPU Compatible

Seasonic Focus V4 GX-1000 (ATX3) - 1000W - 80+ Gold - ATX 3.0 & PCIe 5.1 Ready -Full-Modular -ATX Form Factor -Premium Japanese Capacitor -10 Year Warranty -Nvidia RTX 30/40 Super & AMD GPU Compatible

(22)
$423.35
FREE delivery Oct 8 - 10
Loading...
GIGABYTE - AORUS Elite 16 Gaming Laptop - 165Hz 2560x1600 WQXGA - NVIDIA GeForce RTX 5070 - Intel Core Ultra 9 275HX - 1TB SSD with 32GB DDR5 RAM - Windows 11 Home AD (AORUS Elite 16 BWHC3USC64SH)

GIGABYTE - AORUS Elite 16 Gaming Laptop - 165Hz 2560x1600 WQXGA - NVIDIA GeForce RTX 5070 - Intel Core Ultra 9 275HX - 1TB SSD with 32GB DDR5 RAM - Windows 11 Home AD (AORUS Elite 16 BWHC3USC64SH)

(0)
$9,050.69
FREE delivery Aug 28 - Sep 8Only 3 left in stock.
Loading...
HP Victus 15.6" 144Hz FHD Gaming Laptop, Intel i5-12450H, 32GB RAM, 1TB PCIe SSD, NVIDIA GeForce RTX 3050, Backlit Keyboard, HD Webcam, Win 11, Blue, 256GB Docking Station Set

HP Victus 15.6" 144Hz FHD Gaming Laptop, Intel i5-12450H, 32GB RAM, 1TB PCIe SSD, NVIDIA GeForce RTX 3050, Backlit Keyboard, HD Webcam, Win 11, Blue, 256GB Docking Station Set

(117)
$1,149.00
FREE delivery Jun 26 - Jul 8
Loading...
Acer Swift X 14" FHD Laptop, AMD Ryzen 7 5825U, NVIDIA GeForce RTX 3050Ti, 16GB RAM, 512GB SSD, Windows 11 Home

Acer Swift X 14" FHD Laptop, AMD Ryzen 7 5825U, NVIDIA GeForce RTX 3050Ti, 16GB RAM, 512GB SSD, Windows 11 Home

(247)
$1,804.11
Loading...
Corsair Vengeance LPX 32GB (2 X 16GB) DDR4 3200 (PC4-25600) C16 1.35V Desktop Memory - Black
Best Seller

Corsair Vengeance LPX 32GB (2 X 16GB) DDR4 3200 (PC4-25600) C16 1.35V Desktop Memory - Black

(16,675)
$112.99$101.69
FREE delivery Sun, Aug 10
500+ bought in past month
Loading...
Crucial T705 4TB PCIe Gen5 NVMe M.2 SSD - Up to 14,100 MB/s - Game Ready - Internal Solid State Drive (PC) - +1mo Adobe CC - CT4000T705SSD3

Crucial T705 4TB PCIe Gen5 NVMe M.2 SSD - Up to 14,100 MB/s - Game Ready - Internal Solid State Drive (PC) - +1mo Adobe CC - CT4000T705SSD3

(2,172)
$599.11
FREE delivery Jun 17 - 18
Loading...
Crucial X9 4TB Portable SSD, Up to 1050MB/s, USB 3.2 USB-C, External Solid State Drive, Compatible with Windows, Mac, & Android, Reliable Storage for Games, Files, & Backups, Black - CT4000X9SSD902

Crucial X9 4TB Portable SSD, Up to 1050MB/s, USB 3.2 USB-C, External Solid State Drive, Compatible with Windows, Mac, & Android, Reliable Storage for Games, Files, & Backups, Black - CT4000X9SSD902

(19,722)
$315.09
FREE delivery Tue, Jun 17
50+ bought in past month
Loading...
Crucial X10 Pro 4TB Portable SSD, Up to 2100MB/s Read, 2000MB/s Write, 3.2 USB-C, External Solid State Drive, Durable Storage for PC & Mac, for Professional Creators, Black - ‎CT4000X10PROSSD902

Crucial X10 Pro 4TB Portable SSD, Up to 2100MB/s Read, 2000MB/s Write, 3.2 USB-C, External Solid State Drive, Durable Storage for PC & Mac, for Professional Creators, Black - ‎CT4000X10PROSSD902

(2,557)
$358.93
FREE delivery Tue, Jun 17
50+ bought in past month
Loading...
Crucial X9 Pro 4TB Portable SSD, Up to 1050MB/s Read & Write, 3.2 USB-C, External Solid State Drive, Durable Storage for PC and Mac, for Professional Creators, Silver - ‎CT4000X9PROSSD902

Crucial X9 Pro 4TB Portable SSD, Up to 1050MB/s Read & Write, 3.2 USB-C, External Solid State Drive, Durable Storage for PC and Mac, for Professional Creators, Silver - ‎CT4000X9PROSSD902

(3,702)
$326.05$260.70
FREE delivery Tue, Jun 17
50+ bought in past month
Loading...
EVGA 1000 GQ, 80+ GOLD 1000W, Semi Modular, EVGA ECO Mode, 5 Year Warranty, Power Supply 210-GQ-1000-V1,Black

EVGA 1000 GQ, 80+ GOLD 1000W, Semi Modular, EVGA ECO Mode, 5 Year Warranty, Power Supply 210-GQ-1000-V1,Black

(396)
$199.95
FREE delivery Tue, Oct 14
Loading...
Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

(14,873)
$49.99$39.99
FREE delivery Thu, Aug 21
400+ bought in past month
Loading...
Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

(43,809)
$14.99$11.99
FREE delivery Mon, Sep 22 on your first order
1K+ bought in past month
Loading...
Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

(21,223)
$44.98
FREE delivery Tue, Oct 14
1K+ bought in past month
Loading...
Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black
Best Seller

Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black

(38,516)
$39.98$35.98
FREE delivery Thu, Sep 4
500+ bought in past month
Loading...
Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

(16,830)
$47.98$38.38
FREE delivery Sat, Nov 15
1K+ bought in past month
Loading...
New SteelSeries Arctis Nova Pro for Xbox Multi-System Gaming Headset - Premium Hi-Fi Drivers - Hi-Res Audio - 360° Spatial - GameDAC Gen 2 - Quad-DAC - ClearCast Gen 2 Mic - Xbox, PC, PS5/PS4, Switch

New SteelSeries Arctis Nova Pro for Xbox Multi-System Gaming Headset - Premium Hi-Fi Drivers - Hi-Res Audio - 360° Spatial - GameDAC Gen 2 - Quad-DAC - ClearCast Gen 2 Mic - Xbox, PC, PS5/PS4, Switch

(517)
$209.41$122.65
PrimeFREE delivery Sat, Jun 14
Loading...
NEW SteelSeries Arctis Nova 3 Multi-Platform Gaming Headset - Signature Arctis Sound - ClearCast Gen 2 Mic - PC, PS5/PS4, Xbox Series X|S, Switch, Mobile

NEW SteelSeries Arctis Nova 3 Multi-Platform Gaming Headset - Signature Arctis Sound - ClearCast Gen 2 Mic - PC, PS5/PS4, Xbox Series X|S, Switch, Mobile

(9,500)
$99.98$67.37
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
Asus ROG Strix 1000W Gold Aura Edition (Fully Modular Power Supply, 80+ Gold Certified, ATX 3.0, Cybenetics Lambda A+ Certification, PCIe Gen 5.0 Ready, Axial-tech Fan, Aura Sync, 10-Year Warranty)

Asus ROG Strix 1000W Gold Aura Edition (Fully Modular Power Supply, 80+ Gold Certified, ATX 3.0, Cybenetics Lambda A+ Certification, PCIe Gen 5.0 Ready, Axial-tech Fan, Aura Sync, 10-Year Warranty)

(38)
$267.83$262.70
FREE delivery Oct 9 - 10
Loading...
Corsair CP-9020140-UK HX1200 1200 W 80+ Platinum Fully Modular Power Supply Unit - Black

Corsair CP-9020140-UK HX1200 1200 W 80+ Platinum Fully Modular Power Supply Unit - Black

(179)
$1,240.77
FREE delivery Oct 14 - 21
Loading...
Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

(41)
$219.19$204.66
FREE delivery Oct 15 - 22
Loading...
Corsair SF1000 (2024) Fully Modular Low Noise 80 Plus Platinum ATX Power Supply – ATX 3.1 Compliant – PCIe 5.1 Ready – SFX-to-ATX Bracket Included – Black

Corsair SF1000 (2024) Fully Modular Low Noise 80 Plus Platinum ATX Power Supply – ATX 3.1 Compliant – PCIe 5.1 Ready – SFX-to-ATX Bracket Included – Black

(23)
$284.99
FREE delivery Wed, Oct 8
Loading...
Corsair HX1200i (2025) Fully Modular Ultra-Low Noise ATX Power Supply with 12V-2x6 Cable – ATX 3.1 & PCIe 5.1 Compliant, Cybenetics Platinum Efficiency, Fluid Dynamic Bearing Fan – Black

Corsair HX1200i (2025) Fully Modular Ultra-Low Noise ATX Power Supply with 12V-2x6 Cable – ATX 3.1 & PCIe 5.1 Compliant, Cybenetics Platinum Efficiency, Fluid Dynamic Bearing Fan – Black

(69)
$379.99
FREE delivery Oct 17 - Nov 15
Loading...
msi Crosshair 16 Gaming Laptop - with 2024 Office Lifetime License, GeForce RTX 4070, 16" FHD+ 144 Hz Display, 14th Gen Intel 16-Core i7 14650HX, Backlit KB, Windows 11 Pro (32GB DDR5 RAM | 1TB SSD)

msi Crosshair 16 Gaming Laptop - with 2024 Office Lifetime License, GeForce RTX 4070, 16" FHD+ 144 Hz Display, 14th Gen Intel 16-Core i7 14650HX, Backlit KB, Windows 11 Pro (32GB DDR5 RAM | 1TB SSD)

(0)
$7,606.98
FREE delivery Jun 23 - Jul 3Only 3 left in stock.
Loading...
MSI Thin15 15.6” FHD 144Hz Gaming Laptop, Intel i5-12450H, 32GB RAM, 1TB PCIe SSD, NVIDIA GeForce RTX 2050, Backlit Keyboard, WiFi 6, Win 11 Home, Black, 256GB Docking Station Set

MSI Thin15 15.6” FHD 144Hz Gaming Laptop, Intel i5-12450H, 32GB RAM, 1TB PCIe SSD, NVIDIA GeForce RTX 2050, Backlit Keyboard, WiFi 6, Win 11 Home, Black, 256GB Docking Station Set

(1,002)
$1,339.00
FREE delivery Jun 26 - Jul 8
Loading...
MSI Ultra-Slim Thin 15 VR-Ready High FPS Gaming Laptop, 15.6 FHD 144Hz, Intel Core i5-13420H, NVIDIA GeForce RTX 4060, 32GB RAM, 2TB SSD, Backlit KB, Wi-Fi 6, Bundle with PCO Notebook Fold Radiator

MSI Ultra-Slim Thin 15 VR-Ready High FPS Gaming Laptop, 15.6 FHD 144Hz, Intel Core i5-13420H, NVIDIA GeForce RTX 4060, 32GB RAM, 2TB SSD, Backlit KB, Wi-Fi 6, Bundle with PCO Notebook Fold Radiator

(0)
$4,697.44
FREE delivery Jun 23 - Jul 3Only 3 left in stock.
Loading...
MSI AX1800 WiFi USB Adapter, WiFi 6, MU-MIMO, 802.11ax Dual-Band Gigabit Wireless, Plug and Play, High Speed Long Range USB Gaming Adapter

MSI AX1800 WiFi USB Adapter, WiFi 6, MU-MIMO, 802.11ax Dual-Band Gigabit Wireless, Plug and Play, High Speed Long Range USB Gaming Adapter

(115)
$54.99
FREE delivery Sun, Jun 22