p40 in python