Python Function Returns Two Variables That Determine