I would like to use urllib.quote(). But python (python3) is not finding the module. Suppose, I have this line of code:
urllib.quote()
print(urllib.quote(\"châteu\"
This is how I handle this, without using exceptions.
import sys if sys.version_info.major > 2: # Python 3 or later from urllib.parse import quote else: # Python 2 from urllib import quote