Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
index solution in Clear category for Pawn Brotherhood by katnic
A,N = list('...abcdefgh...'),list('...12345678...')
def safe_pawns(P, i=0):
for p in P:
if A[ A.index(p[0])-1 ] + N[ N.index(p[1])-1 ] in P\
or A[ A.index(p[0])+1 ] + N[ N.index(p[1])-1 ] in P:
i+=1
return i
Aug. 14, 2021