URL Encode A String In Python

This code encodes (aka quotes) a string for use in a url query string path:

There is also this one which uses `+` for spaces instead of `%20`:

More details in the docs: