Change range() to xrange()