Update 1.py

move util function to a separate file