Been trying to get into recursion lately, and I came up with this in a sorting problem. Here is the code: def sort(arr, n): if n < 1: return arr while arr[n] > arr[n-1]: tmp = arr[n-1] arr[n-1] = arr[n] arr[n] = tmp return sort(arr, n-1) Obviously, it doesn't work so how do I improve it? Continue reading...