Data Conversion Function In Python Practice