Update functions.py

python 3