Category Hierarchy

我正在做一个项目,我需要在控制台中插入坐标以返回网格中的一个位置。我的网格是10*10,行中有数字,列中有字母。我希望能够输入像A1这样的东西,并将其解释为"column1,row1“

到目前为止,我得到了:

def get_coor():
    user_input = input("Please enter coordinates (row,col) ? ")
    coor = user_input.split(" ")
    return coor

但我只有在有空间的情况下才能分开。在这种情况下,有没有其他功能可以帮助我?

转载请注明出处:http://www.yojatech.com/article/20230526/2299678.html