Skip to main content

Print

This function prints the current state of list after every iteration

Usage

Print(lst:list, callable:Callable, sortKey:Callable = lambda x:x)

Parameters:
      lst : List
            A list of elements to be sorted
      callable : Callable
            The sorting algorithm
      sortKey : Callable
            Decides the relative ordering of elements

Example

from jellybeans.algos import bubble_sortfrom jellybeans.visualiser import PrintPrint([9, 1, 5, 28, 7], bubble_sort)