.. _unnecessary-list-index-lookup: unnecessary-list-index-lookup / R1736 ===================================== **Message emitted:** ``Unnecessary list index lookup, use '%s' instead`` **Description:** *Emitted when iterating over an enumeration and accessing the value by index lookup. The value can be accessed directly instead.* **Problematic code:** .. literalinclude:: /data/messages/u/unnecessary-list-index-lookup/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/u/unnecessary-list-index-lookup/good.py :language: python Created by the `refactoring `__ checker.