Additions in Python - remaking code