Bogosort

The Bogosort is considered one of the worst sorting algorithms. It works by creating random arrangements of given values and randomly moving them until they are sorted. It is not effective for any form of sorting.
Algorithm.
The Bogosort first takes in a set of values from a user. Next it randomly arranges these values.
If the values are now in a sorted order, then the function is finished, else the function repeats itself.
A working analogy for the Bogosort is to sort a deck of cards by throwing them into the air, picking them up at random, and repeating the process until they are sorted.
Simple Example.
Array = (3,1 ,5 ,7 ,8 ,9)
1st shuffling = (1,3,7,8,9,5)
2nd shuffling = (3,7,8,6,9,1)
3rd shuffling = (7,6,3,8,9,1)
4th shuffling = (6,7,8,9,3,1)
5th shuffling = (3,6,7,8,9,1)
(continued shuffling) ...
Coding Example.
The following code is done in Python 3:
import random 
def is_sorted(data): 
 for i in range(len(data) - 1): 
 if data[i] &gt; data[i + 1]:
 return False
 return True
def bogosort(data):
 while not is_sorted(data): 
 random.shuffle(data)
 return data