Iterate over index/value of a list

    0

    6

    Python public recipes

    Shortcut: list.enumerate

    for index, value in enumerate(mylist):
      print('{0}: {1}'.format(index, value))
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.