restore IP address Python accepted