We use the url_for() function to create a URL for a given function. It takes the function's name as the first parameter, as well as any number of keyword arguments, each of which corresponds to a variable component of the URL rule. As query parameters, unknown variable bits are appended to the URL. When compared to hard-coding URLs, reversing is typically more descriptive. Instead of remembering to manually change hard-coded URLs, you can modify all of your URLs at once. The escaping of special characters is handled transparently during URL creation. The routes generated are always absolute, avoiding unexpected behavior in browsers due to relative paths. If your application is in a directory other than the URL root, such as /myapplication instead of /, url_for() will take care of it.