I'm trying to understand one of the answers to this question:

Cannot pass an argument to python with "#!/usr/bin/env python"

#!/bin/sh
''''exec python -u -- "$0" ${1+"$@"} # '''

This works well, but I do not understand why it works with four ticks at the beginning of that line rather than three.

In addition, why the hash near the end of that string?

Edit
Report