Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Pawn Brotherhood by Vottivott
def safe_pawns(pawns):
count = 0
for p in pawns:
file = ord(p[0])
rank = int(p[1])
if chr(file-1) + str(rank-1) in pawns or chr(file+1) + str(rank-1) in pawns:
count += 1
return count
Jan. 20, 2015