• Skip to primary navigation
  • Skip to content
  • Skip to footer
Arshad Mehmood Arshad Mehmood Software Engineer • Tech Enthusiast
  • About
  • Today I Learned
  • Portfolio
  • Resources
  • Newsletter
  • Contact
    1. Home
    2. /
    3. Today i learned
    4. /
    5. Python
    6. /
    7. Iterate over nested lists
    Arshad Mehmood

    Arshad Mehmood

    Software Engineer, DevOps Enthusiast, and Android Developer. M.Sc. Business Informatics from University of Mannheim. Building scalable solutions and sharing knowledge.

    • Mannheim, Germany
    • My Android Apps
    • LinkedIn
    • GitHub
    • Twitter
    • Instagram

    Iterate over nested lists

    less than 1 minute read

    Iterate over nested lists

    Python lists follow this logic when iterating: [thing for thing in list_of_things]

    mylist = [[x for x in range(10)] for _ in range(10)]
    

    Share on

    X Facebook LinkedIn Bluesky

    Leave a comment

    • Follow:
    • Twitter
    • GitHub
    • Instagram
    • Feed
    © 2025 Arshad Mehmood. Powered by Jekyll & Minimal Mistakes.