Function In Python Assiging Operations Code