Skip to content
Advertisement

Python some for loops one action

I have three for loops with one action. How to merge this loops in one?

JavaScript

tried:

JavaScript

but this trick working only with ‘if’ loops

Advertisement

Answer

I’d suggest itertools.chain

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement