And to avoid being called hypocritical, here's off the top of my head how the answers would look like (I don't use Python very often either):
1. len(thingie)
2.
def bubsort(arr):
if not arr: return None
for i in range(len(arr)):
for j in range(i+1, len(arr)):
if arr[i] > arr[j]: arr[i], arr[j] = arr[j], arr[i]
return arr
3. def revtree(node):
if not node: return None
node.left, node.right = revtree(node.right), revtree(node.left)
return node
edit: works well for something coded on the toilet: https://gist.github.com/andreis/69a242330617b2a62753ce604e27...