Determine Color of a Chessboard Square LeetCode solution in Python

1
# Runtime: 62 ms (Top 10.11%) | Memory: 13.8 MB (Top 56.37%)
2
class Solution:
3
def squareIsWhite(self, coordinates: str) -> bool:
4
return (ord(coordinates[0]) + ord(coordinates[1])) % 2

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0