Python — Why Python list are slower when sorted

import random
import time
for x in range(1,9): r = 10**x # do different val for the bound in randint()
m = int(r/2)
print("For rand", r) # s_not is non sorted list
s_not = [random.randint(1,r) for i in range(10**7)]




Flutter and Native Android developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

HTTP Server: Everything you need to know to Build a simple HTTP server from scratch

KubeVela Releases 1.1: Reaching New Peaks in Cloud-Native Continuous Delivery

Hosting a site for free on IPFS

Geosharded Recommendations Part 3: Consistency

Spring MVC

21 Sprint Retrospective Anti-Patterns

How I taught myself sorting algorithms and Big O in just 3 days, and you can too

Creating a Cooldown System in Unity

Hades from the Hercules cartoon, has a temper but chills out. Caption: “Okay, fine, fine. I’m cool. I’m fine.”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Flutter Developer

Flutter Developer

Flutter and Native Android developer

More from Medium

Decorators in Python

Learning Python

How to install and setup Pycharm and venv in Windows 10

How to Send Mail Using Gmail in Python