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

How I chose the tech stack for my startup

A Primer on Reproducible Research in Business Analytics: using Markdown and Knitr

All about Back To Back SWE

Beginner’s guide to programming

Food for Agile Thought #176

Basic data structures in Python

Why Kotlin A Popular Choice For Developing Cross-Platform Apps

The “tech triangle”​, for IT consultants

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

Socket Code in python

Efficient summation in Python

Fibonacci and Palindrome in Python

File: A file is a collection of data stored in an enclosed unit( the data can be text, image etc.),