adding API challenge code in python