Skip to main content

5 methods of sort in python

Project description

Sort_methods - it`s a python package for list's sorting

Installing

pip install sort_methods

Guide

from sort_methods import sorter

sorter.bubble_sort(object) # bubble-method of sorting, object - list
sorter.selection_sort(object) # selection-method of sorting, object - list
sorter.insertion_sort(object) # insertion-method of sorting, object - list
sorter.heap_sort(object) # heap-method of sorting, object - list
sorter.merge_sort(object) # merge-method of sorting, object - list

All functions, beside merge_sort( ) can sort lists of strings

from sort_methods import sorter

chars = ['e', 'a', 'c', 'b']
sorter.bubble_sort(chars)
sorter.selection_sort(chars)
sorter.insertion_sort(chars)
sorter.heap_sort(chars)
# after any of this operations list 'chars' will be like this: ['a', 'b', 'c', 'e']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sort_methods-1.0.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page