R1728
Performance
Warning
Consider using a generator instead for better performance
The Codiga Static Analysis engine is powered by the best open-source tools to check your Python code. Make sure your code does not have any security issues and follow design and other best practices. Automate your code reviews today and merge with confidence with Codiga.
Consider using a generator instead for better performance
Comprehension inside of 'any' or 'all' is unnecessary. A generator would be sufficient and faster.
Iterating over the dictionary items (key-item pairs) and accessing the value by index lookup when the value can be accessed directly instead