Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution that came to my mind solution in Clear category for Pawn Brotherhood by Vulwsztyn
def safe_pawns(pawns):
s=0
for i in pawns:
for j in pawns:
if (ord(i[0])==1+ord(j[0]) or ord(i[0])+1==ord(j[0])) and int(i[1])==int(j[1])+1:
s+=1
break
return s
Oct. 14, 2016