Python Change Input Variable Inside Function