Challenge3 in Python