Timeline for Asynchronously scrape fabric information
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 20, 2021 at 12:37 | comment | added | dougj | Ah!Nice to know that I will give it a try. | |
| Jun 20, 2021 at 12:15 | comment | added | Grajdeanu Alex |
@dougj not quite. In python you can iterate over the index and the value at the same time using enumerate. For example: for index, value in enumerate(['zero', 'one', 'two']) would return a tuple like this at each iteration: (0, 'zero',), (1, 'one',), (2, 'two',).
|
|
| Jun 20, 2021 at 8:53 | comment | added | dougj | Actually I want in place changes to modify the list that is why I have to use range(len) | |
| Jun 20, 2021 at 0:06 | comment | added | Sara J |
The loop over the index actually uses the index to modify the array. To avoid the range(len) approach here you'd have to use enumerate as in for index, fabric_type in enumerate(fabric):
|
|
| Jun 19, 2021 at 17:36 | history | answered | verisimilidude | CC BY-SA 4.0 |