My teacher often tells me that I don't take full advantage of Python capabilities
Try partitioning with list comprehensions.
import random
def quicksort(s):
len_s = len(s)
if len_s < 2:
return s
pivot = s[random.randrange(0, len_s)]
L = [x for x in s if x < pivot]
E = [x for x in s if x == pivot]
G = [x for x in s if x > pivot]
return quicksort(L) + E + quicksort(G)
This is Pythonic, compact and faster than your partition function.
Furthermore, notice the pivot is random. Your original code always uses zero for the pivot. This results in worst-case O(n^2) complexity for sorted inputs. A random pivot mitigates this risk.
As for style, the answer from @janosthe answer from @janos offers solid guidance also.