Changed global variable board's list comprehension to use "index" instead of "i" to avoid local variables shadowing it