Correct Way To Create A Function In Python