[{"data":1,"prerenderedAt":6355},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/use-generators":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361,"expanded":13},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417,"expanded":13},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[445],{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"body":602,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},{"type":603,"children":604,"toc":6336},"root",[605,614,620,1008,1015,1028,1134,1141,1620,1626,2134,2140,2262,2268,2274,2815,2821,3502,3508,4257,4263,4394,4400,5007,5013,5461,5467,6175,6181,6305,6311,6316,6330],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"using-generators",[611],{"type":612,"value":613},"text","🔄 Using Generators",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Generators are memory-efficient functions that produce values one at a time instead of creating entire lists in memory. They're perfect for processing large datasets, streaming data, or creating infinite sequences.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Simple generator function\ndef count_up_to(max_num):\n    count = 1\n    while count \u003C= max_num:\n        yield count\n        count += 1\n\n# Generator expression\nsquares = (x**2 for x in range(5))\n\n# Using generators\ncounter = count_up_to(3)\nfor number in counter:\n    print(f\"Count: {number}\")\n\n# Convert generator to list (if needed)\nsquare_list = list(squares)\nprint(f\"Squares: {square_list}\")\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,667,686,709,722,739,747,755,818,825,833,860,882,929,936,944,966],{"type":606,"tag":636,"props":637,"children":639},"span",{"class":638,"line":12},"line",[640],{"type":606,"tag":636,"props":641,"children":643},{"style":642},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[644],{"type":612,"value":645},"# Simple generator function\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649,655,661],{"type":606,"tag":636,"props":650,"children":652},{"style":651},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[653],{"type":612,"value":654},"def",{"type":606,"tag":636,"props":656,"children":658},{"style":657},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[659],{"type":612,"value":660}," count_up_to",{"type":606,"tag":636,"props":662,"children":664},{"style":663},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[665],{"type":612,"value":666},"(max_num):\n",{"type":606,"tag":636,"props":668,"children":669},{"class":638,"line":36},[670,675,680],{"type":606,"tag":636,"props":671,"children":672},{"style":663},[673],{"type":612,"value":674},"    count ",{"type":606,"tag":636,"props":676,"children":677},{"style":651},[678],{"type":612,"value":679},"=",{"type":606,"tag":636,"props":681,"children":683},{"style":682},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[684],{"type":612,"value":685}," 1\n",{"type":606,"tag":636,"props":687,"children":688},{"class":638,"line":45},[689,694,699,704],{"type":606,"tag":636,"props":690,"children":691},{"style":651},[692],{"type":612,"value":693},"    while",{"type":606,"tag":636,"props":695,"children":696},{"style":663},[697],{"type":612,"value":698}," count ",{"type":606,"tag":636,"props":700,"children":701},{"style":651},[702],{"type":612,"value":703},"\u003C=",{"type":606,"tag":636,"props":705,"children":706},{"style":663},[707],{"type":612,"value":708}," max_num:\n",{"type":606,"tag":636,"props":710,"children":711},{"class":638,"line":54},[712,717],{"type":606,"tag":636,"props":713,"children":714},{"style":651},[715],{"type":612,"value":716},"        yield",{"type":606,"tag":636,"props":718,"children":719},{"style":663},[720],{"type":612,"value":721}," count\n",{"type":606,"tag":636,"props":723,"children":724},{"class":638,"line":63},[725,730,735],{"type":606,"tag":636,"props":726,"children":727},{"style":663},[728],{"type":612,"value":729},"        count ",{"type":606,"tag":636,"props":731,"children":732},{"style":651},[733],{"type":612,"value":734},"+=",{"type":606,"tag":636,"props":736,"children":737},{"style":682},[738],{"type":612,"value":685},{"type":606,"tag":636,"props":740,"children":741},{"class":638,"line":72},[742],{"type":606,"tag":636,"props":743,"children":744},{"emptyLinePlaceholder":13},[745],{"type":612,"value":746},"\n",{"type":606,"tag":636,"props":748,"children":749},{"class":638,"line":81},[750],{"type":606,"tag":636,"props":751,"children":752},{"style":642},[753],{"type":612,"value":754},"# Generator expression\n",{"type":606,"tag":636,"props":756,"children":758},{"class":638,"line":757},9,[759,764,768,773,778,783,788,793,798,803,808,813],{"type":606,"tag":636,"props":760,"children":761},{"style":663},[762],{"type":612,"value":763},"squares ",{"type":606,"tag":636,"props":765,"children":766},{"style":651},[767],{"type":612,"value":679},{"type":606,"tag":636,"props":769,"children":770},{"style":663},[771],{"type":612,"value":772}," (x",{"type":606,"tag":636,"props":774,"children":775},{"style":651},[776],{"type":612,"value":777},"**",{"type":606,"tag":636,"props":779,"children":780},{"style":682},[781],{"type":612,"value":782},"2",{"type":606,"tag":636,"props":784,"children":785},{"style":651},[786],{"type":612,"value":787}," for",{"type":606,"tag":636,"props":789,"children":790},{"style":663},[791],{"type":612,"value":792}," x ",{"type":606,"tag":636,"props":794,"children":795},{"style":651},[796],{"type":612,"value":797},"in",{"type":606,"tag":636,"props":799,"children":800},{"style":682},[801],{"type":612,"value":802}," range",{"type":606,"tag":636,"props":804,"children":805},{"style":663},[806],{"type":612,"value":807},"(",{"type":606,"tag":636,"props":809,"children":810},{"style":682},[811],{"type":612,"value":812},"5",{"type":606,"tag":636,"props":814,"children":815},{"style":663},[816],{"type":612,"value":817},"))\n",{"type":606,"tag":636,"props":819,"children":820},{"class":638,"line":99},[821],{"type":606,"tag":636,"props":822,"children":823},{"emptyLinePlaceholder":13},[824],{"type":612,"value":746},{"type":606,"tag":636,"props":826,"children":827},{"class":638,"line":108},[828],{"type":606,"tag":636,"props":829,"children":830},{"style":642},[831],{"type":612,"value":832},"# Using generators\n",{"type":606,"tag":636,"props":834,"children":835},{"class":638,"line":117},[836,841,845,850,855],{"type":606,"tag":636,"props":837,"children":838},{"style":663},[839],{"type":612,"value":840},"counter ",{"type":606,"tag":636,"props":842,"children":843},{"style":651},[844],{"type":612,"value":679},{"type":606,"tag":636,"props":846,"children":847},{"style":663},[848],{"type":612,"value":849}," count_up_to(",{"type":606,"tag":636,"props":851,"children":852},{"style":682},[853],{"type":612,"value":854},"3",{"type":606,"tag":636,"props":856,"children":857},{"style":663},[858],{"type":612,"value":859},")\n",{"type":606,"tag":636,"props":861,"children":862},{"class":638,"line":126},[863,868,873,877],{"type":606,"tag":636,"props":864,"children":865},{"style":651},[866],{"type":612,"value":867},"for",{"type":606,"tag":636,"props":869,"children":870},{"style":663},[871],{"type":612,"value":872}," number ",{"type":606,"tag":636,"props":874,"children":875},{"style":651},[876],{"type":612,"value":797},{"type":606,"tag":636,"props":878,"children":879},{"style":663},[880],{"type":612,"value":881}," counter:\n",{"type":606,"tag":636,"props":883,"children":884},{"class":638,"line":135},[885,890,894,899,905,910,915,920,925],{"type":606,"tag":636,"props":886,"children":887},{"style":682},[888],{"type":612,"value":889},"    print",{"type":606,"tag":636,"props":891,"children":892},{"style":663},[893],{"type":612,"value":807},{"type":606,"tag":636,"props":895,"children":896},{"style":651},[897],{"type":612,"value":898},"f",{"type":606,"tag":636,"props":900,"children":902},{"style":901},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[903],{"type":612,"value":904},"\"Count: ",{"type":606,"tag":636,"props":906,"children":907},{"style":682},[908],{"type":612,"value":909},"{",{"type":606,"tag":636,"props":911,"children":912},{"style":663},[913],{"type":612,"value":914},"number",{"type":606,"tag":636,"props":916,"children":917},{"style":682},[918],{"type":612,"value":919},"}",{"type":606,"tag":636,"props":921,"children":922},{"style":901},[923],{"type":612,"value":924},"\"",{"type":606,"tag":636,"props":926,"children":927},{"style":663},[928],{"type":612,"value":859},{"type":606,"tag":636,"props":930,"children":931},{"class":638,"line":144},[932],{"type":606,"tag":636,"props":933,"children":934},{"emptyLinePlaceholder":13},[935],{"type":612,"value":746},{"type":606,"tag":636,"props":937,"children":938},{"class":638,"line":153},[939],{"type":606,"tag":636,"props":940,"children":941},{"style":642},[942],{"type":612,"value":943},"# Convert generator to list (if needed)\n",{"type":606,"tag":636,"props":945,"children":946},{"class":638,"line":163},[947,952,956,961],{"type":606,"tag":636,"props":948,"children":949},{"style":663},[950],{"type":612,"value":951},"square_list ",{"type":606,"tag":636,"props":953,"children":954},{"style":651},[955],{"type":612,"value":679},{"type":606,"tag":636,"props":957,"children":958},{"style":682},[959],{"type":612,"value":960}," list",{"type":606,"tag":636,"props":962,"children":963},{"style":663},[964],{"type":612,"value":965},"(squares)\n",{"type":606,"tag":636,"props":967,"children":968},{"class":638,"line":172},[969,974,978,982,987,991,996,1000,1004],{"type":606,"tag":636,"props":970,"children":971},{"style":682},[972],{"type":612,"value":973},"print",{"type":606,"tag":636,"props":975,"children":976},{"style":663},[977],{"type":612,"value":807},{"type":606,"tag":636,"props":979,"children":980},{"style":651},[981],{"type":612,"value":898},{"type":606,"tag":636,"props":983,"children":984},{"style":901},[985],{"type":612,"value":986},"\"Squares: ",{"type":606,"tag":636,"props":988,"children":989},{"style":682},[990],{"type":612,"value":909},{"type":606,"tag":636,"props":992,"children":993},{"style":663},[994],{"type":612,"value":995},"square_list",{"type":606,"tag":636,"props":997,"children":998},{"style":682},[999],{"type":612,"value":919},{"type":606,"tag":636,"props":1001,"children":1002},{"style":901},[1003],{"type":612,"value":924},{"type":606,"tag":636,"props":1005,"children":1006},{"style":663},[1007],{"type":612,"value":859},{"type":606,"tag":1009,"props":1010,"children":1012},"h2",{"id":1011},"understanding-generators",[1013],{"type":612,"value":1014},"🎯 Understanding Generators",{"type":606,"tag":615,"props":1016,"children":1017},{},[1018,1020,1026],{"type":612,"value":1019},"Generators use the ",{"type":606,"tag":632,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":612,"value":1025},"yield",{"type":612,"value":1027}," keyword to produce values on-demand, saving memory by not storing all values at once.",{"type":606,"tag":1029,"props":1030,"children":1034},"info-box",{"emoji":1031,"title":1032,"type":1033},"⚡","Generator Basics","info",[1035,1044,1103,1111],{"type":606,"tag":615,"props":1036,"children":1037},{},[1038],{"type":606,"tag":1039,"props":1040,"children":1041},"strong",{},[1042],{"type":612,"value":1043},"Key Differences:",{"type":606,"tag":1045,"props":1046,"children":1047},"ul",{},[1048,1067,1083,1093],{"type":606,"tag":1049,"props":1050,"children":1051},"li",{},[1052,1057,1059,1065],{"type":606,"tag":1039,"props":1053,"children":1054},{},[1055],{"type":612,"value":1056},"Regular function",{"type":612,"value":1058},": ",{"type":606,"tag":632,"props":1060,"children":1062},{"className":1061},[],[1063],{"type":612,"value":1064},"return",{"type":612,"value":1066}," gives all results at once",{"type":606,"tag":1049,"props":1068,"children":1069},{},[1070,1075,1076,1081],{"type":606,"tag":1039,"props":1071,"children":1072},{},[1073],{"type":612,"value":1074},"Generator function",{"type":612,"value":1058},{"type":606,"tag":632,"props":1077,"children":1079},{"className":1078},[],[1080],{"type":612,"value":1025},{"type":612,"value":1082}," gives one result at a time",{"type":606,"tag":1049,"props":1084,"children":1085},{},[1086,1091],{"type":606,"tag":1039,"props":1087,"children":1088},{},[1089],{"type":612,"value":1090},"Memory",{"type":612,"value":1092},": Generators use minimal memory",{"type":606,"tag":1049,"props":1094,"children":1095},{},[1096,1101],{"type":606,"tag":1039,"props":1097,"children":1098},{},[1099],{"type":612,"value":1100},"Speed",{"type":612,"value":1102},": Faster startup, processes values as needed",{"type":606,"tag":615,"props":1104,"children":1105},{},[1106],{"type":606,"tag":1039,"props":1107,"children":1108},{},[1109],{"type":612,"value":1110},"When to Use:",{"type":606,"tag":1045,"props":1112,"children":1113},{},[1114,1119,1124,1129],{"type":606,"tag":1049,"props":1115,"children":1116},{},[1117],{"type":612,"value":1118},"Large datasets that don't fit in memory",{"type":606,"tag":1049,"props":1120,"children":1121},{},[1122],{"type":612,"value":1123},"Infinite sequences",{"type":606,"tag":1049,"props":1125,"children":1126},{},[1127],{"type":612,"value":1128},"Processing files line by line",{"type":606,"tag":1049,"props":1130,"children":1131},{},[1132],{"type":612,"value":1133},"Data pipelines and streaming",{"type":606,"tag":1135,"props":1136,"children":1138},"h3",{"id":1137},"simple-generator-functions",[1139],{"type":612,"value":1140},"Simple Generator Functions",{"type":606,"tag":621,"props":1142,"children":1143},{},[1144],{"type":606,"tag":625,"props":1145,"children":1147},{"className":627,"code":1146,"language":629,"meta":8,"style":8},"def simple_generator():\n    yield 1\n    yield 2\n    yield 3\n\ndef fibonacci(limit):\n    a, b = 0, 1\n    while a \u003C limit:\n        yield a\n        a, b = b, a + b\n\ndef read_lines():\n    lines = [\"First line\", \"Second line\", \"Third line\"]\n    for line in lines:\n        yield line.strip()\n\n# Using generators\ngen = simple_generator()\nprint(list(gen))  # [1, 2, 3]\n\nfib_numbers = list(fibonacci(20))\nprint(f\"Fibonacci: {fib_numbers}\")\n\nfor line in read_lines():\n    print(f\"Line: {line}\")\n",[1148],{"type":606,"tag":632,"props":1149,"children":1150},{"__ignoreMap":8},[1151,1168,1180,1192,1204,1211,1228,1255,1277,1289,1316,1323,1339,1384,1406,1418,1425,1432,1449,1475,1482,1512,1553,1560,1580],{"type":606,"tag":636,"props":1152,"children":1153},{"class":638,"line":12},[1154,1158,1163],{"type":606,"tag":636,"props":1155,"children":1156},{"style":651},[1157],{"type":612,"value":654},{"type":606,"tag":636,"props":1159,"children":1160},{"style":657},[1161],{"type":612,"value":1162}," simple_generator",{"type":606,"tag":636,"props":1164,"children":1165},{"style":663},[1166],{"type":612,"value":1167},"():\n",{"type":606,"tag":636,"props":1169,"children":1170},{"class":638,"line":27},[1171,1176],{"type":606,"tag":636,"props":1172,"children":1173},{"style":651},[1174],{"type":612,"value":1175},"    yield",{"type":606,"tag":636,"props":1177,"children":1178},{"style":682},[1179],{"type":612,"value":685},{"type":606,"tag":636,"props":1181,"children":1182},{"class":638,"line":36},[1183,1187],{"type":606,"tag":636,"props":1184,"children":1185},{"style":651},[1186],{"type":612,"value":1175},{"type":606,"tag":636,"props":1188,"children":1189},{"style":682},[1190],{"type":612,"value":1191}," 2\n",{"type":606,"tag":636,"props":1193,"children":1194},{"class":638,"line":45},[1195,1199],{"type":606,"tag":636,"props":1196,"children":1197},{"style":651},[1198],{"type":612,"value":1175},{"type":606,"tag":636,"props":1200,"children":1201},{"style":682},[1202],{"type":612,"value":1203}," 3\n",{"type":606,"tag":636,"props":1205,"children":1206},{"class":638,"line":54},[1207],{"type":606,"tag":636,"props":1208,"children":1209},{"emptyLinePlaceholder":13},[1210],{"type":612,"value":746},{"type":606,"tag":636,"props":1212,"children":1213},{"class":638,"line":63},[1214,1218,1223],{"type":606,"tag":636,"props":1215,"children":1216},{"style":651},[1217],{"type":612,"value":654},{"type":606,"tag":636,"props":1219,"children":1220},{"style":657},[1221],{"type":612,"value":1222}," fibonacci",{"type":606,"tag":636,"props":1224,"children":1225},{"style":663},[1226],{"type":612,"value":1227},"(limit):\n",{"type":606,"tag":636,"props":1229,"children":1230},{"class":638,"line":72},[1231,1236,1240,1245,1250],{"type":606,"tag":636,"props":1232,"children":1233},{"style":663},[1234],{"type":612,"value":1235},"    a, b ",{"type":606,"tag":636,"props":1237,"children":1238},{"style":651},[1239],{"type":612,"value":679},{"type":606,"tag":636,"props":1241,"children":1242},{"style":682},[1243],{"type":612,"value":1244}," 0",{"type":606,"tag":636,"props":1246,"children":1247},{"style":663},[1248],{"type":612,"value":1249},", ",{"type":606,"tag":636,"props":1251,"children":1252},{"style":682},[1253],{"type":612,"value":1254},"1\n",{"type":606,"tag":636,"props":1256,"children":1257},{"class":638,"line":81},[1258,1262,1267,1272],{"type":606,"tag":636,"props":1259,"children":1260},{"style":651},[1261],{"type":612,"value":693},{"type":606,"tag":636,"props":1263,"children":1264},{"style":663},[1265],{"type":612,"value":1266}," a ",{"type":606,"tag":636,"props":1268,"children":1269},{"style":651},[1270],{"type":612,"value":1271},"\u003C",{"type":606,"tag":636,"props":1273,"children":1274},{"style":663},[1275],{"type":612,"value":1276}," limit:\n",{"type":606,"tag":636,"props":1278,"children":1279},{"class":638,"line":757},[1280,1284],{"type":606,"tag":636,"props":1281,"children":1282},{"style":651},[1283],{"type":612,"value":716},{"type":606,"tag":636,"props":1285,"children":1286},{"style":663},[1287],{"type":612,"value":1288}," a\n",{"type":606,"tag":636,"props":1290,"children":1291},{"class":638,"line":99},[1292,1297,1301,1306,1311],{"type":606,"tag":636,"props":1293,"children":1294},{"style":663},[1295],{"type":612,"value":1296},"        a, b ",{"type":606,"tag":636,"props":1298,"children":1299},{"style":651},[1300],{"type":612,"value":679},{"type":606,"tag":636,"props":1302,"children":1303},{"style":663},[1304],{"type":612,"value":1305}," b, a ",{"type":606,"tag":636,"props":1307,"children":1308},{"style":651},[1309],{"type":612,"value":1310},"+",{"type":606,"tag":636,"props":1312,"children":1313},{"style":663},[1314],{"type":612,"value":1315}," b\n",{"type":606,"tag":636,"props":1317,"children":1318},{"class":638,"line":108},[1319],{"type":606,"tag":636,"props":1320,"children":1321},{"emptyLinePlaceholder":13},[1322],{"type":612,"value":746},{"type":606,"tag":636,"props":1324,"children":1325},{"class":638,"line":117},[1326,1330,1335],{"type":606,"tag":636,"props":1327,"children":1328},{"style":651},[1329],{"type":612,"value":654},{"type":606,"tag":636,"props":1331,"children":1332},{"style":657},[1333],{"type":612,"value":1334}," read_lines",{"type":606,"tag":636,"props":1336,"children":1337},{"style":663},[1338],{"type":612,"value":1167},{"type":606,"tag":636,"props":1340,"children":1341},{"class":638,"line":126},[1342,1347,1351,1356,1361,1365,1370,1374,1379],{"type":606,"tag":636,"props":1343,"children":1344},{"style":663},[1345],{"type":612,"value":1346},"    lines ",{"type":606,"tag":636,"props":1348,"children":1349},{"style":651},[1350],{"type":612,"value":679},{"type":606,"tag":636,"props":1352,"children":1353},{"style":663},[1354],{"type":612,"value":1355}," [",{"type":606,"tag":636,"props":1357,"children":1358},{"style":901},[1359],{"type":612,"value":1360},"\"First line\"",{"type":606,"tag":636,"props":1362,"children":1363},{"style":663},[1364],{"type":612,"value":1249},{"type":606,"tag":636,"props":1366,"children":1367},{"style":901},[1368],{"type":612,"value":1369},"\"Second line\"",{"type":606,"tag":636,"props":1371,"children":1372},{"style":663},[1373],{"type":612,"value":1249},{"type":606,"tag":636,"props":1375,"children":1376},{"style":901},[1377],{"type":612,"value":1378},"\"Third line\"",{"type":606,"tag":636,"props":1380,"children":1381},{"style":663},[1382],{"type":612,"value":1383},"]\n",{"type":606,"tag":636,"props":1385,"children":1386},{"class":638,"line":135},[1387,1392,1397,1401],{"type":606,"tag":636,"props":1388,"children":1389},{"style":651},[1390],{"type":612,"value":1391},"    for",{"type":606,"tag":636,"props":1393,"children":1394},{"style":663},[1395],{"type":612,"value":1396}," line ",{"type":606,"tag":636,"props":1398,"children":1399},{"style":651},[1400],{"type":612,"value":797},{"type":606,"tag":636,"props":1402,"children":1403},{"style":663},[1404],{"type":612,"value":1405}," lines:\n",{"type":606,"tag":636,"props":1407,"children":1408},{"class":638,"line":144},[1409,1413],{"type":606,"tag":636,"props":1410,"children":1411},{"style":651},[1412],{"type":612,"value":716},{"type":606,"tag":636,"props":1414,"children":1415},{"style":663},[1416],{"type":612,"value":1417}," line.strip()\n",{"type":606,"tag":636,"props":1419,"children":1420},{"class":638,"line":153},[1421],{"type":606,"tag":636,"props":1422,"children":1423},{"emptyLinePlaceholder":13},[1424],{"type":612,"value":746},{"type":606,"tag":636,"props":1426,"children":1427},{"class":638,"line":163},[1428],{"type":606,"tag":636,"props":1429,"children":1430},{"style":642},[1431],{"type":612,"value":832},{"type":606,"tag":636,"props":1433,"children":1434},{"class":638,"line":172},[1435,1440,1444],{"type":606,"tag":636,"props":1436,"children":1437},{"style":663},[1438],{"type":612,"value":1439},"gen ",{"type":606,"tag":636,"props":1441,"children":1442},{"style":651},[1443],{"type":612,"value":679},{"type":606,"tag":636,"props":1445,"children":1446},{"style":663},[1447],{"type":612,"value":1448}," simple_generator()\n",{"type":606,"tag":636,"props":1450,"children":1451},{"class":638,"line":181},[1452,1456,1460,1465,1470],{"type":606,"tag":636,"props":1453,"children":1454},{"style":682},[1455],{"type":612,"value":973},{"type":606,"tag":636,"props":1457,"children":1458},{"style":663},[1459],{"type":612,"value":807},{"type":606,"tag":636,"props":1461,"children":1462},{"style":682},[1463],{"type":612,"value":1464},"list",{"type":606,"tag":636,"props":1466,"children":1467},{"style":663},[1468],{"type":612,"value":1469},"(gen))  ",{"type":606,"tag":636,"props":1471,"children":1472},{"style":642},[1473],{"type":612,"value":1474},"# [1, 2, 3]\n",{"type":606,"tag":636,"props":1476,"children":1477},{"class":638,"line":190},[1478],{"type":606,"tag":636,"props":1479,"children":1480},{"emptyLinePlaceholder":13},[1481],{"type":612,"value":746},{"type":606,"tag":636,"props":1483,"children":1484},{"class":638,"line":199},[1485,1490,1494,1498,1503,1508],{"type":606,"tag":636,"props":1486,"children":1487},{"style":663},[1488],{"type":612,"value":1489},"fib_numbers ",{"type":606,"tag":636,"props":1491,"children":1492},{"style":651},[1493],{"type":612,"value":679},{"type":606,"tag":636,"props":1495,"children":1496},{"style":682},[1497],{"type":612,"value":960},{"type":606,"tag":636,"props":1499,"children":1500},{"style":663},[1501],{"type":612,"value":1502},"(fibonacci(",{"type":606,"tag":636,"props":1504,"children":1505},{"style":682},[1506],{"type":612,"value":1507},"20",{"type":606,"tag":636,"props":1509,"children":1510},{"style":663},[1511],{"type":612,"value":817},{"type":606,"tag":636,"props":1513,"children":1514},{"class":638,"line":208},[1515,1519,1523,1527,1532,1536,1541,1545,1549],{"type":606,"tag":636,"props":1516,"children":1517},{"style":682},[1518],{"type":612,"value":973},{"type":606,"tag":636,"props":1520,"children":1521},{"style":663},[1522],{"type":612,"value":807},{"type":606,"tag":636,"props":1524,"children":1525},{"style":651},[1526],{"type":612,"value":898},{"type":606,"tag":636,"props":1528,"children":1529},{"style":901},[1530],{"type":612,"value":1531},"\"Fibonacci: ",{"type":606,"tag":636,"props":1533,"children":1534},{"style":682},[1535],{"type":612,"value":909},{"type":606,"tag":636,"props":1537,"children":1538},{"style":663},[1539],{"type":612,"value":1540},"fib_numbers",{"type":606,"tag":636,"props":1542,"children":1543},{"style":682},[1544],{"type":612,"value":919},{"type":606,"tag":636,"props":1546,"children":1547},{"style":901},[1548],{"type":612,"value":924},{"type":606,"tag":636,"props":1550,"children":1551},{"style":663},[1552],{"type":612,"value":859},{"type":606,"tag":636,"props":1554,"children":1555},{"class":638,"line":217},[1556],{"type":606,"tag":636,"props":1557,"children":1558},{"emptyLinePlaceholder":13},[1559],{"type":612,"value":746},{"type":606,"tag":636,"props":1561,"children":1562},{"class":638,"line":227},[1563,1567,1571,1575],{"type":606,"tag":636,"props":1564,"children":1565},{"style":651},[1566],{"type":612,"value":867},{"type":606,"tag":636,"props":1568,"children":1569},{"style":663},[1570],{"type":612,"value":1396},{"type":606,"tag":636,"props":1572,"children":1573},{"style":651},[1574],{"type":612,"value":797},{"type":606,"tag":636,"props":1576,"children":1577},{"style":663},[1578],{"type":612,"value":1579}," read_lines():\n",{"type":606,"tag":636,"props":1581,"children":1582},{"class":638,"line":236},[1583,1587,1591,1595,1600,1604,1608,1612,1616],{"type":606,"tag":636,"props":1584,"children":1585},{"style":682},[1586],{"type":612,"value":889},{"type":606,"tag":636,"props":1588,"children":1589},{"style":663},[1590],{"type":612,"value":807},{"type":606,"tag":636,"props":1592,"children":1593},{"style":651},[1594],{"type":612,"value":898},{"type":606,"tag":636,"props":1596,"children":1597},{"style":901},[1598],{"type":612,"value":1599},"\"Line: ",{"type":606,"tag":636,"props":1601,"children":1602},{"style":682},[1603],{"type":612,"value":909},{"type":606,"tag":636,"props":1605,"children":1606},{"style":663},[1607],{"type":612,"value":638},{"type":606,"tag":636,"props":1609,"children":1610},{"style":682},[1611],{"type":612,"value":919},{"type":606,"tag":636,"props":1613,"children":1614},{"style":901},[1615],{"type":612,"value":924},{"type":606,"tag":636,"props":1617,"children":1618},{"style":663},[1619],{"type":612,"value":859},{"type":606,"tag":1135,"props":1621,"children":1623},{"id":1622},"generator-expressions",[1624],{"type":612,"value":1625},"Generator Expressions",{"type":606,"tag":621,"props":1627,"children":1628},{},[1629],{"type":606,"tag":625,"props":1630,"children":1632},{"className":627,"code":1631,"language":629,"meta":8,"style":8},"# Generator expressions (like list comprehensions but with parentheses)\nnumbers = (x for x in range(10))\nsquares = (x**2 for x in range(5))\neven_squares = (x**2 for x in range(10) if x % 2 == 0)\n\n# Using generator expressions\nprint(\"Numbers:\", list(numbers))\nprint(\"Squares:\", list(squares))\nprint(\"Even squares:\", list(even_squares))\n\n# Generator for processing data\ndata = [1, 2, 3, 4, 5]\ndoubled = (x * 2 for x in data)\nfiltered = (x for x in doubled if x > 4)\n\nprint(\"Filtered doubled:\", list(filtered))\n",[1633],{"type":606,"tag":632,"props":1634,"children":1635},{"__ignoreMap":8},[1636,1644,1690,1741,1826,1833,1841,1870,1899,1928,1935,1943,2001,2043,2098,2105],{"type":606,"tag":636,"props":1637,"children":1638},{"class":638,"line":12},[1639],{"type":606,"tag":636,"props":1640,"children":1641},{"style":642},[1642],{"type":612,"value":1643},"# Generator expressions (like list comprehensions but with parentheses)\n",{"type":606,"tag":636,"props":1645,"children":1646},{"class":638,"line":27},[1647,1652,1656,1661,1665,1669,1673,1677,1681,1686],{"type":606,"tag":636,"props":1648,"children":1649},{"style":663},[1650],{"type":612,"value":1651},"numbers ",{"type":606,"tag":636,"props":1653,"children":1654},{"style":651},[1655],{"type":612,"value":679},{"type":606,"tag":636,"props":1657,"children":1658},{"style":663},[1659],{"type":612,"value":1660}," (x ",{"type":606,"tag":636,"props":1662,"children":1663},{"style":651},[1664],{"type":612,"value":867},{"type":606,"tag":636,"props":1666,"children":1667},{"style":663},[1668],{"type":612,"value":792},{"type":606,"tag":636,"props":1670,"children":1671},{"style":651},[1672],{"type":612,"value":797},{"type":606,"tag":636,"props":1674,"children":1675},{"style":682},[1676],{"type":612,"value":802},{"type":606,"tag":636,"props":1678,"children":1679},{"style":663},[1680],{"type":612,"value":807},{"type":606,"tag":636,"props":1682,"children":1683},{"style":682},[1684],{"type":612,"value":1685},"10",{"type":606,"tag":636,"props":1687,"children":1688},{"style":663},[1689],{"type":612,"value":817},{"type":606,"tag":636,"props":1691,"children":1692},{"class":638,"line":36},[1693,1697,1701,1705,1709,1713,1717,1721,1725,1729,1733,1737],{"type":606,"tag":636,"props":1694,"children":1695},{"style":663},[1696],{"type":612,"value":763},{"type":606,"tag":636,"props":1698,"children":1699},{"style":651},[1700],{"type":612,"value":679},{"type":606,"tag":636,"props":1702,"children":1703},{"style":663},[1704],{"type":612,"value":772},{"type":606,"tag":636,"props":1706,"children":1707},{"style":651},[1708],{"type":612,"value":777},{"type":606,"tag":636,"props":1710,"children":1711},{"style":682},[1712],{"type":612,"value":782},{"type":606,"tag":636,"props":1714,"children":1715},{"style":651},[1716],{"type":612,"value":787},{"type":606,"tag":636,"props":1718,"children":1719},{"style":663},[1720],{"type":612,"value":792},{"type":606,"tag":636,"props":1722,"children":1723},{"style":651},[1724],{"type":612,"value":797},{"type":606,"tag":636,"props":1726,"children":1727},{"style":682},[1728],{"type":612,"value":802},{"type":606,"tag":636,"props":1730,"children":1731},{"style":663},[1732],{"type":612,"value":807},{"type":606,"tag":636,"props":1734,"children":1735},{"style":682},[1736],{"type":612,"value":812},{"type":606,"tag":636,"props":1738,"children":1739},{"style":663},[1740],{"type":612,"value":817},{"type":606,"tag":636,"props":1742,"children":1743},{"class":638,"line":45},[1744,1749,1753,1757,1761,1765,1769,1773,1777,1781,1785,1789,1794,1799,1803,1808,1813,1818,1822],{"type":606,"tag":636,"props":1745,"children":1746},{"style":663},[1747],{"type":612,"value":1748},"even_squares ",{"type":606,"tag":636,"props":1750,"children":1751},{"style":651},[1752],{"type":612,"value":679},{"type":606,"tag":636,"props":1754,"children":1755},{"style":663},[1756],{"type":612,"value":772},{"type":606,"tag":636,"props":1758,"children":1759},{"style":651},[1760],{"type":612,"value":777},{"type":606,"tag":636,"props":1762,"children":1763},{"style":682},[1764],{"type":612,"value":782},{"type":606,"tag":636,"props":1766,"children":1767},{"style":651},[1768],{"type":612,"value":787},{"type":606,"tag":636,"props":1770,"children":1771},{"style":663},[1772],{"type":612,"value":792},{"type":606,"tag":636,"props":1774,"children":1775},{"style":651},[1776],{"type":612,"value":797},{"type":606,"tag":636,"props":1778,"children":1779},{"style":682},[1780],{"type":612,"value":802},{"type":606,"tag":636,"props":1782,"children":1783},{"style":663},[1784],{"type":612,"value":807},{"type":606,"tag":636,"props":1786,"children":1787},{"style":682},[1788],{"type":612,"value":1685},{"type":606,"tag":636,"props":1790,"children":1791},{"style":663},[1792],{"type":612,"value":1793},") ",{"type":606,"tag":636,"props":1795,"children":1796},{"style":651},[1797],{"type":612,"value":1798},"if",{"type":606,"tag":636,"props":1800,"children":1801},{"style":663},[1802],{"type":612,"value":792},{"type":606,"tag":636,"props":1804,"children":1805},{"style":651},[1806],{"type":612,"value":1807},"%",{"type":606,"tag":636,"props":1809,"children":1810},{"style":682},[1811],{"type":612,"value":1812}," 2",{"type":606,"tag":636,"props":1814,"children":1815},{"style":651},[1816],{"type":612,"value":1817}," ==",{"type":606,"tag":636,"props":1819,"children":1820},{"style":682},[1821],{"type":612,"value":1244},{"type":606,"tag":636,"props":1823,"children":1824},{"style":663},[1825],{"type":612,"value":859},{"type":606,"tag":636,"props":1827,"children":1828},{"class":638,"line":54},[1829],{"type":606,"tag":636,"props":1830,"children":1831},{"emptyLinePlaceholder":13},[1832],{"type":612,"value":746},{"type":606,"tag":636,"props":1834,"children":1835},{"class":638,"line":63},[1836],{"type":606,"tag":636,"props":1837,"children":1838},{"style":642},[1839],{"type":612,"value":1840},"# Using generator expressions\n",{"type":606,"tag":636,"props":1842,"children":1843},{"class":638,"line":72},[1844,1848,1852,1857,1861,1865],{"type":606,"tag":636,"props":1845,"children":1846},{"style":682},[1847],{"type":612,"value":973},{"type":606,"tag":636,"props":1849,"children":1850},{"style":663},[1851],{"type":612,"value":807},{"type":606,"tag":636,"props":1853,"children":1854},{"style":901},[1855],{"type":612,"value":1856},"\"Numbers:\"",{"type":606,"tag":636,"props":1858,"children":1859},{"style":663},[1860],{"type":612,"value":1249},{"type":606,"tag":636,"props":1862,"children":1863},{"style":682},[1864],{"type":612,"value":1464},{"type":606,"tag":636,"props":1866,"children":1867},{"style":663},[1868],{"type":612,"value":1869},"(numbers))\n",{"type":606,"tag":636,"props":1871,"children":1872},{"class":638,"line":81},[1873,1877,1881,1886,1890,1894],{"type":606,"tag":636,"props":1874,"children":1875},{"style":682},[1876],{"type":612,"value":973},{"type":606,"tag":636,"props":1878,"children":1879},{"style":663},[1880],{"type":612,"value":807},{"type":606,"tag":636,"props":1882,"children":1883},{"style":901},[1884],{"type":612,"value":1885},"\"Squares:\"",{"type":606,"tag":636,"props":1887,"children":1888},{"style":663},[1889],{"type":612,"value":1249},{"type":606,"tag":636,"props":1891,"children":1892},{"style":682},[1893],{"type":612,"value":1464},{"type":606,"tag":636,"props":1895,"children":1896},{"style":663},[1897],{"type":612,"value":1898},"(squares))\n",{"type":606,"tag":636,"props":1900,"children":1901},{"class":638,"line":757},[1902,1906,1910,1915,1919,1923],{"type":606,"tag":636,"props":1903,"children":1904},{"style":682},[1905],{"type":612,"value":973},{"type":606,"tag":636,"props":1907,"children":1908},{"style":663},[1909],{"type":612,"value":807},{"type":606,"tag":636,"props":1911,"children":1912},{"style":901},[1913],{"type":612,"value":1914},"\"Even squares:\"",{"type":606,"tag":636,"props":1916,"children":1917},{"style":663},[1918],{"type":612,"value":1249},{"type":606,"tag":636,"props":1920,"children":1921},{"style":682},[1922],{"type":612,"value":1464},{"type":606,"tag":636,"props":1924,"children":1925},{"style":663},[1926],{"type":612,"value":1927},"(even_squares))\n",{"type":606,"tag":636,"props":1929,"children":1930},{"class":638,"line":99},[1931],{"type":606,"tag":636,"props":1932,"children":1933},{"emptyLinePlaceholder":13},[1934],{"type":612,"value":746},{"type":606,"tag":636,"props":1936,"children":1937},{"class":638,"line":108},[1938],{"type":606,"tag":636,"props":1939,"children":1940},{"style":642},[1941],{"type":612,"value":1942},"# Generator for processing data\n",{"type":606,"tag":636,"props":1944,"children":1945},{"class":638,"line":117},[1946,1951,1955,1959,1964,1968,1972,1976,1980,1984,1989,1993,1997],{"type":606,"tag":636,"props":1947,"children":1948},{"style":663},[1949],{"type":612,"value":1950},"data ",{"type":606,"tag":636,"props":1952,"children":1953},{"style":651},[1954],{"type":612,"value":679},{"type":606,"tag":636,"props":1956,"children":1957},{"style":663},[1958],{"type":612,"value":1355},{"type":606,"tag":636,"props":1960,"children":1961},{"style":682},[1962],{"type":612,"value":1963},"1",{"type":606,"tag":636,"props":1965,"children":1966},{"style":663},[1967],{"type":612,"value":1249},{"type":606,"tag":636,"props":1969,"children":1970},{"style":682},[1971],{"type":612,"value":782},{"type":606,"tag":636,"props":1973,"children":1974},{"style":663},[1975],{"type":612,"value":1249},{"type":606,"tag":636,"props":1977,"children":1978},{"style":682},[1979],{"type":612,"value":854},{"type":606,"tag":636,"props":1981,"children":1982},{"style":663},[1983],{"type":612,"value":1249},{"type":606,"tag":636,"props":1985,"children":1986},{"style":682},[1987],{"type":612,"value":1988},"4",{"type":606,"tag":636,"props":1990,"children":1991},{"style":663},[1992],{"type":612,"value":1249},{"type":606,"tag":636,"props":1994,"children":1995},{"style":682},[1996],{"type":612,"value":812},{"type":606,"tag":636,"props":1998,"children":1999},{"style":663},[2000],{"type":612,"value":1383},{"type":606,"tag":636,"props":2002,"children":2003},{"class":638,"line":126},[2004,2009,2013,2017,2022,2026,2030,2034,2038],{"type":606,"tag":636,"props":2005,"children":2006},{"style":663},[2007],{"type":612,"value":2008},"doubled ",{"type":606,"tag":636,"props":2010,"children":2011},{"style":651},[2012],{"type":612,"value":679},{"type":606,"tag":636,"props":2014,"children":2015},{"style":663},[2016],{"type":612,"value":1660},{"type":606,"tag":636,"props":2018,"children":2019},{"style":651},[2020],{"type":612,"value":2021},"*",{"type":606,"tag":636,"props":2023,"children":2024},{"style":682},[2025],{"type":612,"value":1812},{"type":606,"tag":636,"props":2027,"children":2028},{"style":651},[2029],{"type":612,"value":787},{"type":606,"tag":636,"props":2031,"children":2032},{"style":663},[2033],{"type":612,"value":792},{"type":606,"tag":636,"props":2035,"children":2036},{"style":651},[2037],{"type":612,"value":797},{"type":606,"tag":636,"props":2039,"children":2040},{"style":663},[2041],{"type":612,"value":2042}," data)\n",{"type":606,"tag":636,"props":2044,"children":2045},{"class":638,"line":135},[2046,2051,2055,2059,2063,2067,2071,2076,2080,2084,2089,2094],{"type":606,"tag":636,"props":2047,"children":2048},{"style":663},[2049],{"type":612,"value":2050},"filtered ",{"type":606,"tag":636,"props":2052,"children":2053},{"style":651},[2054],{"type":612,"value":679},{"type":606,"tag":636,"props":2056,"children":2057},{"style":663},[2058],{"type":612,"value":1660},{"type":606,"tag":636,"props":2060,"children":2061},{"style":651},[2062],{"type":612,"value":867},{"type":606,"tag":636,"props":2064,"children":2065},{"style":663},[2066],{"type":612,"value":792},{"type":606,"tag":636,"props":2068,"children":2069},{"style":651},[2070],{"type":612,"value":797},{"type":606,"tag":636,"props":2072,"children":2073},{"style":663},[2074],{"type":612,"value":2075}," doubled ",{"type":606,"tag":636,"props":2077,"children":2078},{"style":651},[2079],{"type":612,"value":1798},{"type":606,"tag":636,"props":2081,"children":2082},{"style":663},[2083],{"type":612,"value":792},{"type":606,"tag":636,"props":2085,"children":2086},{"style":651},[2087],{"type":612,"value":2088},">",{"type":606,"tag":636,"props":2090,"children":2091},{"style":682},[2092],{"type":612,"value":2093}," 4",{"type":606,"tag":636,"props":2095,"children":2096},{"style":663},[2097],{"type":612,"value":859},{"type":606,"tag":636,"props":2099,"children":2100},{"class":638,"line":144},[2101],{"type":606,"tag":636,"props":2102,"children":2103},{"emptyLinePlaceholder":13},[2104],{"type":612,"value":746},{"type":606,"tag":636,"props":2106,"children":2107},{"class":638,"line":153},[2108,2112,2116,2121,2125,2129],{"type":606,"tag":636,"props":2109,"children":2110},{"style":682},[2111],{"type":612,"value":973},{"type":606,"tag":636,"props":2113,"children":2114},{"style":663},[2115],{"type":612,"value":807},{"type":606,"tag":636,"props":2117,"children":2118},{"style":901},[2119],{"type":612,"value":2120},"\"Filtered doubled:\"",{"type":606,"tag":636,"props":2122,"children":2123},{"style":663},[2124],{"type":612,"value":1249},{"type":606,"tag":636,"props":2126,"children":2127},{"style":682},[2128],{"type":612,"value":1464},{"type":606,"tag":636,"props":2130,"children":2131},{"style":663},[2132],{"type":612,"value":2133},"(filtered))\n",{"type":606,"tag":1009,"props":2135,"children":2137},{"id":2136},"generator-vs-list-comparison",[2138],{"type":612,"value":2139},"📋 Generator vs List Comparison",{"type":606,"tag":2141,"props":2142,"children":2143},"table",{},[2144,2168],{"type":606,"tag":2145,"props":2146,"children":2147},"thead",{},[2148],{"type":606,"tag":2149,"props":2150,"children":2151},"tr",{},[2152,2158,2163],{"type":606,"tag":2153,"props":2154,"children":2155},"th",{},[2156],{"type":612,"value":2157},"Feature",{"type":606,"tag":2153,"props":2159,"children":2160},{},[2161],{"type":612,"value":2162},"Generator",{"type":606,"tag":2153,"props":2164,"children":2165},{},[2166],{"type":612,"value":2167},"List",{"type":606,"tag":2169,"props":2170,"children":2171},"tbody",{},[2172,2191,2208,2226,2244],{"type":606,"tag":2149,"props":2173,"children":2174},{},[2175,2181,2186],{"type":606,"tag":2176,"props":2177,"children":2178},"td",{},[2179],{"type":612,"value":2180},"Memory usage",{"type":606,"tag":2176,"props":2182,"children":2183},{},[2184],{"type":612,"value":2185},"Low (one item at a time)",{"type":606,"tag":2176,"props":2187,"children":2188},{},[2189],{"type":612,"value":2190},"High (all items stored)",{"type":606,"tag":2149,"props":2192,"children":2193},{},[2194,2198,2203],{"type":606,"tag":2176,"props":2195,"children":2196},{},[2197],{"type":612,"value":1100},{"type":606,"tag":2176,"props":2199,"children":2200},{},[2201],{"type":612,"value":2202},"Fast startup",{"type":606,"tag":2176,"props":2204,"children":2205},{},[2206],{"type":612,"value":2207},"Slower for large data",{"type":606,"tag":2149,"props":2209,"children":2210},{},[2211,2216,2221],{"type":606,"tag":2176,"props":2212,"children":2213},{},[2214],{"type":612,"value":2215},"Reusability",{"type":606,"tag":2176,"props":2217,"children":2218},{},[2219],{"type":612,"value":2220},"One-time use",{"type":606,"tag":2176,"props":2222,"children":2223},{},[2224],{"type":612,"value":2225},"Reusable",{"type":606,"tag":2149,"props":2227,"children":2228},{},[2229,2234,2239],{"type":606,"tag":2176,"props":2230,"children":2231},{},[2232],{"type":612,"value":2233},"Indexing",{"type":606,"tag":2176,"props":2235,"children":2236},{},[2237],{"type":612,"value":2238},"No random access",{"type":606,"tag":2176,"props":2240,"children":2241},{},[2242],{"type":612,"value":2243},"Full indexing support",{"type":606,"tag":2149,"props":2245,"children":2246},{},[2247,2252,2257],{"type":606,"tag":2176,"props":2248,"children":2249},{},[2250],{"type":612,"value":2251},"Best for",{"type":606,"tag":2176,"props":2253,"children":2254},{},[2255],{"type":612,"value":2256},"Large/infinite data",{"type":606,"tag":2176,"props":2258,"children":2259},{},[2260],{"type":612,"value":2261},"Small datasets, random access",{"type":606,"tag":1009,"props":2263,"children":2265},{"id":2264},"practical-generator-examples",[2266],{"type":612,"value":2267},"🔧 Practical Generator Examples",{"type":606,"tag":1135,"props":2269,"children":2271},{"id":2270},"file-processing-generator",[2272],{"type":612,"value":2273},"File Processing Generator",{"type":606,"tag":621,"props":2275,"children":2276},{},[2277],{"type":606,"tag":625,"props":2278,"children":2280},{"className":627,"code":2279,"language":629,"meta":8,"style":8},"def process_file_lines(filename=None):\n    # Simulate file reading\n    sample_lines = [\n        \"apple,5\",\n        \"banana,3\",\n        \"orange,8\",\n        \"grape,12\"\n    ]\n    \n    for line in sample_lines:\n        if ',' in line:\n            name, count = line.strip().split(',')\n            yield {\n                'name': name,\n                'count': int(count)\n            }\n\ndef filter_high_count(items, threshold=5):\n    for item in items:\n        if item['count'] > threshold:\n            yield item\n\n# Chain generators together\nfile_data = process_file_lines()\nhigh_count_items = filter_high_count(file_data, threshold=5)\n\nprint(\"High count items:\")\nfor item in high_count_items:\n    print(f\"  {item['name']}: {item['count']}\")\n",[2281],{"type":606,"tag":632,"props":2282,"children":2283},{"__ignoreMap":8},[2284,2315,2323,2340,2353,2365,2377,2385,2393,2401,2421,2444,2470,2483,2496,2518,2526,2533,2562,2583,2614,2626,2633,2641,2658,2693,2700,2720,2740],{"type":606,"tag":636,"props":2285,"children":2286},{"class":638,"line":12},[2287,2291,2296,2301,2305,2310],{"type":606,"tag":636,"props":2288,"children":2289},{"style":651},[2290],{"type":612,"value":654},{"type":606,"tag":636,"props":2292,"children":2293},{"style":657},[2294],{"type":612,"value":2295}," process_file_lines",{"type":606,"tag":636,"props":2297,"children":2298},{"style":663},[2299],{"type":612,"value":2300},"(filename",{"type":606,"tag":636,"props":2302,"children":2303},{"style":651},[2304],{"type":612,"value":679},{"type":606,"tag":636,"props":2306,"children":2307},{"style":682},[2308],{"type":612,"value":2309},"None",{"type":606,"tag":636,"props":2311,"children":2312},{"style":663},[2313],{"type":612,"value":2314},"):\n",{"type":606,"tag":636,"props":2316,"children":2317},{"class":638,"line":27},[2318],{"type":606,"tag":636,"props":2319,"children":2320},{"style":642},[2321],{"type":612,"value":2322},"    # Simulate file reading\n",{"type":606,"tag":636,"props":2324,"children":2325},{"class":638,"line":36},[2326,2331,2335],{"type":606,"tag":636,"props":2327,"children":2328},{"style":663},[2329],{"type":612,"value":2330},"    sample_lines ",{"type":606,"tag":636,"props":2332,"children":2333},{"style":651},[2334],{"type":612,"value":679},{"type":606,"tag":636,"props":2336,"children":2337},{"style":663},[2338],{"type":612,"value":2339}," [\n",{"type":606,"tag":636,"props":2341,"children":2342},{"class":638,"line":45},[2343,2348],{"type":606,"tag":636,"props":2344,"children":2345},{"style":901},[2346],{"type":612,"value":2347},"        \"apple,5\"",{"type":606,"tag":636,"props":2349,"children":2350},{"style":663},[2351],{"type":612,"value":2352},",\n",{"type":606,"tag":636,"props":2354,"children":2355},{"class":638,"line":54},[2356,2361],{"type":606,"tag":636,"props":2357,"children":2358},{"style":901},[2359],{"type":612,"value":2360},"        \"banana,3\"",{"type":606,"tag":636,"props":2362,"children":2363},{"style":663},[2364],{"type":612,"value":2352},{"type":606,"tag":636,"props":2366,"children":2367},{"class":638,"line":63},[2368,2373],{"type":606,"tag":636,"props":2369,"children":2370},{"style":901},[2371],{"type":612,"value":2372},"        \"orange,8\"",{"type":606,"tag":636,"props":2374,"children":2375},{"style":663},[2376],{"type":612,"value":2352},{"type":606,"tag":636,"props":2378,"children":2379},{"class":638,"line":72},[2380],{"type":606,"tag":636,"props":2381,"children":2382},{"style":901},[2383],{"type":612,"value":2384},"        \"grape,12\"\n",{"type":606,"tag":636,"props":2386,"children":2387},{"class":638,"line":81},[2388],{"type":606,"tag":636,"props":2389,"children":2390},{"style":663},[2391],{"type":612,"value":2392},"    ]\n",{"type":606,"tag":636,"props":2394,"children":2395},{"class":638,"line":757},[2396],{"type":606,"tag":636,"props":2397,"children":2398},{"style":663},[2399],{"type":612,"value":2400},"    \n",{"type":606,"tag":636,"props":2402,"children":2403},{"class":638,"line":99},[2404,2408,2412,2416],{"type":606,"tag":636,"props":2405,"children":2406},{"style":651},[2407],{"type":612,"value":1391},{"type":606,"tag":636,"props":2409,"children":2410},{"style":663},[2411],{"type":612,"value":1396},{"type":606,"tag":636,"props":2413,"children":2414},{"style":651},[2415],{"type":612,"value":797},{"type":606,"tag":636,"props":2417,"children":2418},{"style":663},[2419],{"type":612,"value":2420}," sample_lines:\n",{"type":606,"tag":636,"props":2422,"children":2423},{"class":638,"line":108},[2424,2429,2434,2439],{"type":606,"tag":636,"props":2425,"children":2426},{"style":651},[2427],{"type":612,"value":2428},"        if",{"type":606,"tag":636,"props":2430,"children":2431},{"style":901},[2432],{"type":612,"value":2433}," ','",{"type":606,"tag":636,"props":2435,"children":2436},{"style":651},[2437],{"type":612,"value":2438}," in",{"type":606,"tag":636,"props":2440,"children":2441},{"style":663},[2442],{"type":612,"value":2443}," line:\n",{"type":606,"tag":636,"props":2445,"children":2446},{"class":638,"line":117},[2447,2452,2456,2461,2466],{"type":606,"tag":636,"props":2448,"children":2449},{"style":663},[2450],{"type":612,"value":2451},"            name, count ",{"type":606,"tag":636,"props":2453,"children":2454},{"style":651},[2455],{"type":612,"value":679},{"type":606,"tag":636,"props":2457,"children":2458},{"style":663},[2459],{"type":612,"value":2460}," line.strip().split(",{"type":606,"tag":636,"props":2462,"children":2463},{"style":901},[2464],{"type":612,"value":2465},"','",{"type":606,"tag":636,"props":2467,"children":2468},{"style":663},[2469],{"type":612,"value":859},{"type":606,"tag":636,"props":2471,"children":2472},{"class":638,"line":126},[2473,2478],{"type":606,"tag":636,"props":2474,"children":2475},{"style":651},[2476],{"type":612,"value":2477},"            yield",{"type":606,"tag":636,"props":2479,"children":2480},{"style":663},[2481],{"type":612,"value":2482}," {\n",{"type":606,"tag":636,"props":2484,"children":2485},{"class":638,"line":135},[2486,2491],{"type":606,"tag":636,"props":2487,"children":2488},{"style":901},[2489],{"type":612,"value":2490},"                'name'",{"type":606,"tag":636,"props":2492,"children":2493},{"style":663},[2494],{"type":612,"value":2495},": name,\n",{"type":606,"tag":636,"props":2497,"children":2498},{"class":638,"line":144},[2499,2504,2508,2513],{"type":606,"tag":636,"props":2500,"children":2501},{"style":901},[2502],{"type":612,"value":2503},"                'count'",{"type":606,"tag":636,"props":2505,"children":2506},{"style":663},[2507],{"type":612,"value":1058},{"type":606,"tag":636,"props":2509,"children":2510},{"style":682},[2511],{"type":612,"value":2512},"int",{"type":606,"tag":636,"props":2514,"children":2515},{"style":663},[2516],{"type":612,"value":2517},"(count)\n",{"type":606,"tag":636,"props":2519,"children":2520},{"class":638,"line":153},[2521],{"type":606,"tag":636,"props":2522,"children":2523},{"style":663},[2524],{"type":612,"value":2525},"            }\n",{"type":606,"tag":636,"props":2527,"children":2528},{"class":638,"line":163},[2529],{"type":606,"tag":636,"props":2530,"children":2531},{"emptyLinePlaceholder":13},[2532],{"type":612,"value":746},{"type":606,"tag":636,"props":2534,"children":2535},{"class":638,"line":172},[2536,2540,2545,2550,2554,2558],{"type":606,"tag":636,"props":2537,"children":2538},{"style":651},[2539],{"type":612,"value":654},{"type":606,"tag":636,"props":2541,"children":2542},{"style":657},[2543],{"type":612,"value":2544}," filter_high_count",{"type":606,"tag":636,"props":2546,"children":2547},{"style":663},[2548],{"type":612,"value":2549},"(items, threshold",{"type":606,"tag":636,"props":2551,"children":2552},{"style":651},[2553],{"type":612,"value":679},{"type":606,"tag":636,"props":2555,"children":2556},{"style":682},[2557],{"type":612,"value":812},{"type":606,"tag":636,"props":2559,"children":2560},{"style":663},[2561],{"type":612,"value":2314},{"type":606,"tag":636,"props":2563,"children":2564},{"class":638,"line":181},[2565,2569,2574,2578],{"type":606,"tag":636,"props":2566,"children":2567},{"style":651},[2568],{"type":612,"value":1391},{"type":606,"tag":636,"props":2570,"children":2571},{"style":663},[2572],{"type":612,"value":2573}," item ",{"type":606,"tag":636,"props":2575,"children":2576},{"style":651},[2577],{"type":612,"value":797},{"type":606,"tag":636,"props":2579,"children":2580},{"style":663},[2581],{"type":612,"value":2582}," items:\n",{"type":606,"tag":636,"props":2584,"children":2585},{"class":638,"line":190},[2586,2590,2595,2600,2605,2609],{"type":606,"tag":636,"props":2587,"children":2588},{"style":651},[2589],{"type":612,"value":2428},{"type":606,"tag":636,"props":2591,"children":2592},{"style":663},[2593],{"type":612,"value":2594}," item[",{"type":606,"tag":636,"props":2596,"children":2597},{"style":901},[2598],{"type":612,"value":2599},"'count'",{"type":606,"tag":636,"props":2601,"children":2602},{"style":663},[2603],{"type":612,"value":2604},"] ",{"type":606,"tag":636,"props":2606,"children":2607},{"style":651},[2608],{"type":612,"value":2088},{"type":606,"tag":636,"props":2610,"children":2611},{"style":663},[2612],{"type":612,"value":2613}," threshold:\n",{"type":606,"tag":636,"props":2615,"children":2616},{"class":638,"line":199},[2617,2621],{"type":606,"tag":636,"props":2618,"children":2619},{"style":651},[2620],{"type":612,"value":2477},{"type":606,"tag":636,"props":2622,"children":2623},{"style":663},[2624],{"type":612,"value":2625}," item\n",{"type":606,"tag":636,"props":2627,"children":2628},{"class":638,"line":208},[2629],{"type":606,"tag":636,"props":2630,"children":2631},{"emptyLinePlaceholder":13},[2632],{"type":612,"value":746},{"type":606,"tag":636,"props":2634,"children":2635},{"class":638,"line":217},[2636],{"type":606,"tag":636,"props":2637,"children":2638},{"style":642},[2639],{"type":612,"value":2640},"# Chain generators together\n",{"type":606,"tag":636,"props":2642,"children":2643},{"class":638,"line":227},[2644,2649,2653],{"type":606,"tag":636,"props":2645,"children":2646},{"style":663},[2647],{"type":612,"value":2648},"file_data ",{"type":606,"tag":636,"props":2650,"children":2651},{"style":651},[2652],{"type":612,"value":679},{"type":606,"tag":636,"props":2654,"children":2655},{"style":663},[2656],{"type":612,"value":2657}," process_file_lines()\n",{"type":606,"tag":636,"props":2659,"children":2660},{"class":638,"line":236},[2661,2666,2670,2675,2681,2685,2689],{"type":606,"tag":636,"props":2662,"children":2663},{"style":663},[2664],{"type":612,"value":2665},"high_count_items ",{"type":606,"tag":636,"props":2667,"children":2668},{"style":651},[2669],{"type":612,"value":679},{"type":606,"tag":636,"props":2671,"children":2672},{"style":663},[2673],{"type":612,"value":2674}," filter_high_count(file_data, ",{"type":606,"tag":636,"props":2676,"children":2678},{"style":2677},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[2679],{"type":612,"value":2680},"threshold",{"type":606,"tag":636,"props":2682,"children":2683},{"style":651},[2684],{"type":612,"value":679},{"type":606,"tag":636,"props":2686,"children":2687},{"style":682},[2688],{"type":612,"value":812},{"type":606,"tag":636,"props":2690,"children":2691},{"style":663},[2692],{"type":612,"value":859},{"type":606,"tag":636,"props":2694,"children":2695},{"class":638,"line":245},[2696],{"type":606,"tag":636,"props":2697,"children":2698},{"emptyLinePlaceholder":13},[2699],{"type":612,"value":746},{"type":606,"tag":636,"props":2701,"children":2702},{"class":638,"line":254},[2703,2707,2711,2716],{"type":606,"tag":636,"props":2704,"children":2705},{"style":682},[2706],{"type":612,"value":973},{"type":606,"tag":636,"props":2708,"children":2709},{"style":663},[2710],{"type":612,"value":807},{"type":606,"tag":636,"props":2712,"children":2713},{"style":901},[2714],{"type":612,"value":2715},"\"High count items:\"",{"type":606,"tag":636,"props":2717,"children":2718},{"style":663},[2719],{"type":612,"value":859},{"type":606,"tag":636,"props":2721,"children":2722},{"class":638,"line":263},[2723,2727,2731,2735],{"type":606,"tag":636,"props":2724,"children":2725},{"style":651},[2726],{"type":612,"value":867},{"type":606,"tag":636,"props":2728,"children":2729},{"style":663},[2730],{"type":612,"value":2573},{"type":606,"tag":636,"props":2732,"children":2733},{"style":651},[2734],{"type":612,"value":797},{"type":606,"tag":636,"props":2736,"children":2737},{"style":663},[2738],{"type":612,"value":2739}," high_count_items:\n",{"type":606,"tag":636,"props":2741,"children":2742},{"class":638,"line":272},[2743,2747,2751,2755,2760,2764,2769,2774,2779,2783,2787,2791,2795,2799,2803,2807,2811],{"type":606,"tag":636,"props":2744,"children":2745},{"style":682},[2746],{"type":612,"value":889},{"type":606,"tag":636,"props":2748,"children":2749},{"style":663},[2750],{"type":612,"value":807},{"type":606,"tag":636,"props":2752,"children":2753},{"style":651},[2754],{"type":612,"value":898},{"type":606,"tag":636,"props":2756,"children":2757},{"style":901},[2758],{"type":612,"value":2759},"\"  ",{"type":606,"tag":636,"props":2761,"children":2762},{"style":682},[2763],{"type":612,"value":909},{"type":606,"tag":636,"props":2765,"children":2766},{"style":663},[2767],{"type":612,"value":2768},"item[",{"type":606,"tag":636,"props":2770,"children":2771},{"style":901},[2772],{"type":612,"value":2773},"'name'",{"type":606,"tag":636,"props":2775,"children":2776},{"style":663},[2777],{"type":612,"value":2778},"]",{"type":606,"tag":636,"props":2780,"children":2781},{"style":682},[2782],{"type":612,"value":919},{"type":606,"tag":636,"props":2784,"children":2785},{"style":901},[2786],{"type":612,"value":1058},{"type":606,"tag":636,"props":2788,"children":2789},{"style":682},[2790],{"type":612,"value":909},{"type":606,"tag":636,"props":2792,"children":2793},{"style":663},[2794],{"type":612,"value":2768},{"type":606,"tag":636,"props":2796,"children":2797},{"style":901},[2798],{"type":612,"value":2599},{"type":606,"tag":636,"props":2800,"children":2801},{"style":663},[2802],{"type":612,"value":2778},{"type":606,"tag":636,"props":2804,"children":2805},{"style":682},[2806],{"type":612,"value":919},{"type":606,"tag":636,"props":2808,"children":2809},{"style":901},[2810],{"type":612,"value":924},{"type":606,"tag":636,"props":2812,"children":2813},{"style":663},[2814],{"type":612,"value":859},{"type":606,"tag":1135,"props":2816,"children":2818},{"id":2817},"number-sequence-generators",[2819],{"type":612,"value":2820},"Number Sequence Generators",{"type":606,"tag":621,"props":2822,"children":2823},{},[2824],{"type":606,"tag":625,"props":2825,"children":2827},{"className":627,"code":2826,"language":629,"meta":8,"style":8},"def even_numbers(start=0, end=None):\n    current = start if start % 2 == 0 else start + 1\n    while end is None or current \u003C= end:\n        yield current\n        current += 2\n        if end is not None and current > end:\n            break\n\ndef prime_numbers(limit):\n    def is_prime(n):\n        if n \u003C 2:\n            return False\n        for i in range(2, int(n**0.5) + 1):\n            if n % i == 0:\n                return False\n        return True\n    \n    for num in range(2, limit + 1):\n        if is_prime(num):\n            yield num\n\n# Use the generators\nevens = list(even_numbers(1, 20))\nprimes = list(prime_numbers(30))\n\nprint(f\"Even numbers 1-20: {evens}\")\nprint(f\"Prime numbers up to 30: {primes}\")\n",[2828],{"type":606,"tag":632,"props":2829,"children":2830},{"__ignoreMap":8},[2831,2874,2932,2973,2985,3001,3042,3050,3057,3073,3091,3116,3129,3197,3230,3242,3255,3262,3307,3319,3331,3338,3346,3383,3413,3420,3461],{"type":606,"tag":636,"props":2832,"children":2833},{"class":638,"line":12},[2834,2838,2843,2848,2852,2857,2862,2866,2870],{"type":606,"tag":636,"props":2835,"children":2836},{"style":651},[2837],{"type":612,"value":654},{"type":606,"tag":636,"props":2839,"children":2840},{"style":657},[2841],{"type":612,"value":2842}," even_numbers",{"type":606,"tag":636,"props":2844,"children":2845},{"style":663},[2846],{"type":612,"value":2847},"(start",{"type":606,"tag":636,"props":2849,"children":2850},{"style":651},[2851],{"type":612,"value":679},{"type":606,"tag":636,"props":2853,"children":2854},{"style":682},[2855],{"type":612,"value":2856},"0",{"type":606,"tag":636,"props":2858,"children":2859},{"style":663},[2860],{"type":612,"value":2861},", end",{"type":606,"tag":636,"props":2863,"children":2864},{"style":651},[2865],{"type":612,"value":679},{"type":606,"tag":636,"props":2867,"children":2868},{"style":682},[2869],{"type":612,"value":2309},{"type":606,"tag":636,"props":2871,"children":2872},{"style":663},[2873],{"type":612,"value":2314},{"type":606,"tag":636,"props":2875,"children":2876},{"class":638,"line":27},[2877,2882,2886,2891,2895,2899,2903,2907,2911,2915,2920,2924,2928],{"type":606,"tag":636,"props":2878,"children":2879},{"style":663},[2880],{"type":612,"value":2881},"    current ",{"type":606,"tag":636,"props":2883,"children":2884},{"style":651},[2885],{"type":612,"value":679},{"type":606,"tag":636,"props":2887,"children":2888},{"style":663},[2889],{"type":612,"value":2890}," start ",{"type":606,"tag":636,"props":2892,"children":2893},{"style":651},[2894],{"type":612,"value":1798},{"type":606,"tag":636,"props":2896,"children":2897},{"style":663},[2898],{"type":612,"value":2890},{"type":606,"tag":636,"props":2900,"children":2901},{"style":651},[2902],{"type":612,"value":1807},{"type":606,"tag":636,"props":2904,"children":2905},{"style":682},[2906],{"type":612,"value":1812},{"type":606,"tag":636,"props":2908,"children":2909},{"style":651},[2910],{"type":612,"value":1817},{"type":606,"tag":636,"props":2912,"children":2913},{"style":682},[2914],{"type":612,"value":1244},{"type":606,"tag":636,"props":2916,"children":2917},{"style":651},[2918],{"type":612,"value":2919}," else",{"type":606,"tag":636,"props":2921,"children":2922},{"style":663},[2923],{"type":612,"value":2890},{"type":606,"tag":636,"props":2925,"children":2926},{"style":651},[2927],{"type":612,"value":1310},{"type":606,"tag":636,"props":2929,"children":2930},{"style":682},[2931],{"type":612,"value":685},{"type":606,"tag":636,"props":2933,"children":2934},{"class":638,"line":36},[2935,2939,2944,2949,2954,2959,2964,2968],{"type":606,"tag":636,"props":2936,"children":2937},{"style":651},[2938],{"type":612,"value":693},{"type":606,"tag":636,"props":2940,"children":2941},{"style":663},[2942],{"type":612,"value":2943}," end ",{"type":606,"tag":636,"props":2945,"children":2946},{"style":651},[2947],{"type":612,"value":2948},"is",{"type":606,"tag":636,"props":2950,"children":2951},{"style":682},[2952],{"type":612,"value":2953}," None",{"type":606,"tag":636,"props":2955,"children":2956},{"style":651},[2957],{"type":612,"value":2958}," or",{"type":606,"tag":636,"props":2960,"children":2961},{"style":663},[2962],{"type":612,"value":2963}," current ",{"type":606,"tag":636,"props":2965,"children":2966},{"style":651},[2967],{"type":612,"value":703},{"type":606,"tag":636,"props":2969,"children":2970},{"style":663},[2971],{"type":612,"value":2972}," end:\n",{"type":606,"tag":636,"props":2974,"children":2975},{"class":638,"line":45},[2976,2980],{"type":606,"tag":636,"props":2977,"children":2978},{"style":651},[2979],{"type":612,"value":716},{"type":606,"tag":636,"props":2981,"children":2982},{"style":663},[2983],{"type":612,"value":2984}," current\n",{"type":606,"tag":636,"props":2986,"children":2987},{"class":638,"line":54},[2988,2993,2997],{"type":606,"tag":636,"props":2989,"children":2990},{"style":663},[2991],{"type":612,"value":2992},"        current ",{"type":606,"tag":636,"props":2994,"children":2995},{"style":651},[2996],{"type":612,"value":734},{"type":606,"tag":636,"props":2998,"children":2999},{"style":682},[3000],{"type":612,"value":1191},{"type":606,"tag":636,"props":3002,"children":3003},{"class":638,"line":63},[3004,3008,3012,3016,3021,3025,3030,3034,3038],{"type":606,"tag":636,"props":3005,"children":3006},{"style":651},[3007],{"type":612,"value":2428},{"type":606,"tag":636,"props":3009,"children":3010},{"style":663},[3011],{"type":612,"value":2943},{"type":606,"tag":636,"props":3013,"children":3014},{"style":651},[3015],{"type":612,"value":2948},{"type":606,"tag":636,"props":3017,"children":3018},{"style":651},[3019],{"type":612,"value":3020}," not",{"type":606,"tag":636,"props":3022,"children":3023},{"style":682},[3024],{"type":612,"value":2953},{"type":606,"tag":636,"props":3026,"children":3027},{"style":651},[3028],{"type":612,"value":3029}," and",{"type":606,"tag":636,"props":3031,"children":3032},{"style":663},[3033],{"type":612,"value":2963},{"type":606,"tag":636,"props":3035,"children":3036},{"style":651},[3037],{"type":612,"value":2088},{"type":606,"tag":636,"props":3039,"children":3040},{"style":663},[3041],{"type":612,"value":2972},{"type":606,"tag":636,"props":3043,"children":3044},{"class":638,"line":72},[3045],{"type":606,"tag":636,"props":3046,"children":3047},{"style":651},[3048],{"type":612,"value":3049},"            break\n",{"type":606,"tag":636,"props":3051,"children":3052},{"class":638,"line":81},[3053],{"type":606,"tag":636,"props":3054,"children":3055},{"emptyLinePlaceholder":13},[3056],{"type":612,"value":746},{"type":606,"tag":636,"props":3058,"children":3059},{"class":638,"line":757},[3060,3064,3069],{"type":606,"tag":636,"props":3061,"children":3062},{"style":651},[3063],{"type":612,"value":654},{"type":606,"tag":636,"props":3065,"children":3066},{"style":657},[3067],{"type":612,"value":3068}," prime_numbers",{"type":606,"tag":636,"props":3070,"children":3071},{"style":663},[3072],{"type":612,"value":1227},{"type":606,"tag":636,"props":3074,"children":3075},{"class":638,"line":99},[3076,3081,3086],{"type":606,"tag":636,"props":3077,"children":3078},{"style":651},[3079],{"type":612,"value":3080},"    def",{"type":606,"tag":636,"props":3082,"children":3083},{"style":657},[3084],{"type":612,"value":3085}," is_prime",{"type":606,"tag":636,"props":3087,"children":3088},{"style":663},[3089],{"type":612,"value":3090},"(n):\n",{"type":606,"tag":636,"props":3092,"children":3093},{"class":638,"line":108},[3094,3098,3103,3107,3111],{"type":606,"tag":636,"props":3095,"children":3096},{"style":651},[3097],{"type":612,"value":2428},{"type":606,"tag":636,"props":3099,"children":3100},{"style":663},[3101],{"type":612,"value":3102}," n ",{"type":606,"tag":636,"props":3104,"children":3105},{"style":651},[3106],{"type":612,"value":1271},{"type":606,"tag":636,"props":3108,"children":3109},{"style":682},[3110],{"type":612,"value":1812},{"type":606,"tag":636,"props":3112,"children":3113},{"style":663},[3114],{"type":612,"value":3115},":\n",{"type":606,"tag":636,"props":3117,"children":3118},{"class":638,"line":117},[3119,3124],{"type":606,"tag":636,"props":3120,"children":3121},{"style":651},[3122],{"type":612,"value":3123},"            return",{"type":606,"tag":636,"props":3125,"children":3126},{"style":682},[3127],{"type":612,"value":3128}," False\n",{"type":606,"tag":636,"props":3130,"children":3131},{"class":638,"line":126},[3132,3137,3142,3146,3150,3154,3158,3162,3166,3171,3175,3180,3184,3188,3193],{"type":606,"tag":636,"props":3133,"children":3134},{"style":651},[3135],{"type":612,"value":3136},"        for",{"type":606,"tag":636,"props":3138,"children":3139},{"style":663},[3140],{"type":612,"value":3141}," i ",{"type":606,"tag":636,"props":3143,"children":3144},{"style":651},[3145],{"type":612,"value":797},{"type":606,"tag":636,"props":3147,"children":3148},{"style":682},[3149],{"type":612,"value":802},{"type":606,"tag":636,"props":3151,"children":3152},{"style":663},[3153],{"type":612,"value":807},{"type":606,"tag":636,"props":3155,"children":3156},{"style":682},[3157],{"type":612,"value":782},{"type":606,"tag":636,"props":3159,"children":3160},{"style":663},[3161],{"type":612,"value":1249},{"type":606,"tag":636,"props":3163,"children":3164},{"style":682},[3165],{"type":612,"value":2512},{"type":606,"tag":636,"props":3167,"children":3168},{"style":663},[3169],{"type":612,"value":3170},"(n",{"type":606,"tag":636,"props":3172,"children":3173},{"style":651},[3174],{"type":612,"value":777},{"type":606,"tag":636,"props":3176,"children":3177},{"style":682},[3178],{"type":612,"value":3179},"0.5",{"type":606,"tag":636,"props":3181,"children":3182},{"style":663},[3183],{"type":612,"value":1793},{"type":606,"tag":636,"props":3185,"children":3186},{"style":651},[3187],{"type":612,"value":1310},{"type":606,"tag":636,"props":3189,"children":3190},{"style":682},[3191],{"type":612,"value":3192}," 1",{"type":606,"tag":636,"props":3194,"children":3195},{"style":663},[3196],{"type":612,"value":2314},{"type":606,"tag":636,"props":3198,"children":3199},{"class":638,"line":135},[3200,3205,3209,3213,3217,3222,3226],{"type":606,"tag":636,"props":3201,"children":3202},{"style":651},[3203],{"type":612,"value":3204},"            if",{"type":606,"tag":636,"props":3206,"children":3207},{"style":663},[3208],{"type":612,"value":3102},{"type":606,"tag":636,"props":3210,"children":3211},{"style":651},[3212],{"type":612,"value":1807},{"type":606,"tag":636,"props":3214,"children":3215},{"style":663},[3216],{"type":612,"value":3141},{"type":606,"tag":636,"props":3218,"children":3219},{"style":651},[3220],{"type":612,"value":3221},"==",{"type":606,"tag":636,"props":3223,"children":3224},{"style":682},[3225],{"type":612,"value":1244},{"type":606,"tag":636,"props":3227,"children":3228},{"style":663},[3229],{"type":612,"value":3115},{"type":606,"tag":636,"props":3231,"children":3232},{"class":638,"line":144},[3233,3238],{"type":606,"tag":636,"props":3234,"children":3235},{"style":651},[3236],{"type":612,"value":3237},"                return",{"type":606,"tag":636,"props":3239,"children":3240},{"style":682},[3241],{"type":612,"value":3128},{"type":606,"tag":636,"props":3243,"children":3244},{"class":638,"line":153},[3245,3250],{"type":606,"tag":636,"props":3246,"children":3247},{"style":651},[3248],{"type":612,"value":3249},"        return",{"type":606,"tag":636,"props":3251,"children":3252},{"style":682},[3253],{"type":612,"value":3254}," True\n",{"type":606,"tag":636,"props":3256,"children":3257},{"class":638,"line":163},[3258],{"type":606,"tag":636,"props":3259,"children":3260},{"style":663},[3261],{"type":612,"value":2400},{"type":606,"tag":636,"props":3263,"children":3264},{"class":638,"line":172},[3265,3269,3274,3278,3282,3286,3290,3295,3299,3303],{"type":606,"tag":636,"props":3266,"children":3267},{"style":651},[3268],{"type":612,"value":1391},{"type":606,"tag":636,"props":3270,"children":3271},{"style":663},[3272],{"type":612,"value":3273}," num ",{"type":606,"tag":636,"props":3275,"children":3276},{"style":651},[3277],{"type":612,"value":797},{"type":606,"tag":636,"props":3279,"children":3280},{"style":682},[3281],{"type":612,"value":802},{"type":606,"tag":636,"props":3283,"children":3284},{"style":663},[3285],{"type":612,"value":807},{"type":606,"tag":636,"props":3287,"children":3288},{"style":682},[3289],{"type":612,"value":782},{"type":606,"tag":636,"props":3291,"children":3292},{"style":663},[3293],{"type":612,"value":3294},", limit ",{"type":606,"tag":636,"props":3296,"children":3297},{"style":651},[3298],{"type":612,"value":1310},{"type":606,"tag":636,"props":3300,"children":3301},{"style":682},[3302],{"type":612,"value":3192},{"type":606,"tag":636,"props":3304,"children":3305},{"style":663},[3306],{"type":612,"value":2314},{"type":606,"tag":636,"props":3308,"children":3309},{"class":638,"line":181},[3310,3314],{"type":606,"tag":636,"props":3311,"children":3312},{"style":651},[3313],{"type":612,"value":2428},{"type":606,"tag":636,"props":3315,"children":3316},{"style":663},[3317],{"type":612,"value":3318}," is_prime(num):\n",{"type":606,"tag":636,"props":3320,"children":3321},{"class":638,"line":190},[3322,3326],{"type":606,"tag":636,"props":3323,"children":3324},{"style":651},[3325],{"type":612,"value":2477},{"type":606,"tag":636,"props":3327,"children":3328},{"style":663},[3329],{"type":612,"value":3330}," num\n",{"type":606,"tag":636,"props":3332,"children":3333},{"class":638,"line":199},[3334],{"type":606,"tag":636,"props":3335,"children":3336},{"emptyLinePlaceholder":13},[3337],{"type":612,"value":746},{"type":606,"tag":636,"props":3339,"children":3340},{"class":638,"line":208},[3341],{"type":606,"tag":636,"props":3342,"children":3343},{"style":642},[3344],{"type":612,"value":3345},"# Use the generators\n",{"type":606,"tag":636,"props":3347,"children":3348},{"class":638,"line":217},[3349,3354,3358,3362,3367,3371,3375,3379],{"type":606,"tag":636,"props":3350,"children":3351},{"style":663},[3352],{"type":612,"value":3353},"evens ",{"type":606,"tag":636,"props":3355,"children":3356},{"style":651},[3357],{"type":612,"value":679},{"type":606,"tag":636,"props":3359,"children":3360},{"style":682},[3361],{"type":612,"value":960},{"type":606,"tag":636,"props":3363,"children":3364},{"style":663},[3365],{"type":612,"value":3366},"(even_numbers(",{"type":606,"tag":636,"props":3368,"children":3369},{"style":682},[3370],{"type":612,"value":1963},{"type":606,"tag":636,"props":3372,"children":3373},{"style":663},[3374],{"type":612,"value":1249},{"type":606,"tag":636,"props":3376,"children":3377},{"style":682},[3378],{"type":612,"value":1507},{"type":606,"tag":636,"props":3380,"children":3381},{"style":663},[3382],{"type":612,"value":817},{"type":606,"tag":636,"props":3384,"children":3385},{"class":638,"line":227},[3386,3391,3395,3399,3404,3409],{"type":606,"tag":636,"props":3387,"children":3388},{"style":663},[3389],{"type":612,"value":3390},"primes ",{"type":606,"tag":636,"props":3392,"children":3393},{"style":651},[3394],{"type":612,"value":679},{"type":606,"tag":636,"props":3396,"children":3397},{"style":682},[3398],{"type":612,"value":960},{"type":606,"tag":636,"props":3400,"children":3401},{"style":663},[3402],{"type":612,"value":3403},"(prime_numbers(",{"type":606,"tag":636,"props":3405,"children":3406},{"style":682},[3407],{"type":612,"value":3408},"30",{"type":606,"tag":636,"props":3410,"children":3411},{"style":663},[3412],{"type":612,"value":817},{"type":606,"tag":636,"props":3414,"children":3415},{"class":638,"line":236},[3416],{"type":606,"tag":636,"props":3417,"children":3418},{"emptyLinePlaceholder":13},[3419],{"type":612,"value":746},{"type":606,"tag":636,"props":3421,"children":3422},{"class":638,"line":245},[3423,3427,3431,3435,3440,3444,3449,3453,3457],{"type":606,"tag":636,"props":3424,"children":3425},{"style":682},[3426],{"type":612,"value":973},{"type":606,"tag":636,"props":3428,"children":3429},{"style":663},[3430],{"type":612,"value":807},{"type":606,"tag":636,"props":3432,"children":3433},{"style":651},[3434],{"type":612,"value":898},{"type":606,"tag":636,"props":3436,"children":3437},{"style":901},[3438],{"type":612,"value":3439},"\"Even numbers 1-20: ",{"type":606,"tag":636,"props":3441,"children":3442},{"style":682},[3443],{"type":612,"value":909},{"type":606,"tag":636,"props":3445,"children":3446},{"style":663},[3447],{"type":612,"value":3448},"evens",{"type":606,"tag":636,"props":3450,"children":3451},{"style":682},[3452],{"type":612,"value":919},{"type":606,"tag":636,"props":3454,"children":3455},{"style":901},[3456],{"type":612,"value":924},{"type":606,"tag":636,"props":3458,"children":3459},{"style":663},[3460],{"type":612,"value":859},{"type":606,"tag":636,"props":3462,"children":3463},{"class":638,"line":254},[3464,3468,3472,3476,3481,3485,3490,3494,3498],{"type":606,"tag":636,"props":3465,"children":3466},{"style":682},[3467],{"type":612,"value":973},{"type":606,"tag":636,"props":3469,"children":3470},{"style":663},[3471],{"type":612,"value":807},{"type":606,"tag":636,"props":3473,"children":3474},{"style":651},[3475],{"type":612,"value":898},{"type":606,"tag":636,"props":3477,"children":3478},{"style":901},[3479],{"type":612,"value":3480},"\"Prime numbers up to 30: ",{"type":606,"tag":636,"props":3482,"children":3483},{"style":682},[3484],{"type":612,"value":909},{"type":606,"tag":636,"props":3486,"children":3487},{"style":663},[3488],{"type":612,"value":3489},"primes",{"type":606,"tag":636,"props":3491,"children":3492},{"style":682},[3493],{"type":612,"value":919},{"type":606,"tag":636,"props":3495,"children":3496},{"style":901},[3497],{"type":612,"value":924},{"type":606,"tag":636,"props":3499,"children":3500},{"style":663},[3501],{"type":612,"value":859},{"type":606,"tag":1135,"props":3503,"children":3505},{"id":3504},"data-processing-pipeline",[3506],{"type":612,"value":3507},"Data Processing Pipeline",{"type":606,"tag":621,"props":3509,"children":3510},{},[3511],{"type":606,"tag":625,"props":3512,"children":3514},{"className":627,"code":3513,"language":629,"meta":8,"style":8},"def load_data():\n    # Simulate loading data\n    raw_data = [\n        \"  Alice,30,Engineer  \",\n        \"  Bob,25,Designer  \",\n        \"  Charlie,35,Manager  \",\n        \"  Diana,28,Developer  \"\n    ]\n    for item in raw_data:\n        yield item\n\ndef clean_data(data_gen):\n    for item in data_gen:\n        cleaned = item.strip()\n        if cleaned:\n            yield cleaned\n\ndef parse_data(data_gen):\n    for item in data_gen:\n        parts = item.split(',')\n        if len(parts) == 3:\n            yield {\n                'name': parts[0],\n                'age': int(parts[1]),\n                'role': parts[2]\n            }\n\ndef filter_by_age(data_gen, min_age=25):\n    for person in data_gen:\n        if person['age'] >= min_age:\n            yield person\n\n# Create data processing pipeline\nraw = load_data()\ncleaned = clean_data(raw)\nparsed = parse_data(cleaned)\nfiltered = filter_by_age(parsed, min_age=28)\n\nprint(\"Filtered results:\")\nfor person in filtered:\n    print(f\"  {person['name']} ({person['age']}) - {person['role']}\")\n",[3515],{"type":606,"tag":632,"props":3516,"children":3517},{"__ignoreMap":8},[3518,3534,3542,3558,3570,3582,3594,3602,3609,3629,3640,3647,3664,3684,3701,3713,3725,3732,3748,3767,3792,3822,3833,3854,3884,3904,3911,3918,3948,3968,3999,4011,4018,4026,4043,4060,4077,4111,4118,4138,4158],{"type":606,"tag":636,"props":3519,"children":3520},{"class":638,"line":12},[3521,3525,3530],{"type":606,"tag":636,"props":3522,"children":3523},{"style":651},[3524],{"type":612,"value":654},{"type":606,"tag":636,"props":3526,"children":3527},{"style":657},[3528],{"type":612,"value":3529}," load_data",{"type":606,"tag":636,"props":3531,"children":3532},{"style":663},[3533],{"type":612,"value":1167},{"type":606,"tag":636,"props":3535,"children":3536},{"class":638,"line":27},[3537],{"type":606,"tag":636,"props":3538,"children":3539},{"style":642},[3540],{"type":612,"value":3541},"    # Simulate loading data\n",{"type":606,"tag":636,"props":3543,"children":3544},{"class":638,"line":36},[3545,3550,3554],{"type":606,"tag":636,"props":3546,"children":3547},{"style":663},[3548],{"type":612,"value":3549},"    raw_data ",{"type":606,"tag":636,"props":3551,"children":3552},{"style":651},[3553],{"type":612,"value":679},{"type":606,"tag":636,"props":3555,"children":3556},{"style":663},[3557],{"type":612,"value":2339},{"type":606,"tag":636,"props":3559,"children":3560},{"class":638,"line":45},[3561,3566],{"type":606,"tag":636,"props":3562,"children":3563},{"style":901},[3564],{"type":612,"value":3565},"        \"  Alice,30,Engineer  \"",{"type":606,"tag":636,"props":3567,"children":3568},{"style":663},[3569],{"type":612,"value":2352},{"type":606,"tag":636,"props":3571,"children":3572},{"class":638,"line":54},[3573,3578],{"type":606,"tag":636,"props":3574,"children":3575},{"style":901},[3576],{"type":612,"value":3577},"        \"  Bob,25,Designer  \"",{"type":606,"tag":636,"props":3579,"children":3580},{"style":663},[3581],{"type":612,"value":2352},{"type":606,"tag":636,"props":3583,"children":3584},{"class":638,"line":63},[3585,3590],{"type":606,"tag":636,"props":3586,"children":3587},{"style":901},[3588],{"type":612,"value":3589},"        \"  Charlie,35,Manager  \"",{"type":606,"tag":636,"props":3591,"children":3592},{"style":663},[3593],{"type":612,"value":2352},{"type":606,"tag":636,"props":3595,"children":3596},{"class":638,"line":72},[3597],{"type":606,"tag":636,"props":3598,"children":3599},{"style":901},[3600],{"type":612,"value":3601},"        \"  Diana,28,Developer  \"\n",{"type":606,"tag":636,"props":3603,"children":3604},{"class":638,"line":81},[3605],{"type":606,"tag":636,"props":3606,"children":3607},{"style":663},[3608],{"type":612,"value":2392},{"type":606,"tag":636,"props":3610,"children":3611},{"class":638,"line":757},[3612,3616,3620,3624],{"type":606,"tag":636,"props":3613,"children":3614},{"style":651},[3615],{"type":612,"value":1391},{"type":606,"tag":636,"props":3617,"children":3618},{"style":663},[3619],{"type":612,"value":2573},{"type":606,"tag":636,"props":3621,"children":3622},{"style":651},[3623],{"type":612,"value":797},{"type":606,"tag":636,"props":3625,"children":3626},{"style":663},[3627],{"type":612,"value":3628}," raw_data:\n",{"type":606,"tag":636,"props":3630,"children":3631},{"class":638,"line":99},[3632,3636],{"type":606,"tag":636,"props":3633,"children":3634},{"style":651},[3635],{"type":612,"value":716},{"type":606,"tag":636,"props":3637,"children":3638},{"style":663},[3639],{"type":612,"value":2625},{"type":606,"tag":636,"props":3641,"children":3642},{"class":638,"line":108},[3643],{"type":606,"tag":636,"props":3644,"children":3645},{"emptyLinePlaceholder":13},[3646],{"type":612,"value":746},{"type":606,"tag":636,"props":3648,"children":3649},{"class":638,"line":117},[3650,3654,3659],{"type":606,"tag":636,"props":3651,"children":3652},{"style":651},[3653],{"type":612,"value":654},{"type":606,"tag":636,"props":3655,"children":3656},{"style":657},[3657],{"type":612,"value":3658}," clean_data",{"type":606,"tag":636,"props":3660,"children":3661},{"style":663},[3662],{"type":612,"value":3663},"(data_gen):\n",{"type":606,"tag":636,"props":3665,"children":3666},{"class":638,"line":126},[3667,3671,3675,3679],{"type":606,"tag":636,"props":3668,"children":3669},{"style":651},[3670],{"type":612,"value":1391},{"type":606,"tag":636,"props":3672,"children":3673},{"style":663},[3674],{"type":612,"value":2573},{"type":606,"tag":636,"props":3676,"children":3677},{"style":651},[3678],{"type":612,"value":797},{"type":606,"tag":636,"props":3680,"children":3681},{"style":663},[3682],{"type":612,"value":3683}," data_gen:\n",{"type":606,"tag":636,"props":3685,"children":3686},{"class":638,"line":135},[3687,3692,3696],{"type":606,"tag":636,"props":3688,"children":3689},{"style":663},[3690],{"type":612,"value":3691},"        cleaned ",{"type":606,"tag":636,"props":3693,"children":3694},{"style":651},[3695],{"type":612,"value":679},{"type":606,"tag":636,"props":3697,"children":3698},{"style":663},[3699],{"type":612,"value":3700}," item.strip()\n",{"type":606,"tag":636,"props":3702,"children":3703},{"class":638,"line":144},[3704,3708],{"type":606,"tag":636,"props":3705,"children":3706},{"style":651},[3707],{"type":612,"value":2428},{"type":606,"tag":636,"props":3709,"children":3710},{"style":663},[3711],{"type":612,"value":3712}," cleaned:\n",{"type":606,"tag":636,"props":3714,"children":3715},{"class":638,"line":153},[3716,3720],{"type":606,"tag":636,"props":3717,"children":3718},{"style":651},[3719],{"type":612,"value":2477},{"type":606,"tag":636,"props":3721,"children":3722},{"style":663},[3723],{"type":612,"value":3724}," cleaned\n",{"type":606,"tag":636,"props":3726,"children":3727},{"class":638,"line":163},[3728],{"type":606,"tag":636,"props":3729,"children":3730},{"emptyLinePlaceholder":13},[3731],{"type":612,"value":746},{"type":606,"tag":636,"props":3733,"children":3734},{"class":638,"line":172},[3735,3739,3744],{"type":606,"tag":636,"props":3736,"children":3737},{"style":651},[3738],{"type":612,"value":654},{"type":606,"tag":636,"props":3740,"children":3741},{"style":657},[3742],{"type":612,"value":3743}," parse_data",{"type":606,"tag":636,"props":3745,"children":3746},{"style":663},[3747],{"type":612,"value":3663},{"type":606,"tag":636,"props":3749,"children":3750},{"class":638,"line":181},[3751,3755,3759,3763],{"type":606,"tag":636,"props":3752,"children":3753},{"style":651},[3754],{"type":612,"value":1391},{"type":606,"tag":636,"props":3756,"children":3757},{"style":663},[3758],{"type":612,"value":2573},{"type":606,"tag":636,"props":3760,"children":3761},{"style":651},[3762],{"type":612,"value":797},{"type":606,"tag":636,"props":3764,"children":3765},{"style":663},[3766],{"type":612,"value":3683},{"type":606,"tag":636,"props":3768,"children":3769},{"class":638,"line":190},[3770,3775,3779,3784,3788],{"type":606,"tag":636,"props":3771,"children":3772},{"style":663},[3773],{"type":612,"value":3774},"        parts ",{"type":606,"tag":636,"props":3776,"children":3777},{"style":651},[3778],{"type":612,"value":679},{"type":606,"tag":636,"props":3780,"children":3781},{"style":663},[3782],{"type":612,"value":3783}," item.split(",{"type":606,"tag":636,"props":3785,"children":3786},{"style":901},[3787],{"type":612,"value":2465},{"type":606,"tag":636,"props":3789,"children":3790},{"style":663},[3791],{"type":612,"value":859},{"type":606,"tag":636,"props":3793,"children":3794},{"class":638,"line":199},[3795,3799,3804,3809,3813,3818],{"type":606,"tag":636,"props":3796,"children":3797},{"style":651},[3798],{"type":612,"value":2428},{"type":606,"tag":636,"props":3800,"children":3801},{"style":682},[3802],{"type":612,"value":3803}," len",{"type":606,"tag":636,"props":3805,"children":3806},{"style":663},[3807],{"type":612,"value":3808},"(parts) ",{"type":606,"tag":636,"props":3810,"children":3811},{"style":651},[3812],{"type":612,"value":3221},{"type":606,"tag":636,"props":3814,"children":3815},{"style":682},[3816],{"type":612,"value":3817}," 3",{"type":606,"tag":636,"props":3819,"children":3820},{"style":663},[3821],{"type":612,"value":3115},{"type":606,"tag":636,"props":3823,"children":3824},{"class":638,"line":208},[3825,3829],{"type":606,"tag":636,"props":3826,"children":3827},{"style":651},[3828],{"type":612,"value":2477},{"type":606,"tag":636,"props":3830,"children":3831},{"style":663},[3832],{"type":612,"value":2482},{"type":606,"tag":636,"props":3834,"children":3835},{"class":638,"line":217},[3836,3840,3845,3849],{"type":606,"tag":636,"props":3837,"children":3838},{"style":901},[3839],{"type":612,"value":2490},{"type":606,"tag":636,"props":3841,"children":3842},{"style":663},[3843],{"type":612,"value":3844},": parts[",{"type":606,"tag":636,"props":3846,"children":3847},{"style":682},[3848],{"type":612,"value":2856},{"type":606,"tag":636,"props":3850,"children":3851},{"style":663},[3852],{"type":612,"value":3853},"],\n",{"type":606,"tag":636,"props":3855,"children":3856},{"class":638,"line":227},[3857,3862,3866,3870,3875,3879],{"type":606,"tag":636,"props":3858,"children":3859},{"style":901},[3860],{"type":612,"value":3861},"                'age'",{"type":606,"tag":636,"props":3863,"children":3864},{"style":663},[3865],{"type":612,"value":1058},{"type":606,"tag":636,"props":3867,"children":3868},{"style":682},[3869],{"type":612,"value":2512},{"type":606,"tag":636,"props":3871,"children":3872},{"style":663},[3873],{"type":612,"value":3874},"(parts[",{"type":606,"tag":636,"props":3876,"children":3877},{"style":682},[3878],{"type":612,"value":1963},{"type":606,"tag":636,"props":3880,"children":3881},{"style":663},[3882],{"type":612,"value":3883},"]),\n",{"type":606,"tag":636,"props":3885,"children":3886},{"class":638,"line":236},[3887,3892,3896,3900],{"type":606,"tag":636,"props":3888,"children":3889},{"style":901},[3890],{"type":612,"value":3891},"                'role'",{"type":606,"tag":636,"props":3893,"children":3894},{"style":663},[3895],{"type":612,"value":3844},{"type":606,"tag":636,"props":3897,"children":3898},{"style":682},[3899],{"type":612,"value":782},{"type":606,"tag":636,"props":3901,"children":3902},{"style":663},[3903],{"type":612,"value":1383},{"type":606,"tag":636,"props":3905,"children":3906},{"class":638,"line":245},[3907],{"type":606,"tag":636,"props":3908,"children":3909},{"style":663},[3910],{"type":612,"value":2525},{"type":606,"tag":636,"props":3912,"children":3913},{"class":638,"line":254},[3914],{"type":606,"tag":636,"props":3915,"children":3916},{"emptyLinePlaceholder":13},[3917],{"type":612,"value":746},{"type":606,"tag":636,"props":3919,"children":3920},{"class":638,"line":263},[3921,3925,3930,3935,3939,3944],{"type":606,"tag":636,"props":3922,"children":3923},{"style":651},[3924],{"type":612,"value":654},{"type":606,"tag":636,"props":3926,"children":3927},{"style":657},[3928],{"type":612,"value":3929}," filter_by_age",{"type":606,"tag":636,"props":3931,"children":3932},{"style":663},[3933],{"type":612,"value":3934},"(data_gen, min_age",{"type":606,"tag":636,"props":3936,"children":3937},{"style":651},[3938],{"type":612,"value":679},{"type":606,"tag":636,"props":3940,"children":3941},{"style":682},[3942],{"type":612,"value":3943},"25",{"type":606,"tag":636,"props":3945,"children":3946},{"style":663},[3947],{"type":612,"value":2314},{"type":606,"tag":636,"props":3949,"children":3950},{"class":638,"line":272},[3951,3955,3960,3964],{"type":606,"tag":636,"props":3952,"children":3953},{"style":651},[3954],{"type":612,"value":1391},{"type":606,"tag":636,"props":3956,"children":3957},{"style":663},[3958],{"type":612,"value":3959}," person ",{"type":606,"tag":636,"props":3961,"children":3962},{"style":651},[3963],{"type":612,"value":797},{"type":606,"tag":636,"props":3965,"children":3966},{"style":663},[3967],{"type":612,"value":3683},{"type":606,"tag":636,"props":3969,"children":3970},{"class":638,"line":281},[3971,3975,3980,3985,3989,3994],{"type":606,"tag":636,"props":3972,"children":3973},{"style":651},[3974],{"type":612,"value":2428},{"type":606,"tag":636,"props":3976,"children":3977},{"style":663},[3978],{"type":612,"value":3979}," person[",{"type":606,"tag":636,"props":3981,"children":3982},{"style":901},[3983],{"type":612,"value":3984},"'age'",{"type":606,"tag":636,"props":3986,"children":3987},{"style":663},[3988],{"type":612,"value":2604},{"type":606,"tag":636,"props":3990,"children":3991},{"style":651},[3992],{"type":612,"value":3993},">=",{"type":606,"tag":636,"props":3995,"children":3996},{"style":663},[3997],{"type":612,"value":3998}," min_age:\n",{"type":606,"tag":636,"props":4000,"children":4001},{"class":638,"line":291},[4002,4006],{"type":606,"tag":636,"props":4003,"children":4004},{"style":651},[4005],{"type":612,"value":2477},{"type":606,"tag":636,"props":4007,"children":4008},{"style":663},[4009],{"type":612,"value":4010}," person\n",{"type":606,"tag":636,"props":4012,"children":4013},{"class":638,"line":302},[4014],{"type":606,"tag":636,"props":4015,"children":4016},{"emptyLinePlaceholder":13},[4017],{"type":612,"value":746},{"type":606,"tag":636,"props":4019,"children":4020},{"class":638,"line":311},[4021],{"type":606,"tag":636,"props":4022,"children":4023},{"style":642},[4024],{"type":612,"value":4025},"# Create data processing pipeline\n",{"type":606,"tag":636,"props":4027,"children":4028},{"class":638,"line":320},[4029,4034,4038],{"type":606,"tag":636,"props":4030,"children":4031},{"style":663},[4032],{"type":612,"value":4033},"raw ",{"type":606,"tag":636,"props":4035,"children":4036},{"style":651},[4037],{"type":612,"value":679},{"type":606,"tag":636,"props":4039,"children":4040},{"style":663},[4041],{"type":612,"value":4042}," load_data()\n",{"type":606,"tag":636,"props":4044,"children":4045},{"class":638,"line":329},[4046,4051,4055],{"type":606,"tag":636,"props":4047,"children":4048},{"style":663},[4049],{"type":612,"value":4050},"cleaned ",{"type":606,"tag":636,"props":4052,"children":4053},{"style":651},[4054],{"type":612,"value":679},{"type":606,"tag":636,"props":4056,"children":4057},{"style":663},[4058],{"type":612,"value":4059}," clean_data(raw)\n",{"type":606,"tag":636,"props":4061,"children":4062},{"class":638,"line":338},[4063,4068,4072],{"type":606,"tag":636,"props":4064,"children":4065},{"style":663},[4066],{"type":612,"value":4067},"parsed ",{"type":606,"tag":636,"props":4069,"children":4070},{"style":651},[4071],{"type":612,"value":679},{"type":606,"tag":636,"props":4073,"children":4074},{"style":663},[4075],{"type":612,"value":4076}," parse_data(cleaned)\n",{"type":606,"tag":636,"props":4078,"children":4079},{"class":638,"line":347},[4080,4084,4088,4093,4098,4102,4107],{"type":606,"tag":636,"props":4081,"children":4082},{"style":663},[4083],{"type":612,"value":2050},{"type":606,"tag":636,"props":4085,"children":4086},{"style":651},[4087],{"type":612,"value":679},{"type":606,"tag":636,"props":4089,"children":4090},{"style":663},[4091],{"type":612,"value":4092}," filter_by_age(parsed, ",{"type":606,"tag":636,"props":4094,"children":4095},{"style":2677},[4096],{"type":612,"value":4097},"min_age",{"type":606,"tag":636,"props":4099,"children":4100},{"style":651},[4101],{"type":612,"value":679},{"type":606,"tag":636,"props":4103,"children":4104},{"style":682},[4105],{"type":612,"value":4106},"28",{"type":606,"tag":636,"props":4108,"children":4109},{"style":663},[4110],{"type":612,"value":859},{"type":606,"tag":636,"props":4112,"children":4113},{"class":638,"line":356},[4114],{"type":606,"tag":636,"props":4115,"children":4116},{"emptyLinePlaceholder":13},[4117],{"type":612,"value":746},{"type":606,"tag":636,"props":4119,"children":4120},{"class":638,"line":367},[4121,4125,4129,4134],{"type":606,"tag":636,"props":4122,"children":4123},{"style":682},[4124],{"type":612,"value":973},{"type":606,"tag":636,"props":4126,"children":4127},{"style":663},[4128],{"type":612,"value":807},{"type":606,"tag":636,"props":4130,"children":4131},{"style":901},[4132],{"type":612,"value":4133},"\"Filtered results:\"",{"type":606,"tag":636,"props":4135,"children":4136},{"style":663},[4137],{"type":612,"value":859},{"type":606,"tag":636,"props":4139,"children":4140},{"class":638,"line":376},[4141,4145,4149,4153],{"type":606,"tag":636,"props":4142,"children":4143},{"style":651},[4144],{"type":612,"value":867},{"type":606,"tag":636,"props":4146,"children":4147},{"style":663},[4148],{"type":612,"value":3959},{"type":606,"tag":636,"props":4150,"children":4151},{"style":651},[4152],{"type":612,"value":797},{"type":606,"tag":636,"props":4154,"children":4155},{"style":663},[4156],{"type":612,"value":4157}," filtered:\n",{"type":606,"tag":636,"props":4159,"children":4160},{"class":638,"line":385},[4161,4165,4169,4173,4177,4181,4186,4190,4194,4198,4203,4207,4211,4215,4219,4223,4228,4232,4236,4241,4245,4249,4253],{"type":606,"tag":636,"props":4162,"children":4163},{"style":682},[4164],{"type":612,"value":889},{"type":606,"tag":636,"props":4166,"children":4167},{"style":663},[4168],{"type":612,"value":807},{"type":606,"tag":636,"props":4170,"children":4171},{"style":651},[4172],{"type":612,"value":898},{"type":606,"tag":636,"props":4174,"children":4175},{"style":901},[4176],{"type":612,"value":2759},{"type":606,"tag":636,"props":4178,"children":4179},{"style":682},[4180],{"type":612,"value":909},{"type":606,"tag":636,"props":4182,"children":4183},{"style":663},[4184],{"type":612,"value":4185},"person[",{"type":606,"tag":636,"props":4187,"children":4188},{"style":901},[4189],{"type":612,"value":2773},{"type":606,"tag":636,"props":4191,"children":4192},{"style":663},[4193],{"type":612,"value":2778},{"type":606,"tag":636,"props":4195,"children":4196},{"style":682},[4197],{"type":612,"value":919},{"type":606,"tag":636,"props":4199,"children":4200},{"style":901},[4201],{"type":612,"value":4202}," (",{"type":606,"tag":636,"props":4204,"children":4205},{"style":682},[4206],{"type":612,"value":909},{"type":606,"tag":636,"props":4208,"children":4209},{"style":663},[4210],{"type":612,"value":4185},{"type":606,"tag":636,"props":4212,"children":4213},{"style":901},[4214],{"type":612,"value":3984},{"type":606,"tag":636,"props":4216,"children":4217},{"style":663},[4218],{"type":612,"value":2778},{"type":606,"tag":636,"props":4220,"children":4221},{"style":682},[4222],{"type":612,"value":919},{"type":606,"tag":636,"props":4224,"children":4225},{"style":901},[4226],{"type":612,"value":4227},") - ",{"type":606,"tag":636,"props":4229,"children":4230},{"style":682},[4231],{"type":612,"value":909},{"type":606,"tag":636,"props":4233,"children":4234},{"style":663},[4235],{"type":612,"value":4185},{"type":606,"tag":636,"props":4237,"children":4238},{"style":901},[4239],{"type":612,"value":4240},"'role'",{"type":606,"tag":636,"props":4242,"children":4243},{"style":663},[4244],{"type":612,"value":2778},{"type":606,"tag":636,"props":4246,"children":4247},{"style":682},[4248],{"type":612,"value":919},{"type":606,"tag":636,"props":4250,"children":4251},{"style":901},[4252],{"type":612,"value":924},{"type":606,"tag":636,"props":4254,"children":4255},{"style":663},[4256],{"type":612,"value":859},{"type":606,"tag":1009,"props":4258,"children":4260},{"id":4259},"generator-methods-reference",[4261],{"type":612,"value":4262},"📊 Generator Methods Reference",{"type":606,"tag":2141,"props":4264,"children":4265},{},[4266,4287],{"type":606,"tag":2145,"props":4267,"children":4268},{},[4269],{"type":606,"tag":2149,"props":4270,"children":4271},{},[4272,4277,4282],{"type":606,"tag":2153,"props":4273,"children":4274},{},[4275],{"type":612,"value":4276},"Method",{"type":606,"tag":2153,"props":4278,"children":4279},{},[4280],{"type":612,"value":4281},"Purpose",{"type":606,"tag":2153,"props":4283,"children":4284},{},[4285],{"type":612,"value":4286},"Example",{"type":606,"tag":2169,"props":4288,"children":4289},{},[4290,4316,4342,4368],{"type":606,"tag":2149,"props":4291,"children":4292},{},[4293,4302,4307],{"type":606,"tag":2176,"props":4294,"children":4295},{},[4296],{"type":606,"tag":632,"props":4297,"children":4299},{"className":4298},[],[4300],{"type":612,"value":4301},"next()",{"type":606,"tag":2176,"props":4303,"children":4304},{},[4305],{"type":612,"value":4306},"Get next value",{"type":606,"tag":2176,"props":4308,"children":4309},{},[4310],{"type":606,"tag":632,"props":4311,"children":4313},{"className":4312},[],[4314],{"type":612,"value":4315},"next(generator)",{"type":606,"tag":2149,"props":4317,"children":4318},{},[4319,4328,4333],{"type":606,"tag":2176,"props":4320,"children":4321},{},[4322],{"type":606,"tag":632,"props":4323,"children":4325},{"className":4324},[],[4326],{"type":612,"value":4327},"list()",{"type":606,"tag":2176,"props":4329,"children":4330},{},[4331],{"type":612,"value":4332},"Convert to list",{"type":606,"tag":2176,"props":4334,"children":4335},{},[4336],{"type":606,"tag":632,"props":4337,"children":4339},{"className":4338},[],[4340],{"type":612,"value":4341},"list(generator)",{"type":606,"tag":2149,"props":4343,"children":4344},{},[4345,4354,4359],{"type":606,"tag":2176,"props":4346,"children":4347},{},[4348],{"type":606,"tag":632,"props":4349,"children":4351},{"className":4350},[],[4352],{"type":612,"value":4353},"sum()",{"type":606,"tag":2176,"props":4355,"children":4356},{},[4357],{"type":612,"value":4358},"Sum all values",{"type":606,"tag":2176,"props":4360,"children":4361},{},[4362],{"type":606,"tag":632,"props":4363,"children":4365},{"className":4364},[],[4366],{"type":612,"value":4367},"sum(number_gen)",{"type":606,"tag":2149,"props":4369,"children":4370},{},[4371,4380,4385],{"type":606,"tag":2176,"props":4372,"children":4373},{},[4374],{"type":606,"tag":632,"props":4375,"children":4377},{"className":4376},[],[4378],{"type":612,"value":4379},"max()",{"type":606,"tag":2176,"props":4381,"children":4382},{},[4383],{"type":612,"value":4384},"Find maximum",{"type":606,"tag":2176,"props":4386,"children":4387},{},[4388],{"type":606,"tag":632,"props":4389,"children":4391},{"className":4390},[],[4392],{"type":612,"value":4393},"max(number_gen)",{"type":606,"tag":1009,"props":4395,"children":4397},{"id":4396},"generator-state-and-memory",[4398],{"type":612,"value":4399},"🔄 Generator State and Memory",{"type":606,"tag":621,"props":4401,"children":4402},{},[4403],{"type":606,"tag":625,"props":4404,"children":4406},{"className":627,"code":4405,"language":629,"meta":8,"style":8},"def stateful_generator():\n    print(\"Starting generator\")\n    yield 1\n    print(\"After first yield\")\n    yield 2\n    print(\"After second yield\")\n    yield 3\n    print(\"Generator finished\")\n\ndef memory_efficient_range(n):\n    # This uses constant memory regardless of n\n    current = 0\n    while current \u003C n:\n        yield current\n        current += 1\n\n# Test stateful generator\nprint(\"Testing stateful generator:\")\ngen = stateful_generator()\nprint(f\"First: {next(gen)}\")\nprint(f\"Second: {next(gen)}\")\nprint(f\"Third: {next(gen)}\")\n\n# Memory efficiency demonstration\nprint(\"\\nMemory efficient range:\")\nlarge_range = memory_efficient_range(1000000)\nfirst_five = []\nfor i, value in enumerate(large_range):\n    if i >= 5:\n        break\n    first_five.append(value)\n\nprint(f\"First 5 from large range: {first_five}\")\n",[4407],{"type":606,"tag":632,"props":4408,"children":4409},{"__ignoreMap":8},[4410,4426,4446,4457,4477,4488,4508,4519,4539,4546,4562,4570,4586,4606,4617,4632,4639,4647,4667,4683,4725,4765,4805,4812,4820,4849,4875,4892,4918,4943,4951,4959,4966],{"type":606,"tag":636,"props":4411,"children":4412},{"class":638,"line":12},[4413,4417,4422],{"type":606,"tag":636,"props":4414,"children":4415},{"style":651},[4416],{"type":612,"value":654},{"type":606,"tag":636,"props":4418,"children":4419},{"style":657},[4420],{"type":612,"value":4421}," stateful_generator",{"type":606,"tag":636,"props":4423,"children":4424},{"style":663},[4425],{"type":612,"value":1167},{"type":606,"tag":636,"props":4427,"children":4428},{"class":638,"line":27},[4429,4433,4437,4442],{"type":606,"tag":636,"props":4430,"children":4431},{"style":682},[4432],{"type":612,"value":889},{"type":606,"tag":636,"props":4434,"children":4435},{"style":663},[4436],{"type":612,"value":807},{"type":606,"tag":636,"props":4438,"children":4439},{"style":901},[4440],{"type":612,"value":4441},"\"Starting generator\"",{"type":606,"tag":636,"props":4443,"children":4444},{"style":663},[4445],{"type":612,"value":859},{"type":606,"tag":636,"props":4447,"children":4448},{"class":638,"line":36},[4449,4453],{"type":606,"tag":636,"props":4450,"children":4451},{"style":651},[4452],{"type":612,"value":1175},{"type":606,"tag":636,"props":4454,"children":4455},{"style":682},[4456],{"type":612,"value":685},{"type":606,"tag":636,"props":4458,"children":4459},{"class":638,"line":45},[4460,4464,4468,4473],{"type":606,"tag":636,"props":4461,"children":4462},{"style":682},[4463],{"type":612,"value":889},{"type":606,"tag":636,"props":4465,"children":4466},{"style":663},[4467],{"type":612,"value":807},{"type":606,"tag":636,"props":4469,"children":4470},{"style":901},[4471],{"type":612,"value":4472},"\"After first yield\"",{"type":606,"tag":636,"props":4474,"children":4475},{"style":663},[4476],{"type":612,"value":859},{"type":606,"tag":636,"props":4478,"children":4479},{"class":638,"line":54},[4480,4484],{"type":606,"tag":636,"props":4481,"children":4482},{"style":651},[4483],{"type":612,"value":1175},{"type":606,"tag":636,"props":4485,"children":4486},{"style":682},[4487],{"type":612,"value":1191},{"type":606,"tag":636,"props":4489,"children":4490},{"class":638,"line":63},[4491,4495,4499,4504],{"type":606,"tag":636,"props":4492,"children":4493},{"style":682},[4494],{"type":612,"value":889},{"type":606,"tag":636,"props":4496,"children":4497},{"style":663},[4498],{"type":612,"value":807},{"type":606,"tag":636,"props":4500,"children":4501},{"style":901},[4502],{"type":612,"value":4503},"\"After second yield\"",{"type":606,"tag":636,"props":4505,"children":4506},{"style":663},[4507],{"type":612,"value":859},{"type":606,"tag":636,"props":4509,"children":4510},{"class":638,"line":72},[4511,4515],{"type":606,"tag":636,"props":4512,"children":4513},{"style":651},[4514],{"type":612,"value":1175},{"type":606,"tag":636,"props":4516,"children":4517},{"style":682},[4518],{"type":612,"value":1203},{"type":606,"tag":636,"props":4520,"children":4521},{"class":638,"line":81},[4522,4526,4530,4535],{"type":606,"tag":636,"props":4523,"children":4524},{"style":682},[4525],{"type":612,"value":889},{"type":606,"tag":636,"props":4527,"children":4528},{"style":663},[4529],{"type":612,"value":807},{"type":606,"tag":636,"props":4531,"children":4532},{"style":901},[4533],{"type":612,"value":4534},"\"Generator finished\"",{"type":606,"tag":636,"props":4536,"children":4537},{"style":663},[4538],{"type":612,"value":859},{"type":606,"tag":636,"props":4540,"children":4541},{"class":638,"line":757},[4542],{"type":606,"tag":636,"props":4543,"children":4544},{"emptyLinePlaceholder":13},[4545],{"type":612,"value":746},{"type":606,"tag":636,"props":4547,"children":4548},{"class":638,"line":99},[4549,4553,4558],{"type":606,"tag":636,"props":4550,"children":4551},{"style":651},[4552],{"type":612,"value":654},{"type":606,"tag":636,"props":4554,"children":4555},{"style":657},[4556],{"type":612,"value":4557}," memory_efficient_range",{"type":606,"tag":636,"props":4559,"children":4560},{"style":663},[4561],{"type":612,"value":3090},{"type":606,"tag":636,"props":4563,"children":4564},{"class":638,"line":108},[4565],{"type":606,"tag":636,"props":4566,"children":4567},{"style":642},[4568],{"type":612,"value":4569},"    # This uses constant memory regardless of n\n",{"type":606,"tag":636,"props":4571,"children":4572},{"class":638,"line":117},[4573,4577,4581],{"type":606,"tag":636,"props":4574,"children":4575},{"style":663},[4576],{"type":612,"value":2881},{"type":606,"tag":636,"props":4578,"children":4579},{"style":651},[4580],{"type":612,"value":679},{"type":606,"tag":636,"props":4582,"children":4583},{"style":682},[4584],{"type":612,"value":4585}," 0\n",{"type":606,"tag":636,"props":4587,"children":4588},{"class":638,"line":126},[4589,4593,4597,4601],{"type":606,"tag":636,"props":4590,"children":4591},{"style":651},[4592],{"type":612,"value":693},{"type":606,"tag":636,"props":4594,"children":4595},{"style":663},[4596],{"type":612,"value":2963},{"type":606,"tag":636,"props":4598,"children":4599},{"style":651},[4600],{"type":612,"value":1271},{"type":606,"tag":636,"props":4602,"children":4603},{"style":663},[4604],{"type":612,"value":4605}," n:\n",{"type":606,"tag":636,"props":4607,"children":4608},{"class":638,"line":135},[4609,4613],{"type":606,"tag":636,"props":4610,"children":4611},{"style":651},[4612],{"type":612,"value":716},{"type":606,"tag":636,"props":4614,"children":4615},{"style":663},[4616],{"type":612,"value":2984},{"type":606,"tag":636,"props":4618,"children":4619},{"class":638,"line":144},[4620,4624,4628],{"type":606,"tag":636,"props":4621,"children":4622},{"style":663},[4623],{"type":612,"value":2992},{"type":606,"tag":636,"props":4625,"children":4626},{"style":651},[4627],{"type":612,"value":734},{"type":606,"tag":636,"props":4629,"children":4630},{"style":682},[4631],{"type":612,"value":685},{"type":606,"tag":636,"props":4633,"children":4634},{"class":638,"line":153},[4635],{"type":606,"tag":636,"props":4636,"children":4637},{"emptyLinePlaceholder":13},[4638],{"type":612,"value":746},{"type":606,"tag":636,"props":4640,"children":4641},{"class":638,"line":163},[4642],{"type":606,"tag":636,"props":4643,"children":4644},{"style":642},[4645],{"type":612,"value":4646},"# Test stateful generator\n",{"type":606,"tag":636,"props":4648,"children":4649},{"class":638,"line":172},[4650,4654,4658,4663],{"type":606,"tag":636,"props":4651,"children":4652},{"style":682},[4653],{"type":612,"value":973},{"type":606,"tag":636,"props":4655,"children":4656},{"style":663},[4657],{"type":612,"value":807},{"type":606,"tag":636,"props":4659,"children":4660},{"style":901},[4661],{"type":612,"value":4662},"\"Testing stateful generator:\"",{"type":606,"tag":636,"props":4664,"children":4665},{"style":663},[4666],{"type":612,"value":859},{"type":606,"tag":636,"props":4668,"children":4669},{"class":638,"line":181},[4670,4674,4678],{"type":606,"tag":636,"props":4671,"children":4672},{"style":663},[4673],{"type":612,"value":1439},{"type":606,"tag":636,"props":4675,"children":4676},{"style":651},[4677],{"type":612,"value":679},{"type":606,"tag":636,"props":4679,"children":4680},{"style":663},[4681],{"type":612,"value":4682}," stateful_generator()\n",{"type":606,"tag":636,"props":4684,"children":4685},{"class":638,"line":190},[4686,4690,4694,4698,4703,4708,4713,4717,4721],{"type":606,"tag":636,"props":4687,"children":4688},{"style":682},[4689],{"type":612,"value":973},{"type":606,"tag":636,"props":4691,"children":4692},{"style":663},[4693],{"type":612,"value":807},{"type":606,"tag":636,"props":4695,"children":4696},{"style":651},[4697],{"type":612,"value":898},{"type":606,"tag":636,"props":4699,"children":4700},{"style":901},[4701],{"type":612,"value":4702},"\"First: ",{"type":606,"tag":636,"props":4704,"children":4705},{"style":682},[4706],{"type":612,"value":4707},"{next",{"type":606,"tag":636,"props":4709,"children":4710},{"style":663},[4711],{"type":612,"value":4712},"(gen)",{"type":606,"tag":636,"props":4714,"children":4715},{"style":682},[4716],{"type":612,"value":919},{"type":606,"tag":636,"props":4718,"children":4719},{"style":901},[4720],{"type":612,"value":924},{"type":606,"tag":636,"props":4722,"children":4723},{"style":663},[4724],{"type":612,"value":859},{"type":606,"tag":636,"props":4726,"children":4727},{"class":638,"line":199},[4728,4732,4736,4740,4745,4749,4753,4757,4761],{"type":606,"tag":636,"props":4729,"children":4730},{"style":682},[4731],{"type":612,"value":973},{"type":606,"tag":636,"props":4733,"children":4734},{"style":663},[4735],{"type":612,"value":807},{"type":606,"tag":636,"props":4737,"children":4738},{"style":651},[4739],{"type":612,"value":898},{"type":606,"tag":636,"props":4741,"children":4742},{"style":901},[4743],{"type":612,"value":4744},"\"Second: ",{"type":606,"tag":636,"props":4746,"children":4747},{"style":682},[4748],{"type":612,"value":4707},{"type":606,"tag":636,"props":4750,"children":4751},{"style":663},[4752],{"type":612,"value":4712},{"type":606,"tag":636,"props":4754,"children":4755},{"style":682},[4756],{"type":612,"value":919},{"type":606,"tag":636,"props":4758,"children":4759},{"style":901},[4760],{"type":612,"value":924},{"type":606,"tag":636,"props":4762,"children":4763},{"style":663},[4764],{"type":612,"value":859},{"type":606,"tag":636,"props":4766,"children":4767},{"class":638,"line":208},[4768,4772,4776,4780,4785,4789,4793,4797,4801],{"type":606,"tag":636,"props":4769,"children":4770},{"style":682},[4771],{"type":612,"value":973},{"type":606,"tag":636,"props":4773,"children":4774},{"style":663},[4775],{"type":612,"value":807},{"type":606,"tag":636,"props":4777,"children":4778},{"style":651},[4779],{"type":612,"value":898},{"type":606,"tag":636,"props":4781,"children":4782},{"style":901},[4783],{"type":612,"value":4784},"\"Third: ",{"type":606,"tag":636,"props":4786,"children":4787},{"style":682},[4788],{"type":612,"value":4707},{"type":606,"tag":636,"props":4790,"children":4791},{"style":663},[4792],{"type":612,"value":4712},{"type":606,"tag":636,"props":4794,"children":4795},{"style":682},[4796],{"type":612,"value":919},{"type":606,"tag":636,"props":4798,"children":4799},{"style":901},[4800],{"type":612,"value":924},{"type":606,"tag":636,"props":4802,"children":4803},{"style":663},[4804],{"type":612,"value":859},{"type":606,"tag":636,"props":4806,"children":4807},{"class":638,"line":217},[4808],{"type":606,"tag":636,"props":4809,"children":4810},{"emptyLinePlaceholder":13},[4811],{"type":612,"value":746},{"type":606,"tag":636,"props":4813,"children":4814},{"class":638,"line":227},[4815],{"type":606,"tag":636,"props":4816,"children":4817},{"style":642},[4818],{"type":612,"value":4819},"# Memory efficiency demonstration\n",{"type":606,"tag":636,"props":4821,"children":4822},{"class":638,"line":236},[4823,4827,4831,4835,4840,4845],{"type":606,"tag":636,"props":4824,"children":4825},{"style":682},[4826],{"type":612,"value":973},{"type":606,"tag":636,"props":4828,"children":4829},{"style":663},[4830],{"type":612,"value":807},{"type":606,"tag":636,"props":4832,"children":4833},{"style":901},[4834],{"type":612,"value":924},{"type":606,"tag":636,"props":4836,"children":4837},{"style":682},[4838],{"type":612,"value":4839},"\\n",{"type":606,"tag":636,"props":4841,"children":4842},{"style":901},[4843],{"type":612,"value":4844},"Memory efficient range:\"",{"type":606,"tag":636,"props":4846,"children":4847},{"style":663},[4848],{"type":612,"value":859},{"type":606,"tag":636,"props":4850,"children":4851},{"class":638,"line":245},[4852,4857,4861,4866,4871],{"type":606,"tag":636,"props":4853,"children":4854},{"style":663},[4855],{"type":612,"value":4856},"large_range ",{"type":606,"tag":636,"props":4858,"children":4859},{"style":651},[4860],{"type":612,"value":679},{"type":606,"tag":636,"props":4862,"children":4863},{"style":663},[4864],{"type":612,"value":4865}," memory_efficient_range(",{"type":606,"tag":636,"props":4867,"children":4868},{"style":682},[4869],{"type":612,"value":4870},"1000000",{"type":606,"tag":636,"props":4872,"children":4873},{"style":663},[4874],{"type":612,"value":859},{"type":606,"tag":636,"props":4876,"children":4877},{"class":638,"line":254},[4878,4883,4887],{"type":606,"tag":636,"props":4879,"children":4880},{"style":663},[4881],{"type":612,"value":4882},"first_five ",{"type":606,"tag":636,"props":4884,"children":4885},{"style":651},[4886],{"type":612,"value":679},{"type":606,"tag":636,"props":4888,"children":4889},{"style":663},[4890],{"type":612,"value":4891}," []\n",{"type":606,"tag":636,"props":4893,"children":4894},{"class":638,"line":263},[4895,4899,4904,4908,4913],{"type":606,"tag":636,"props":4896,"children":4897},{"style":651},[4898],{"type":612,"value":867},{"type":606,"tag":636,"props":4900,"children":4901},{"style":663},[4902],{"type":612,"value":4903}," i, value ",{"type":606,"tag":636,"props":4905,"children":4906},{"style":651},[4907],{"type":612,"value":797},{"type":606,"tag":636,"props":4909,"children":4910},{"style":682},[4911],{"type":612,"value":4912}," enumerate",{"type":606,"tag":636,"props":4914,"children":4915},{"style":663},[4916],{"type":612,"value":4917},"(large_range):\n",{"type":606,"tag":636,"props":4919,"children":4920},{"class":638,"line":272},[4921,4926,4930,4934,4939],{"type":606,"tag":636,"props":4922,"children":4923},{"style":651},[4924],{"type":612,"value":4925},"    if",{"type":606,"tag":636,"props":4927,"children":4928},{"style":663},[4929],{"type":612,"value":3141},{"type":606,"tag":636,"props":4931,"children":4932},{"style":651},[4933],{"type":612,"value":3993},{"type":606,"tag":636,"props":4935,"children":4936},{"style":682},[4937],{"type":612,"value":4938}," 5",{"type":606,"tag":636,"props":4940,"children":4941},{"style":663},[4942],{"type":612,"value":3115},{"type":606,"tag":636,"props":4944,"children":4945},{"class":638,"line":281},[4946],{"type":606,"tag":636,"props":4947,"children":4948},{"style":651},[4949],{"type":612,"value":4950},"        break\n",{"type":606,"tag":636,"props":4952,"children":4953},{"class":638,"line":291},[4954],{"type":606,"tag":636,"props":4955,"children":4956},{"style":663},[4957],{"type":612,"value":4958},"    first_five.append(value)\n",{"type":606,"tag":636,"props":4960,"children":4961},{"class":638,"line":302},[4962],{"type":606,"tag":636,"props":4963,"children":4964},{"emptyLinePlaceholder":13},[4965],{"type":612,"value":746},{"type":606,"tag":636,"props":4967,"children":4968},{"class":638,"line":311},[4969,4973,4977,4981,4986,4990,4995,4999,5003],{"type":606,"tag":636,"props":4970,"children":4971},{"style":682},[4972],{"type":612,"value":973},{"type":606,"tag":636,"props":4974,"children":4975},{"style":663},[4976],{"type":612,"value":807},{"type":606,"tag":636,"props":4978,"children":4979},{"style":651},[4980],{"type":612,"value":898},{"type":606,"tag":636,"props":4982,"children":4983},{"style":901},[4984],{"type":612,"value":4985},"\"First 5 from large range: ",{"type":606,"tag":636,"props":4987,"children":4988},{"style":682},[4989],{"type":612,"value":909},{"type":606,"tag":636,"props":4991,"children":4992},{"style":663},[4993],{"type":612,"value":4994},"first_five",{"type":606,"tag":636,"props":4996,"children":4997},{"style":682},[4998],{"type":612,"value":919},{"type":606,"tag":636,"props":5000,"children":5001},{"style":901},[5002],{"type":612,"value":924},{"type":606,"tag":636,"props":5004,"children":5005},{"style":663},[5006],{"type":612,"value":859},{"type":606,"tag":1135,"props":5008,"children":5010},{"id":5009},"infinite-generators",[5011],{"type":612,"value":5012},"Infinite Generators",{"type":606,"tag":621,"props":5014,"children":5015},{},[5016],{"type":606,"tag":625,"props":5017,"children":5019},{"className":627,"code":5018,"language":629,"meta":8,"style":8},"def infinite_counter(start=0):\n    current = start\n    while True:\n        yield current\n        current += 1\n\ndef cycle_through_list(items):\n    while True:\n        for item in items:\n            yield item\n\n# Use infinite generators (carefully!)\ncounter = infinite_counter(10)\nfirst_ten = [next(counter) for _ in range(10)]\nprint(f\"Counter from 10: {first_ten}\")\n\ncolors = cycle_through_list(['red', 'green', 'blue'])\ncolor_sequence = [next(colors) for _ in range(8)]\nprint(f\"Color cycle: {color_sequence}\")\n",[5020],{"type":606,"tag":632,"props":5021,"children":5022},{"__ignoreMap":8},[5023,5051,5067,5083,5094,5109,5116,5133,5148,5167,5178,5185,5193,5217,5273,5314,5321,5366,5420],{"type":606,"tag":636,"props":5024,"children":5025},{"class":638,"line":12},[5026,5030,5035,5039,5043,5047],{"type":606,"tag":636,"props":5027,"children":5028},{"style":651},[5029],{"type":612,"value":654},{"type":606,"tag":636,"props":5031,"children":5032},{"style":657},[5033],{"type":612,"value":5034}," infinite_counter",{"type":606,"tag":636,"props":5036,"children":5037},{"style":663},[5038],{"type":612,"value":2847},{"type":606,"tag":636,"props":5040,"children":5041},{"style":651},[5042],{"type":612,"value":679},{"type":606,"tag":636,"props":5044,"children":5045},{"style":682},[5046],{"type":612,"value":2856},{"type":606,"tag":636,"props":5048,"children":5049},{"style":663},[5050],{"type":612,"value":2314},{"type":606,"tag":636,"props":5052,"children":5053},{"class":638,"line":27},[5054,5058,5062],{"type":606,"tag":636,"props":5055,"children":5056},{"style":663},[5057],{"type":612,"value":2881},{"type":606,"tag":636,"props":5059,"children":5060},{"style":651},[5061],{"type":612,"value":679},{"type":606,"tag":636,"props":5063,"children":5064},{"style":663},[5065],{"type":612,"value":5066}," start\n",{"type":606,"tag":636,"props":5068,"children":5069},{"class":638,"line":36},[5070,5074,5079],{"type":606,"tag":636,"props":5071,"children":5072},{"style":651},[5073],{"type":612,"value":693},{"type":606,"tag":636,"props":5075,"children":5076},{"style":682},[5077],{"type":612,"value":5078}," True",{"type":606,"tag":636,"props":5080,"children":5081},{"style":663},[5082],{"type":612,"value":3115},{"type":606,"tag":636,"props":5084,"children":5085},{"class":638,"line":45},[5086,5090],{"type":606,"tag":636,"props":5087,"children":5088},{"style":651},[5089],{"type":612,"value":716},{"type":606,"tag":636,"props":5091,"children":5092},{"style":663},[5093],{"type":612,"value":2984},{"type":606,"tag":636,"props":5095,"children":5096},{"class":638,"line":54},[5097,5101,5105],{"type":606,"tag":636,"props":5098,"children":5099},{"style":663},[5100],{"type":612,"value":2992},{"type":606,"tag":636,"props":5102,"children":5103},{"style":651},[5104],{"type":612,"value":734},{"type":606,"tag":636,"props":5106,"children":5107},{"style":682},[5108],{"type":612,"value":685},{"type":606,"tag":636,"props":5110,"children":5111},{"class":638,"line":63},[5112],{"type":606,"tag":636,"props":5113,"children":5114},{"emptyLinePlaceholder":13},[5115],{"type":612,"value":746},{"type":606,"tag":636,"props":5117,"children":5118},{"class":638,"line":72},[5119,5123,5128],{"type":606,"tag":636,"props":5120,"children":5121},{"style":651},[5122],{"type":612,"value":654},{"type":606,"tag":636,"props":5124,"children":5125},{"style":657},[5126],{"type":612,"value":5127}," cycle_through_list",{"type":606,"tag":636,"props":5129,"children":5130},{"style":663},[5131],{"type":612,"value":5132},"(items):\n",{"type":606,"tag":636,"props":5134,"children":5135},{"class":638,"line":81},[5136,5140,5144],{"type":606,"tag":636,"props":5137,"children":5138},{"style":651},[5139],{"type":612,"value":693},{"type":606,"tag":636,"props":5141,"children":5142},{"style":682},[5143],{"type":612,"value":5078},{"type":606,"tag":636,"props":5145,"children":5146},{"style":663},[5147],{"type":612,"value":3115},{"type":606,"tag":636,"props":5149,"children":5150},{"class":638,"line":757},[5151,5155,5159,5163],{"type":606,"tag":636,"props":5152,"children":5153},{"style":651},[5154],{"type":612,"value":3136},{"type":606,"tag":636,"props":5156,"children":5157},{"style":663},[5158],{"type":612,"value":2573},{"type":606,"tag":636,"props":5160,"children":5161},{"style":651},[5162],{"type":612,"value":797},{"type":606,"tag":636,"props":5164,"children":5165},{"style":663},[5166],{"type":612,"value":2582},{"type":606,"tag":636,"props":5168,"children":5169},{"class":638,"line":99},[5170,5174],{"type":606,"tag":636,"props":5171,"children":5172},{"style":651},[5173],{"type":612,"value":2477},{"type":606,"tag":636,"props":5175,"children":5176},{"style":663},[5177],{"type":612,"value":2625},{"type":606,"tag":636,"props":5179,"children":5180},{"class":638,"line":108},[5181],{"type":606,"tag":636,"props":5182,"children":5183},{"emptyLinePlaceholder":13},[5184],{"type":612,"value":746},{"type":606,"tag":636,"props":5186,"children":5187},{"class":638,"line":117},[5188],{"type":606,"tag":636,"props":5189,"children":5190},{"style":642},[5191],{"type":612,"value":5192},"# Use infinite generators (carefully!)\n",{"type":606,"tag":636,"props":5194,"children":5195},{"class":638,"line":126},[5196,5200,5204,5209,5213],{"type":606,"tag":636,"props":5197,"children":5198},{"style":663},[5199],{"type":612,"value":840},{"type":606,"tag":636,"props":5201,"children":5202},{"style":651},[5203],{"type":612,"value":679},{"type":606,"tag":636,"props":5205,"children":5206},{"style":663},[5207],{"type":612,"value":5208}," infinite_counter(",{"type":606,"tag":636,"props":5210,"children":5211},{"style":682},[5212],{"type":612,"value":1685},{"type":606,"tag":636,"props":5214,"children":5215},{"style":663},[5216],{"type":612,"value":859},{"type":606,"tag":636,"props":5218,"children":5219},{"class":638,"line":135},[5220,5225,5229,5233,5238,5243,5247,5252,5256,5260,5264,5268],{"type":606,"tag":636,"props":5221,"children":5222},{"style":663},[5223],{"type":612,"value":5224},"first_ten ",{"type":606,"tag":636,"props":5226,"children":5227},{"style":651},[5228],{"type":612,"value":679},{"type":606,"tag":636,"props":5230,"children":5231},{"style":663},[5232],{"type":612,"value":1355},{"type":606,"tag":636,"props":5234,"children":5235},{"style":682},[5236],{"type":612,"value":5237},"next",{"type":606,"tag":636,"props":5239,"children":5240},{"style":663},[5241],{"type":612,"value":5242},"(counter) ",{"type":606,"tag":636,"props":5244,"children":5245},{"style":651},[5246],{"type":612,"value":867},{"type":606,"tag":636,"props":5248,"children":5249},{"style":663},[5250],{"type":612,"value":5251}," _ ",{"type":606,"tag":636,"props":5253,"children":5254},{"style":651},[5255],{"type":612,"value":797},{"type":606,"tag":636,"props":5257,"children":5258},{"style":682},[5259],{"type":612,"value":802},{"type":606,"tag":636,"props":5261,"children":5262},{"style":663},[5263],{"type":612,"value":807},{"type":606,"tag":636,"props":5265,"children":5266},{"style":682},[5267],{"type":612,"value":1685},{"type":606,"tag":636,"props":5269,"children":5270},{"style":663},[5271],{"type":612,"value":5272},")]\n",{"type":606,"tag":636,"props":5274,"children":5275},{"class":638,"line":144},[5276,5280,5284,5288,5293,5297,5302,5306,5310],{"type":606,"tag":636,"props":5277,"children":5278},{"style":682},[5279],{"type":612,"value":973},{"type":606,"tag":636,"props":5281,"children":5282},{"style":663},[5283],{"type":612,"value":807},{"type":606,"tag":636,"props":5285,"children":5286},{"style":651},[5287],{"type":612,"value":898},{"type":606,"tag":636,"props":5289,"children":5290},{"style":901},[5291],{"type":612,"value":5292},"\"Counter from 10: ",{"type":606,"tag":636,"props":5294,"children":5295},{"style":682},[5296],{"type":612,"value":909},{"type":606,"tag":636,"props":5298,"children":5299},{"style":663},[5300],{"type":612,"value":5301},"first_ten",{"type":606,"tag":636,"props":5303,"children":5304},{"style":682},[5305],{"type":612,"value":919},{"type":606,"tag":636,"props":5307,"children":5308},{"style":901},[5309],{"type":612,"value":924},{"type":606,"tag":636,"props":5311,"children":5312},{"style":663},[5313],{"type":612,"value":859},{"type":606,"tag":636,"props":5315,"children":5316},{"class":638,"line":153},[5317],{"type":606,"tag":636,"props":5318,"children":5319},{"emptyLinePlaceholder":13},[5320],{"type":612,"value":746},{"type":606,"tag":636,"props":5322,"children":5323},{"class":638,"line":163},[5324,5329,5333,5338,5343,5347,5352,5356,5361],{"type":606,"tag":636,"props":5325,"children":5326},{"style":663},[5327],{"type":612,"value":5328},"colors ",{"type":606,"tag":636,"props":5330,"children":5331},{"style":651},[5332],{"type":612,"value":679},{"type":606,"tag":636,"props":5334,"children":5335},{"style":663},[5336],{"type":612,"value":5337}," cycle_through_list([",{"type":606,"tag":636,"props":5339,"children":5340},{"style":901},[5341],{"type":612,"value":5342},"'red'",{"type":606,"tag":636,"props":5344,"children":5345},{"style":663},[5346],{"type":612,"value":1249},{"type":606,"tag":636,"props":5348,"children":5349},{"style":901},[5350],{"type":612,"value":5351},"'green'",{"type":606,"tag":636,"props":5353,"children":5354},{"style":663},[5355],{"type":612,"value":1249},{"type":606,"tag":636,"props":5357,"children":5358},{"style":901},[5359],{"type":612,"value":5360},"'blue'",{"type":606,"tag":636,"props":5362,"children":5363},{"style":663},[5364],{"type":612,"value":5365},"])\n",{"type":606,"tag":636,"props":5367,"children":5368},{"class":638,"line":172},[5369,5374,5378,5382,5386,5391,5395,5399,5403,5407,5411,5416],{"type":606,"tag":636,"props":5370,"children":5371},{"style":663},[5372],{"type":612,"value":5373},"color_sequence ",{"type":606,"tag":636,"props":5375,"children":5376},{"style":651},[5377],{"type":612,"value":679},{"type":606,"tag":636,"props":5379,"children":5380},{"style":663},[5381],{"type":612,"value":1355},{"type":606,"tag":636,"props":5383,"children":5384},{"style":682},[5385],{"type":612,"value":5237},{"type":606,"tag":636,"props":5387,"children":5388},{"style":663},[5389],{"type":612,"value":5390},"(colors) ",{"type":606,"tag":636,"props":5392,"children":5393},{"style":651},[5394],{"type":612,"value":867},{"type":606,"tag":636,"props":5396,"children":5397},{"style":663},[5398],{"type":612,"value":5251},{"type":606,"tag":636,"props":5400,"children":5401},{"style":651},[5402],{"type":612,"value":797},{"type":606,"tag":636,"props":5404,"children":5405},{"style":682},[5406],{"type":612,"value":802},{"type":606,"tag":636,"props":5408,"children":5409},{"style":663},[5410],{"type":612,"value":807},{"type":606,"tag":636,"props":5412,"children":5413},{"style":682},[5414],{"type":612,"value":5415},"8",{"type":606,"tag":636,"props":5417,"children":5418},{"style":663},[5419],{"type":612,"value":5272},{"type":606,"tag":636,"props":5421,"children":5422},{"class":638,"line":181},[5423,5427,5431,5435,5440,5444,5449,5453,5457],{"type":606,"tag":636,"props":5424,"children":5425},{"style":682},[5426],{"type":612,"value":973},{"type":606,"tag":636,"props":5428,"children":5429},{"style":663},[5430],{"type":612,"value":807},{"type":606,"tag":636,"props":5432,"children":5433},{"style":651},[5434],{"type":612,"value":898},{"type":606,"tag":636,"props":5436,"children":5437},{"style":901},[5438],{"type":612,"value":5439},"\"Color cycle: ",{"type":606,"tag":636,"props":5441,"children":5442},{"style":682},[5443],{"type":612,"value":909},{"type":606,"tag":636,"props":5445,"children":5446},{"style":663},[5447],{"type":612,"value":5448},"color_sequence",{"type":606,"tag":636,"props":5450,"children":5451},{"style":682},[5452],{"type":612,"value":919},{"type":606,"tag":636,"props":5454,"children":5455},{"style":901},[5456],{"type":612,"value":924},{"type":606,"tag":636,"props":5458,"children":5459},{"style":663},[5460],{"type":612,"value":859},{"type":606,"tag":1135,"props":5462,"children":5464},{"id":5463},"generator-comprehensions-in-practice",[5465],{"type":612,"value":5466},"Generator Comprehensions in Practice",{"type":606,"tag":621,"props":5468,"children":5469},{},[5470],{"type":606,"tag":625,"props":5471,"children":5473},{"className":627,"code":5472,"language":629,"meta":8,"style":8},"# Data transformation with generators\ndata = [\n    {'name': 'Alice', 'score': 85},\n    {'name': 'Bob', 'score': 92},\n    {'name': 'Charlie', 'score': 78},\n    {'name': 'Diana', 'score': 96}\n]\n\n# Generator expressions for data processing\nhigh_scores = (item for item in data if item['score'] > 80)\nscore_messages = (f\"{item['name']}: {item['score']}\" for item in high_scores)\n\nprint(\"High score messages:\")\nfor message in score_messages:\n    print(f\"  {message}\")\n\n# Chaining multiple generators\nnumbers = range(20)\nevens = (x for x in numbers if x % 2 == 0)\nsquares = (x**2 for x in evens)\nlarge_squares = (x for x in squares if x > 50)\n\nprint(f\"Large even squares: {list(large_squares)}\")\n",[5474],{"type":606,"tag":632,"props":5475,"children":5476},{"__ignoreMap":8},[5477,5485,5500,5544,5585,5626,5668,5675,5682,5690,5753,5842,5849,5869,5890,5930,5937,5945,5972,6032,6072,6126,6133],{"type":606,"tag":636,"props":5478,"children":5479},{"class":638,"line":12},[5480],{"type":606,"tag":636,"props":5481,"children":5482},{"style":642},[5483],{"type":612,"value":5484},"# Data transformation with generators\n",{"type":606,"tag":636,"props":5486,"children":5487},{"class":638,"line":27},[5488,5492,5496],{"type":606,"tag":636,"props":5489,"children":5490},{"style":663},[5491],{"type":612,"value":1950},{"type":606,"tag":636,"props":5493,"children":5494},{"style":651},[5495],{"type":612,"value":679},{"type":606,"tag":636,"props":5497,"children":5498},{"style":663},[5499],{"type":612,"value":2339},{"type":606,"tag":636,"props":5501,"children":5502},{"class":638,"line":36},[5503,5508,5512,5516,5521,5525,5530,5534,5539],{"type":606,"tag":636,"props":5504,"children":5505},{"style":663},[5506],{"type":612,"value":5507},"    {",{"type":606,"tag":636,"props":5509,"children":5510},{"style":901},[5511],{"type":612,"value":2773},{"type":606,"tag":636,"props":5513,"children":5514},{"style":663},[5515],{"type":612,"value":1058},{"type":606,"tag":636,"props":5517,"children":5518},{"style":901},[5519],{"type":612,"value":5520},"'Alice'",{"type":606,"tag":636,"props":5522,"children":5523},{"style":663},[5524],{"type":612,"value":1249},{"type":606,"tag":636,"props":5526,"children":5527},{"style":901},[5528],{"type":612,"value":5529},"'score'",{"type":606,"tag":636,"props":5531,"children":5532},{"style":663},[5533],{"type":612,"value":1058},{"type":606,"tag":636,"props":5535,"children":5536},{"style":682},[5537],{"type":612,"value":5538},"85",{"type":606,"tag":636,"props":5540,"children":5541},{"style":663},[5542],{"type":612,"value":5543},"},\n",{"type":606,"tag":636,"props":5545,"children":5546},{"class":638,"line":45},[5547,5551,5555,5559,5564,5568,5572,5576,5581],{"type":606,"tag":636,"props":5548,"children":5549},{"style":663},[5550],{"type":612,"value":5507},{"type":606,"tag":636,"props":5552,"children":5553},{"style":901},[5554],{"type":612,"value":2773},{"type":606,"tag":636,"props":5556,"children":5557},{"style":663},[5558],{"type":612,"value":1058},{"type":606,"tag":636,"props":5560,"children":5561},{"style":901},[5562],{"type":612,"value":5563},"'Bob'",{"type":606,"tag":636,"props":5565,"children":5566},{"style":663},[5567],{"type":612,"value":1249},{"type":606,"tag":636,"props":5569,"children":5570},{"style":901},[5571],{"type":612,"value":5529},{"type":606,"tag":636,"props":5573,"children":5574},{"style":663},[5575],{"type":612,"value":1058},{"type":606,"tag":636,"props":5577,"children":5578},{"style":682},[5579],{"type":612,"value":5580},"92",{"type":606,"tag":636,"props":5582,"children":5583},{"style":663},[5584],{"type":612,"value":5543},{"type":606,"tag":636,"props":5586,"children":5587},{"class":638,"line":54},[5588,5592,5596,5600,5605,5609,5613,5617,5622],{"type":606,"tag":636,"props":5589,"children":5590},{"style":663},[5591],{"type":612,"value":5507},{"type":606,"tag":636,"props":5593,"children":5594},{"style":901},[5595],{"type":612,"value":2773},{"type":606,"tag":636,"props":5597,"children":5598},{"style":663},[5599],{"type":612,"value":1058},{"type":606,"tag":636,"props":5601,"children":5602},{"style":901},[5603],{"type":612,"value":5604},"'Charlie'",{"type":606,"tag":636,"props":5606,"children":5607},{"style":663},[5608],{"type":612,"value":1249},{"type":606,"tag":636,"props":5610,"children":5611},{"style":901},[5612],{"type":612,"value":5529},{"type":606,"tag":636,"props":5614,"children":5615},{"style":663},[5616],{"type":612,"value":1058},{"type":606,"tag":636,"props":5618,"children":5619},{"style":682},[5620],{"type":612,"value":5621},"78",{"type":606,"tag":636,"props":5623,"children":5624},{"style":663},[5625],{"type":612,"value":5543},{"type":606,"tag":636,"props":5627,"children":5628},{"class":638,"line":63},[5629,5633,5637,5641,5646,5650,5654,5658,5663],{"type":606,"tag":636,"props":5630,"children":5631},{"style":663},[5632],{"type":612,"value":5507},{"type":606,"tag":636,"props":5634,"children":5635},{"style":901},[5636],{"type":612,"value":2773},{"type":606,"tag":636,"props":5638,"children":5639},{"style":663},[5640],{"type":612,"value":1058},{"type":606,"tag":636,"props":5642,"children":5643},{"style":901},[5644],{"type":612,"value":5645},"'Diana'",{"type":606,"tag":636,"props":5647,"children":5648},{"style":663},[5649],{"type":612,"value":1249},{"type":606,"tag":636,"props":5651,"children":5652},{"style":901},[5653],{"type":612,"value":5529},{"type":606,"tag":636,"props":5655,"children":5656},{"style":663},[5657],{"type":612,"value":1058},{"type":606,"tag":636,"props":5659,"children":5660},{"style":682},[5661],{"type":612,"value":5662},"96",{"type":606,"tag":636,"props":5664,"children":5665},{"style":663},[5666],{"type":612,"value":5667},"}\n",{"type":606,"tag":636,"props":5669,"children":5670},{"class":638,"line":72},[5671],{"type":606,"tag":636,"props":5672,"children":5673},{"style":663},[5674],{"type":612,"value":1383},{"type":606,"tag":636,"props":5676,"children":5677},{"class":638,"line":81},[5678],{"type":606,"tag":636,"props":5679,"children":5680},{"emptyLinePlaceholder":13},[5681],{"type":612,"value":746},{"type":606,"tag":636,"props":5683,"children":5684},{"class":638,"line":757},[5685],{"type":606,"tag":636,"props":5686,"children":5687},{"style":642},[5688],{"type":612,"value":5689},"# Generator expressions for data processing\n",{"type":606,"tag":636,"props":5691,"children":5692},{"class":638,"line":99},[5693,5698,5702,5707,5711,5715,5719,5724,5728,5732,5736,5740,5744,5749],{"type":606,"tag":636,"props":5694,"children":5695},{"style":663},[5696],{"type":612,"value":5697},"high_scores ",{"type":606,"tag":636,"props":5699,"children":5700},{"style":651},[5701],{"type":612,"value":679},{"type":606,"tag":636,"props":5703,"children":5704},{"style":663},[5705],{"type":612,"value":5706}," (item ",{"type":606,"tag":636,"props":5708,"children":5709},{"style":651},[5710],{"type":612,"value":867},{"type":606,"tag":636,"props":5712,"children":5713},{"style":663},[5714],{"type":612,"value":2573},{"type":606,"tag":636,"props":5716,"children":5717},{"style":651},[5718],{"type":612,"value":797},{"type":606,"tag":636,"props":5720,"children":5721},{"style":663},[5722],{"type":612,"value":5723}," data ",{"type":606,"tag":636,"props":5725,"children":5726},{"style":651},[5727],{"type":612,"value":1798},{"type":606,"tag":636,"props":5729,"children":5730},{"style":663},[5731],{"type":612,"value":2594},{"type":606,"tag":636,"props":5733,"children":5734},{"style":901},[5735],{"type":612,"value":5529},{"type":606,"tag":636,"props":5737,"children":5738},{"style":663},[5739],{"type":612,"value":2604},{"type":606,"tag":636,"props":5741,"children":5742},{"style":651},[5743],{"type":612,"value":2088},{"type":606,"tag":636,"props":5745,"children":5746},{"style":682},[5747],{"type":612,"value":5748}," 80",{"type":606,"tag":636,"props":5750,"children":5751},{"style":663},[5752],{"type":612,"value":859},{"type":606,"tag":636,"props":5754,"children":5755},{"class":638,"line":108},[5756,5761,5765,5769,5773,5777,5781,5785,5789,5793,5797,5801,5805,5809,5813,5817,5821,5825,5829,5833,5837],{"type":606,"tag":636,"props":5757,"children":5758},{"style":663},[5759],{"type":612,"value":5760},"score_messages ",{"type":606,"tag":636,"props":5762,"children":5763},{"style":651},[5764],{"type":612,"value":679},{"type":606,"tag":636,"props":5766,"children":5767},{"style":663},[5768],{"type":612,"value":4202},{"type":606,"tag":636,"props":5770,"children":5771},{"style":651},[5772],{"type":612,"value":898},{"type":606,"tag":636,"props":5774,"children":5775},{"style":901},[5776],{"type":612,"value":924},{"type":606,"tag":636,"props":5778,"children":5779},{"style":682},[5780],{"type":612,"value":909},{"type":606,"tag":636,"props":5782,"children":5783},{"style":663},[5784],{"type":612,"value":2768},{"type":606,"tag":636,"props":5786,"children":5787},{"style":901},[5788],{"type":612,"value":2773},{"type":606,"tag":636,"props":5790,"children":5791},{"style":663},[5792],{"type":612,"value":2778},{"type":606,"tag":636,"props":5794,"children":5795},{"style":682},[5796],{"type":612,"value":919},{"type":606,"tag":636,"props":5798,"children":5799},{"style":901},[5800],{"type":612,"value":1058},{"type":606,"tag":636,"props":5802,"children":5803},{"style":682},[5804],{"type":612,"value":909},{"type":606,"tag":636,"props":5806,"children":5807},{"style":663},[5808],{"type":612,"value":2768},{"type":606,"tag":636,"props":5810,"children":5811},{"style":901},[5812],{"type":612,"value":5529},{"type":606,"tag":636,"props":5814,"children":5815},{"style":663},[5816],{"type":612,"value":2778},{"type":606,"tag":636,"props":5818,"children":5819},{"style":682},[5820],{"type":612,"value":919},{"type":606,"tag":636,"props":5822,"children":5823},{"style":901},[5824],{"type":612,"value":924},{"type":606,"tag":636,"props":5826,"children":5827},{"style":651},[5828],{"type":612,"value":787},{"type":606,"tag":636,"props":5830,"children":5831},{"style":663},[5832],{"type":612,"value":2573},{"type":606,"tag":636,"props":5834,"children":5835},{"style":651},[5836],{"type":612,"value":797},{"type":606,"tag":636,"props":5838,"children":5839},{"style":663},[5840],{"type":612,"value":5841}," high_scores)\n",{"type":606,"tag":636,"props":5843,"children":5844},{"class":638,"line":117},[5845],{"type":606,"tag":636,"props":5846,"children":5847},{"emptyLinePlaceholder":13},[5848],{"type":612,"value":746},{"type":606,"tag":636,"props":5850,"children":5851},{"class":638,"line":126},[5852,5856,5860,5865],{"type":606,"tag":636,"props":5853,"children":5854},{"style":682},[5855],{"type":612,"value":973},{"type":606,"tag":636,"props":5857,"children":5858},{"style":663},[5859],{"type":612,"value":807},{"type":606,"tag":636,"props":5861,"children":5862},{"style":901},[5863],{"type":612,"value":5864},"\"High score messages:\"",{"type":606,"tag":636,"props":5866,"children":5867},{"style":663},[5868],{"type":612,"value":859},{"type":606,"tag":636,"props":5870,"children":5871},{"class":638,"line":135},[5872,5876,5881,5885],{"type":606,"tag":636,"props":5873,"children":5874},{"style":651},[5875],{"type":612,"value":867},{"type":606,"tag":636,"props":5877,"children":5878},{"style":663},[5879],{"type":612,"value":5880}," message ",{"type":606,"tag":636,"props":5882,"children":5883},{"style":651},[5884],{"type":612,"value":797},{"type":606,"tag":636,"props":5886,"children":5887},{"style":663},[5888],{"type":612,"value":5889}," score_messages:\n",{"type":606,"tag":636,"props":5891,"children":5892},{"class":638,"line":144},[5893,5897,5901,5905,5909,5913,5918,5922,5926],{"type":606,"tag":636,"props":5894,"children":5895},{"style":682},[5896],{"type":612,"value":889},{"type":606,"tag":636,"props":5898,"children":5899},{"style":663},[5900],{"type":612,"value":807},{"type":606,"tag":636,"props":5902,"children":5903},{"style":651},[5904],{"type":612,"value":898},{"type":606,"tag":636,"props":5906,"children":5907},{"style":901},[5908],{"type":612,"value":2759},{"type":606,"tag":636,"props":5910,"children":5911},{"style":682},[5912],{"type":612,"value":909},{"type":606,"tag":636,"props":5914,"children":5915},{"style":663},[5916],{"type":612,"value":5917},"message",{"type":606,"tag":636,"props":5919,"children":5920},{"style":682},[5921],{"type":612,"value":919},{"type":606,"tag":636,"props":5923,"children":5924},{"style":901},[5925],{"type":612,"value":924},{"type":606,"tag":636,"props":5927,"children":5928},{"style":663},[5929],{"type":612,"value":859},{"type":606,"tag":636,"props":5931,"children":5932},{"class":638,"line":153},[5933],{"type":606,"tag":636,"props":5934,"children":5935},{"emptyLinePlaceholder":13},[5936],{"type":612,"value":746},{"type":606,"tag":636,"props":5938,"children":5939},{"class":638,"line":163},[5940],{"type":606,"tag":636,"props":5941,"children":5942},{"style":642},[5943],{"type":612,"value":5944},"# Chaining multiple generators\n",{"type":606,"tag":636,"props":5946,"children":5947},{"class":638,"line":172},[5948,5952,5956,5960,5964,5968],{"type":606,"tag":636,"props":5949,"children":5950},{"style":663},[5951],{"type":612,"value":1651},{"type":606,"tag":636,"props":5953,"children":5954},{"style":651},[5955],{"type":612,"value":679},{"type":606,"tag":636,"props":5957,"children":5958},{"style":682},[5959],{"type":612,"value":802},{"type":606,"tag":636,"props":5961,"children":5962},{"style":663},[5963],{"type":612,"value":807},{"type":606,"tag":636,"props":5965,"children":5966},{"style":682},[5967],{"type":612,"value":1507},{"type":606,"tag":636,"props":5969,"children":5970},{"style":663},[5971],{"type":612,"value":859},{"type":606,"tag":636,"props":5973,"children":5974},{"class":638,"line":181},[5975,5979,5983,5987,5991,5995,5999,6004,6008,6012,6016,6020,6024,6028],{"type":606,"tag":636,"props":5976,"children":5977},{"style":663},[5978],{"type":612,"value":3353},{"type":606,"tag":636,"props":5980,"children":5981},{"style":651},[5982],{"type":612,"value":679},{"type":606,"tag":636,"props":5984,"children":5985},{"style":663},[5986],{"type":612,"value":1660},{"type":606,"tag":636,"props":5988,"children":5989},{"style":651},[5990],{"type":612,"value":867},{"type":606,"tag":636,"props":5992,"children":5993},{"style":663},[5994],{"type":612,"value":792},{"type":606,"tag":636,"props":5996,"children":5997},{"style":651},[5998],{"type":612,"value":797},{"type":606,"tag":636,"props":6000,"children":6001},{"style":663},[6002],{"type":612,"value":6003}," numbers ",{"type":606,"tag":636,"props":6005,"children":6006},{"style":651},[6007],{"type":612,"value":1798},{"type":606,"tag":636,"props":6009,"children":6010},{"style":663},[6011],{"type":612,"value":792},{"type":606,"tag":636,"props":6013,"children":6014},{"style":651},[6015],{"type":612,"value":1807},{"type":606,"tag":636,"props":6017,"children":6018},{"style":682},[6019],{"type":612,"value":1812},{"type":606,"tag":636,"props":6021,"children":6022},{"style":651},[6023],{"type":612,"value":1817},{"type":606,"tag":636,"props":6025,"children":6026},{"style":682},[6027],{"type":612,"value":1244},{"type":606,"tag":636,"props":6029,"children":6030},{"style":663},[6031],{"type":612,"value":859},{"type":606,"tag":636,"props":6033,"children":6034},{"class":638,"line":190},[6035,6039,6043,6047,6051,6055,6059,6063,6067],{"type":606,"tag":636,"props":6036,"children":6037},{"style":663},[6038],{"type":612,"value":763},{"type":606,"tag":636,"props":6040,"children":6041},{"style":651},[6042],{"type":612,"value":679},{"type":606,"tag":636,"props":6044,"children":6045},{"style":663},[6046],{"type":612,"value":772},{"type":606,"tag":636,"props":6048,"children":6049},{"style":651},[6050],{"type":612,"value":777},{"type":606,"tag":636,"props":6052,"children":6053},{"style":682},[6054],{"type":612,"value":782},{"type":606,"tag":636,"props":6056,"children":6057},{"style":651},[6058],{"type":612,"value":787},{"type":606,"tag":636,"props":6060,"children":6061},{"style":663},[6062],{"type":612,"value":792},{"type":606,"tag":636,"props":6064,"children":6065},{"style":651},[6066],{"type":612,"value":797},{"type":606,"tag":636,"props":6068,"children":6069},{"style":663},[6070],{"type":612,"value":6071}," evens)\n",{"type":606,"tag":636,"props":6073,"children":6074},{"class":638,"line":199},[6075,6080,6084,6088,6092,6096,6100,6105,6109,6113,6117,6122],{"type":606,"tag":636,"props":6076,"children":6077},{"style":663},[6078],{"type":612,"value":6079},"large_squares ",{"type":606,"tag":636,"props":6081,"children":6082},{"style":651},[6083],{"type":612,"value":679},{"type":606,"tag":636,"props":6085,"children":6086},{"style":663},[6087],{"type":612,"value":1660},{"type":606,"tag":636,"props":6089,"children":6090},{"style":651},[6091],{"type":612,"value":867},{"type":606,"tag":636,"props":6093,"children":6094},{"style":663},[6095],{"type":612,"value":792},{"type":606,"tag":636,"props":6097,"children":6098},{"style":651},[6099],{"type":612,"value":797},{"type":606,"tag":636,"props":6101,"children":6102},{"style":663},[6103],{"type":612,"value":6104}," squares ",{"type":606,"tag":636,"props":6106,"children":6107},{"style":651},[6108],{"type":612,"value":1798},{"type":606,"tag":636,"props":6110,"children":6111},{"style":663},[6112],{"type":612,"value":792},{"type":606,"tag":636,"props":6114,"children":6115},{"style":651},[6116],{"type":612,"value":2088},{"type":606,"tag":636,"props":6118,"children":6119},{"style":682},[6120],{"type":612,"value":6121}," 50",{"type":606,"tag":636,"props":6123,"children":6124},{"style":663},[6125],{"type":612,"value":859},{"type":606,"tag":636,"props":6127,"children":6128},{"class":638,"line":208},[6129],{"type":606,"tag":636,"props":6130,"children":6131},{"emptyLinePlaceholder":13},[6132],{"type":612,"value":746},{"type":606,"tag":636,"props":6134,"children":6135},{"class":638,"line":217},[6136,6140,6144,6148,6153,6158,6163,6167,6171],{"type":606,"tag":636,"props":6137,"children":6138},{"style":682},[6139],{"type":612,"value":973},{"type":606,"tag":636,"props":6141,"children":6142},{"style":663},[6143],{"type":612,"value":807},{"type":606,"tag":636,"props":6145,"children":6146},{"style":651},[6147],{"type":612,"value":898},{"type":606,"tag":636,"props":6149,"children":6150},{"style":901},[6151],{"type":612,"value":6152},"\"Large even squares: ",{"type":606,"tag":636,"props":6154,"children":6155},{"style":682},[6156],{"type":612,"value":6157},"{list",{"type":606,"tag":636,"props":6159,"children":6160},{"style":663},[6161],{"type":612,"value":6162},"(large_squares)",{"type":606,"tag":636,"props":6164,"children":6165},{"style":682},[6166],{"type":612,"value":919},{"type":606,"tag":636,"props":6168,"children":6169},{"style":901},[6170],{"type":612,"value":924},{"type":606,"tag":636,"props":6172,"children":6173},{"style":663},[6174],{"type":612,"value":859},{"type":606,"tag":1009,"props":6176,"children":6178},{"id":6177},"key-takeaways",[6179],{"type":612,"value":6180},"🎯 Key Takeaways",{"type":606,"tag":1029,"props":6182,"children":6186},{"emoji":6183,"title":6184,"type":6185},"📚","Generator Essentials","success",[6187,6195,6233,6241,6264,6272,6295],{"type":606,"tag":615,"props":6188,"children":6189},{},[6190],{"type":606,"tag":1039,"props":6191,"children":6192},{},[6193],{"type":612,"value":6194},"Creating Generators:",{"type":606,"tag":1045,"props":6196,"children":6197},{},[6198,6217,6228],{"type":606,"tag":1049,"props":6199,"children":6200},{},[6201,6203,6208,6210,6215],{"type":612,"value":6202},"Use ",{"type":606,"tag":632,"props":6204,"children":6206},{"className":6205},[],[6207],{"type":612,"value":1025},{"type":612,"value":6209}," instead of ",{"type":606,"tag":632,"props":6211,"children":6213},{"className":6212},[],[6214],{"type":612,"value":1064},{"type":612,"value":6216}," in functions",{"type":606,"tag":1049,"props":6218,"children":6219},{},[6220,6222],{"type":612,"value":6221},"Generator expressions: ",{"type":606,"tag":632,"props":6223,"children":6225},{"className":6224},[],[6226],{"type":612,"value":6227},"(expression for item in iterable)",{"type":606,"tag":1049,"props":6229,"children":6230},{},[6231],{"type":612,"value":6232},"Can yield values conditionally and in loops",{"type":606,"tag":615,"props":6234,"children":6235},{},[6236],{"type":606,"tag":1039,"props":6237,"children":6238},{},[6239],{"type":612,"value":6240},"Benefits:",{"type":606,"tag":1045,"props":6242,"children":6243},{},[6244,6249,6254,6259],{"type":606,"tag":1049,"props":6245,"children":6246},{},[6247],{"type":612,"value":6248},"Memory efficient (one value at a time)",{"type":606,"tag":1049,"props":6250,"children":6251},{},[6252],{"type":612,"value":6253},"Lazy evaluation (compute values when needed)",{"type":606,"tag":1049,"props":6255,"children":6256},{},[6257],{"type":612,"value":6258},"Great for large datasets and streams",{"type":606,"tag":1049,"props":6260,"children":6261},{},[6262],{"type":612,"value":6263},"Can represent infinite sequences",{"type":606,"tag":615,"props":6265,"children":6266},{},[6267],{"type":606,"tag":1039,"props":6268,"children":6269},{},[6270],{"type":612,"value":6271},"Best Practices:",{"type":606,"tag":1045,"props":6273,"children":6274},{},[6275,6280,6285,6290],{"type":606,"tag":1049,"props":6276,"children":6277},{},[6278],{"type":612,"value":6279},"Use generators for large datasets",{"type":606,"tag":1049,"props":6281,"children":6282},{},[6283],{"type":612,"value":6284},"Chain generators for data pipelines",{"type":606,"tag":1049,"props":6286,"children":6287},{},[6288],{"type":612,"value":6289},"Remember generators are consumed once",{"type":606,"tag":1049,"props":6291,"children":6292},{},[6293],{"type":612,"value":6294},"Convert to list only when necessary",{"type":606,"tag":615,"props":6296,"children":6297},{},[6298,6303],{"type":606,"tag":1039,"props":6299,"children":6300},{},[6301],{"type":612,"value":6302},"Remember:",{"type":612,"value":6304}," Generators are powerful tools for memory-efficient data processing!",{"type":606,"tag":1009,"props":6306,"children":6308},{"id":6307},"whats-next",[6309],{"type":612,"value":6310},"🚀 What's Next?",{"type":606,"tag":615,"props":6312,"children":6313},{},[6314],{"type":612,"value":6315},"Learn how to organize your code with modules and packages for better project structure.",{"type":606,"tag":615,"props":6317,"children":6318},{},[6319,6324,6325],{"type":606,"tag":1039,"props":6320,"children":6321},{},[6322],{"type":612,"value":6323},"Continue to",{"type":612,"value":1058},{"type":606,"tag":6326,"props":6327,"children":6328},"a",{"href":455},[6329],{"type":612,"value":456},{"type":606,"tag":6331,"props":6332,"children":6333},"style",{},[6334],{"type":612,"value":6335},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":6337},[6338,6342,6343,6348,6349,6353,6354],{"id":1011,"depth":27,"text":1014,"children":6339},[6340,6341],{"id":1137,"depth":36,"text":1140},{"id":1622,"depth":36,"text":1625},{"id":2136,"depth":27,"text":2139},{"id":2264,"depth":27,"text":2267,"children":6344},[6345,6346,6347],{"id":2270,"depth":36,"text":2273},{"id":2817,"depth":36,"text":2820},{"id":3504,"depth":36,"text":3507},{"id":4259,"depth":27,"text":4262},{"id":4396,"depth":27,"text":4399,"children":6350},[6351,6352],{"id":5009,"depth":36,"text":5012},{"id":5463,"depth":36,"text":5466},{"id":6177,"depth":27,"text":6180},{"id":6307,"depth":27,"text":6310},1782373762004]