Python Function Passing Variables While Performing