Note that rpcuser.py seems to handle either version when called explicitly like python2 rpcuser.py / python3 rpcuser.py. This change allows the user's python to be used to interpret the script.
Backport of core PR11830
https://github.com/bitcoin/bitcoin/pull/11830/files