Python Use Global Variable Inside Function