All pastes #413308 Raw Edit

Untitled

public python v1 · immutable
#413308 ·published 2007-03-28 09:47 UTC
rendered paste body
# bubblesort.py# This is a simple (and inefficient) bubble sort algorithm.def bubblesort(list):	for i in range(0, len(numbers) - 1):       # i ranges from 0 to 6		for j in range(0, len(numbers) - 1):   # j ranges from 0 to 6			if numbers[j] > numbers[j+1]:      # if jth number > (j+1)st number				temp = numbers[j]              # then exchange them				numbers[j] = numbers[j+1]				numbers[j+1] = temp	return list