p50 in python