Using 'xabcdefghx' where x delimit the extremities solution in Clear category for Pawn Brotherhood by jiizzyy
def safe_pawns(pawns: set) -> int:
protected, colums = 0, 'xabcdefghx'
for pawn in pawns:
c,r = colums.index(pawn), int(pawn)
if colums[c-1]+str(r-1) in pawns or colums[c+1]+str(r-1) in pawns:
protected += 1
Feb. 7, 2020