Python Create Function From String To Number