Update P043.py

Made more elegant