Dec-28-2021, 04:54 AM
Where is the "="? If there is no "=" there is no assignment. Not completely true, but mostly true.
theBoard[move] is a dictionary lookup. It will return the value associated with the key referenced by the variable "move". If move == 'top-R', theBoard[move] will return the value in the dictionary associated with the key 'top-R'. If theBoard does not contain the key 'top-R' this code raises an error.
theBoard[move] is a dictionary lookup. It will return the value associated with the key referenced by the variable "move". If move == 'top-R', theBoard[move] will return the value in the dictionary associated with the key 'top-R'. If theBoard does not contain the key 'top-R' this code raises an error.