I cannot figure out what the syntax is doing is this for loop:
for n, id_ in tqdm(enumerate(test_ids), total=len(test_ids)):
I found it in a Kaggle Kernel. I tried searching as much as possible for a solution, but could not find any examples or explanations for python for loops where there are multiple comma separate values after the "in" in part of a for loop. And since I don't know what this is called, I'm not sure what else to search for.
This is the whole block of code:
for n, id_ in tqdm(enumerate(test_ids), total=len(test_ids)):
path = TEST_PATH + id_
img = imread(path + '/images/' + id_ + '.png')[:,:,:IMG_CHANNELS]
sizes_test.append([img.shape[0], img.shape[1]])
img = resize(img, (IMG_HEIGHT, IMG_WIDTH), mode='constant', preserve_range=True)
X_test[n] = img
This is the kernel where the code is from: https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277?scriptVersionId=2164855
tqdmis returning some kind of iterable which is being unpacked into the variablesnand_id.tqdmdoes not return a list.inhere, there's just a single function call (with two arguments—and in fact, the second argument is a keyword argument, so it doesn't even really look like a second value).