If your util.py is just responsible for editing grid you can write code as you mentioned. But if your util.py has more functionalities, for instance opening dataset, multi dimension grid and ... you can use classes. Put your function which related each other to the classes and import classes from util.py wherever you want. You can read single responsibility design pattern.
skeleton for the code
The functions you need to write are as follows:
def create grid(grid):
"""create a 4x4 array of zeroes within grid"""
def print grid (grid):
"""print out a 4x4 grid in 5-width columns within a box"""
def check lost (grid):
"""return True if there are no 0 values and there are no
adjacent values that are equal; otherwise False"""
def check won (grid):
"""return True if a value>=32 is found in the grid; otherwise
False"""
def copy grid (grid):
"""return a copy of the given grid"""
def grid equal (grid1, grid2):
"""check if 2 grids are equal - return boolean value"""
how do i code a module of utility functions called util.py for manipulating 2-dimensional arrays of size 4x4?