Refactor to enumerate from "range and len" as pylint suggests
Refactor to enumerate from "range and len" as pylint suggests

results in simpler and faster code, see
https://github.com/kaitai-io/kaitai_struct_python_runtime/pull/56#discussion_r847648785

kaitai-io/kaitai_struct_python_runtime