Can you comment on the corresponding code statement... crying

Asked 2 years ago, Updated 2 years ago, 21 views

for i in range(0,4): for j in range(0,4): for k in range(0,8): if boardInfo[i][j]['word'] == picked[k]: boardInfo[i][j]['color'] = k

python

2022-09-21 15:49

1 Answers

First of all, the array picked seems to be a simple array of 8 values.

boardInfo probably has five keys, and the value of each key is an array with five keys (I'll call this array the objective array). And some keys in this objective array may or may not have 'word'.

So, if there is a 'word' in the destination array and the value matches one of the values in picked, it seems to be the source that uses the value as the 'color'

There is no guarantee of certainty. It is entirely the responsibility of the personnel to read, decode and use legacy sources.


2022-09-21 15:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.