Check If Array Index Exists Python Snake