<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_world_dimensions(gridfile, delim=" "):
 """ This function takes the name of a file in grid_task format and returns the dimensions of the world it represents. """

    infile = open(gridfile)
    lines = infile.readlines()
    infile.close()
    world_x = len(lines[0].strip().split(delim))
    world_y = len(lines)
    return (world_x, world_y)