[{"data":1,"prerenderedAt":2441},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/dictionary-comprehensions":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},"/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},"/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},"/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},"/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},"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",[194],{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"body":602,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},{"type":603,"children":604,"toc":2434},"root",[605,614,620,778,785,790,860,867,1466,1472,1477,2313,2319,2428],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"using-dictionary-comprehensions",[611],{"type":612,"value":613},"text","🎯 Using Dictionary Comprehensions",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Dictionary comprehensions provide a concise way to create dictionaries in Python. Understanding this feature is essential for writing efficient and readable code.",{"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","# Basic dictionary comprehension\nnumbers = [1, 2, 3, 4, 5]\nsquares = {x: x**2 for x in numbers}\nprint(squares)  # {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,714,760],{"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},"# Basic dictionary comprehension\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649,655,661,666,672,677,682,686,691,695,700,704,709],{"type":606,"tag":636,"props":650,"children":652},{"style":651},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[653],{"type":612,"value":654},"numbers ",{"type":606,"tag":636,"props":656,"children":658},{"style":657},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[659],{"type":612,"value":660},"=",{"type":606,"tag":636,"props":662,"children":663},{"style":651},[664],{"type":612,"value":665}," [",{"type":606,"tag":636,"props":667,"children":669},{"style":668},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[670],{"type":612,"value":671},"1",{"type":606,"tag":636,"props":673,"children":674},{"style":651},[675],{"type":612,"value":676},", ",{"type":606,"tag":636,"props":678,"children":679},{"style":668},[680],{"type":612,"value":681},"2",{"type":606,"tag":636,"props":683,"children":684},{"style":651},[685],{"type":612,"value":676},{"type":606,"tag":636,"props":687,"children":688},{"style":668},[689],{"type":612,"value":690},"3",{"type":606,"tag":636,"props":692,"children":693},{"style":651},[694],{"type":612,"value":676},{"type":606,"tag":636,"props":696,"children":697},{"style":668},[698],{"type":612,"value":699},"4",{"type":606,"tag":636,"props":701,"children":702},{"style":651},[703],{"type":612,"value":676},{"type":606,"tag":636,"props":705,"children":706},{"style":668},[707],{"type":612,"value":708},"5",{"type":606,"tag":636,"props":710,"children":711},{"style":651},[712],{"type":612,"value":713},"]\n",{"type":606,"tag":636,"props":715,"children":716},{"class":638,"line":36},[717,722,726,731,736,740,745,750,755],{"type":606,"tag":636,"props":718,"children":719},{"style":651},[720],{"type":612,"value":721},"squares ",{"type":606,"tag":636,"props":723,"children":724},{"style":657},[725],{"type":612,"value":660},{"type":606,"tag":636,"props":727,"children":728},{"style":651},[729],{"type":612,"value":730}," {x: x",{"type":606,"tag":636,"props":732,"children":733},{"style":657},[734],{"type":612,"value":735},"**",{"type":606,"tag":636,"props":737,"children":738},{"style":668},[739],{"type":612,"value":681},{"type":606,"tag":636,"props":741,"children":742},{"style":657},[743],{"type":612,"value":744}," for",{"type":606,"tag":636,"props":746,"children":747},{"style":651},[748],{"type":612,"value":749}," x ",{"type":606,"tag":636,"props":751,"children":752},{"style":657},[753],{"type":612,"value":754},"in",{"type":606,"tag":636,"props":756,"children":757},{"style":651},[758],{"type":612,"value":759}," numbers}\n",{"type":606,"tag":636,"props":761,"children":762},{"class":638,"line":45},[763,768,773],{"type":606,"tag":636,"props":764,"children":765},{"style":668},[766],{"type":612,"value":767},"print",{"type":606,"tag":636,"props":769,"children":770},{"style":651},[771],{"type":612,"value":772},"(squares)  ",{"type":606,"tag":636,"props":774,"children":775},{"style":642},[776],{"type":612,"value":777},"# {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}\n",{"type":606,"tag":779,"props":780,"children":782},"h2",{"id":781},"comprehension-syntax",[783],{"type":612,"value":784},"🎯 Comprehension Syntax",{"type":606,"tag":615,"props":786,"children":787},{},[788],{"type":612,"value":789},"Python dictionary comprehensions follow a specific syntax pattern.",{"type":606,"tag":791,"props":792,"children":796},"info-box",{"emoji":793,"title":794,"type":795},"📝","Comprehension Syntax","info",[797,806,829,837],{"type":606,"tag":615,"props":798,"children":799},{},[800],{"type":606,"tag":801,"props":802,"children":803},"strong",{},[804],{"type":612,"value":805},"Basic Syntax:",{"type":606,"tag":807,"props":808,"children":809},"ul",{},[810,820],{"type":606,"tag":811,"props":812,"children":813},"li",{},[814],{"type":606,"tag":632,"props":815,"children":817},{"className":816},[],[818],{"type":612,"value":819},"{key: value for item in iterable}",{"type":606,"tag":811,"props":821,"children":822},{},[823],{"type":606,"tag":632,"props":824,"children":826},{"className":825},[],[827],{"type":612,"value":828},"{key: value for item in iterable if condition}",{"type":606,"tag":615,"props":830,"children":831},{},[832],{"type":606,"tag":801,"props":833,"children":834},{},[835],{"type":612,"value":836},"Components:",{"type":606,"tag":807,"props":838,"children":839},{},[840,845,850,855],{"type":606,"tag":811,"props":841,"children":842},{},[843],{"type":612,"value":844},"Key expression: How to generate keys",{"type":606,"tag":811,"props":846,"children":847},{},[848],{"type":612,"value":849},"Value expression: How to generate values",{"type":606,"tag":811,"props":851,"children":852},{},[853],{"type":612,"value":854},"Iterable: Source of data",{"type":606,"tag":811,"props":856,"children":857},{},[858],{"type":612,"value":859},"Condition: Optional filter",{"type":606,"tag":861,"props":862,"children":864},"h3",{"id":863},"basic-examples",[865],{"type":612,"value":866},"Basic Examples",{"type":606,"tag":621,"props":868,"children":869},{},[870],{"type":606,"tag":625,"props":871,"children":873},{"className":627,"code":872,"language":629,"meta":8,"style":8},"# Different dictionary comprehension patterns\nnumbers = [1, 2, 3, 4, 5]\n\n# Basic comprehension\nsquares = {x: x**2 for x in numbers}\nprint(f\"Squares: {squares}\")\n\n# With condition\neven_squares = {x: x**2 for x in numbers if x % 2 == 0}\nprint(f\"Even squares: {even_squares}\")\n\n# From string\nword = \"hello\"\nchar_count = {char: word.count(char) for char in word}\nprint(f\"Character count: {char_count}\")\n\n# From two lists\nnames = ['Alice', 'Bob', 'Charlie']\nages = [25, 30, 35]\npeople = {name: age for name, age in zip(names, ages)}\nprint(f\"People: {people}\")\n",[874],{"type":606,"tag":632,"props":875,"children":876},{"__ignoreMap":8},[877,885,940,948,956,995,1043,1050,1058,1134,1175,1182,1190,1207,1243,1284,1291,1299,1342,1385,1425],{"type":606,"tag":636,"props":878,"children":879},{"class":638,"line":12},[880],{"type":606,"tag":636,"props":881,"children":882},{"style":642},[883],{"type":612,"value":884},"# Different dictionary comprehension patterns\n",{"type":606,"tag":636,"props":886,"children":887},{"class":638,"line":27},[888,892,896,900,904,908,912,916,920,924,928,932,936],{"type":606,"tag":636,"props":889,"children":890},{"style":651},[891],{"type":612,"value":654},{"type":606,"tag":636,"props":893,"children":894},{"style":657},[895],{"type":612,"value":660},{"type":606,"tag":636,"props":897,"children":898},{"style":651},[899],{"type":612,"value":665},{"type":606,"tag":636,"props":901,"children":902},{"style":668},[903],{"type":612,"value":671},{"type":606,"tag":636,"props":905,"children":906},{"style":651},[907],{"type":612,"value":676},{"type":606,"tag":636,"props":909,"children":910},{"style":668},[911],{"type":612,"value":681},{"type":606,"tag":636,"props":913,"children":914},{"style":651},[915],{"type":612,"value":676},{"type":606,"tag":636,"props":917,"children":918},{"style":668},[919],{"type":612,"value":690},{"type":606,"tag":636,"props":921,"children":922},{"style":651},[923],{"type":612,"value":676},{"type":606,"tag":636,"props":925,"children":926},{"style":668},[927],{"type":612,"value":699},{"type":606,"tag":636,"props":929,"children":930},{"style":651},[931],{"type":612,"value":676},{"type":606,"tag":636,"props":933,"children":934},{"style":668},[935],{"type":612,"value":708},{"type":606,"tag":636,"props":937,"children":938},{"style":651},[939],{"type":612,"value":713},{"type":606,"tag":636,"props":941,"children":942},{"class":638,"line":36},[943],{"type":606,"tag":636,"props":944,"children":945},{"emptyLinePlaceholder":13},[946],{"type":612,"value":947},"\n",{"type":606,"tag":636,"props":949,"children":950},{"class":638,"line":45},[951],{"type":606,"tag":636,"props":952,"children":953},{"style":642},[954],{"type":612,"value":955},"# Basic comprehension\n",{"type":606,"tag":636,"props":957,"children":958},{"class":638,"line":54},[959,963,967,971,975,979,983,987,991],{"type":606,"tag":636,"props":960,"children":961},{"style":651},[962],{"type":612,"value":721},{"type":606,"tag":636,"props":964,"children":965},{"style":657},[966],{"type":612,"value":660},{"type":606,"tag":636,"props":968,"children":969},{"style":651},[970],{"type":612,"value":730},{"type":606,"tag":636,"props":972,"children":973},{"style":657},[974],{"type":612,"value":735},{"type":606,"tag":636,"props":976,"children":977},{"style":668},[978],{"type":612,"value":681},{"type":606,"tag":636,"props":980,"children":981},{"style":657},[982],{"type":612,"value":744},{"type":606,"tag":636,"props":984,"children":985},{"style":651},[986],{"type":612,"value":749},{"type":606,"tag":636,"props":988,"children":989},{"style":657},[990],{"type":612,"value":754},{"type":606,"tag":636,"props":992,"children":993},{"style":651},[994],{"type":612,"value":759},{"type":606,"tag":636,"props":996,"children":997},{"class":638,"line":63},[998,1002,1007,1012,1018,1023,1028,1033,1038],{"type":606,"tag":636,"props":999,"children":1000},{"style":668},[1001],{"type":612,"value":767},{"type":606,"tag":636,"props":1003,"children":1004},{"style":651},[1005],{"type":612,"value":1006},"(",{"type":606,"tag":636,"props":1008,"children":1009},{"style":657},[1010],{"type":612,"value":1011},"f",{"type":606,"tag":636,"props":1013,"children":1015},{"style":1014},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1016],{"type":612,"value":1017},"\"Squares: ",{"type":606,"tag":636,"props":1019,"children":1020},{"style":668},[1021],{"type":612,"value":1022},"{",{"type":606,"tag":636,"props":1024,"children":1025},{"style":651},[1026],{"type":612,"value":1027},"squares",{"type":606,"tag":636,"props":1029,"children":1030},{"style":668},[1031],{"type":612,"value":1032},"}",{"type":606,"tag":636,"props":1034,"children":1035},{"style":1014},[1036],{"type":612,"value":1037},"\"",{"type":606,"tag":636,"props":1039,"children":1040},{"style":651},[1041],{"type":612,"value":1042},")\n",{"type":606,"tag":636,"props":1044,"children":1045},{"class":638,"line":72},[1046],{"type":606,"tag":636,"props":1047,"children":1048},{"emptyLinePlaceholder":13},[1049],{"type":612,"value":947},{"type":606,"tag":636,"props":1051,"children":1052},{"class":638,"line":81},[1053],{"type":606,"tag":636,"props":1054,"children":1055},{"style":642},[1056],{"type":612,"value":1057},"# With condition\n",{"type":606,"tag":636,"props":1059,"children":1061},{"class":638,"line":1060},9,[1062,1067,1071,1075,1079,1083,1087,1091,1095,1100,1105,1109,1114,1119,1124,1129],{"type":606,"tag":636,"props":1063,"children":1064},{"style":651},[1065],{"type":612,"value":1066},"even_squares ",{"type":606,"tag":636,"props":1068,"children":1069},{"style":657},[1070],{"type":612,"value":660},{"type":606,"tag":636,"props":1072,"children":1073},{"style":651},[1074],{"type":612,"value":730},{"type":606,"tag":636,"props":1076,"children":1077},{"style":657},[1078],{"type":612,"value":735},{"type":606,"tag":636,"props":1080,"children":1081},{"style":668},[1082],{"type":612,"value":681},{"type":606,"tag":636,"props":1084,"children":1085},{"style":657},[1086],{"type":612,"value":744},{"type":606,"tag":636,"props":1088,"children":1089},{"style":651},[1090],{"type":612,"value":749},{"type":606,"tag":636,"props":1092,"children":1093},{"style":657},[1094],{"type":612,"value":754},{"type":606,"tag":636,"props":1096,"children":1097},{"style":651},[1098],{"type":612,"value":1099}," numbers ",{"type":606,"tag":636,"props":1101,"children":1102},{"style":657},[1103],{"type":612,"value":1104},"if",{"type":606,"tag":636,"props":1106,"children":1107},{"style":651},[1108],{"type":612,"value":749},{"type":606,"tag":636,"props":1110,"children":1111},{"style":657},[1112],{"type":612,"value":1113},"%",{"type":606,"tag":636,"props":1115,"children":1116},{"style":668},[1117],{"type":612,"value":1118}," 2",{"type":606,"tag":636,"props":1120,"children":1121},{"style":657},[1122],{"type":612,"value":1123}," ==",{"type":606,"tag":636,"props":1125,"children":1126},{"style":668},[1127],{"type":612,"value":1128}," 0",{"type":606,"tag":636,"props":1130,"children":1131},{"style":651},[1132],{"type":612,"value":1133},"}\n",{"type":606,"tag":636,"props":1135,"children":1136},{"class":638,"line":99},[1137,1141,1145,1149,1154,1158,1163,1167,1171],{"type":606,"tag":636,"props":1138,"children":1139},{"style":668},[1140],{"type":612,"value":767},{"type":606,"tag":636,"props":1142,"children":1143},{"style":651},[1144],{"type":612,"value":1006},{"type":606,"tag":636,"props":1146,"children":1147},{"style":657},[1148],{"type":612,"value":1011},{"type":606,"tag":636,"props":1150,"children":1151},{"style":1014},[1152],{"type":612,"value":1153},"\"Even squares: ",{"type":606,"tag":636,"props":1155,"children":1156},{"style":668},[1157],{"type":612,"value":1022},{"type":606,"tag":636,"props":1159,"children":1160},{"style":651},[1161],{"type":612,"value":1162},"even_squares",{"type":606,"tag":636,"props":1164,"children":1165},{"style":668},[1166],{"type":612,"value":1032},{"type":606,"tag":636,"props":1168,"children":1169},{"style":1014},[1170],{"type":612,"value":1037},{"type":606,"tag":636,"props":1172,"children":1173},{"style":651},[1174],{"type":612,"value":1042},{"type":606,"tag":636,"props":1176,"children":1177},{"class":638,"line":108},[1178],{"type":606,"tag":636,"props":1179,"children":1180},{"emptyLinePlaceholder":13},[1181],{"type":612,"value":947},{"type":606,"tag":636,"props":1183,"children":1184},{"class":638,"line":117},[1185],{"type":606,"tag":636,"props":1186,"children":1187},{"style":642},[1188],{"type":612,"value":1189},"# From string\n",{"type":606,"tag":636,"props":1191,"children":1192},{"class":638,"line":126},[1193,1198,1202],{"type":606,"tag":636,"props":1194,"children":1195},{"style":651},[1196],{"type":612,"value":1197},"word ",{"type":606,"tag":636,"props":1199,"children":1200},{"style":657},[1201],{"type":612,"value":660},{"type":606,"tag":636,"props":1203,"children":1204},{"style":1014},[1205],{"type":612,"value":1206}," \"hello\"\n",{"type":606,"tag":636,"props":1208,"children":1209},{"class":638,"line":135},[1210,1215,1219,1224,1229,1234,1238],{"type":606,"tag":636,"props":1211,"children":1212},{"style":651},[1213],{"type":612,"value":1214},"char_count ",{"type":606,"tag":636,"props":1216,"children":1217},{"style":657},[1218],{"type":612,"value":660},{"type":606,"tag":636,"props":1220,"children":1221},{"style":651},[1222],{"type":612,"value":1223}," {char: word.count(char) ",{"type":606,"tag":636,"props":1225,"children":1226},{"style":657},[1227],{"type":612,"value":1228},"for",{"type":606,"tag":636,"props":1230,"children":1231},{"style":651},[1232],{"type":612,"value":1233}," char ",{"type":606,"tag":636,"props":1235,"children":1236},{"style":657},[1237],{"type":612,"value":754},{"type":606,"tag":636,"props":1239,"children":1240},{"style":651},[1241],{"type":612,"value":1242}," word}\n",{"type":606,"tag":636,"props":1244,"children":1245},{"class":638,"line":144},[1246,1250,1254,1258,1263,1267,1272,1276,1280],{"type":606,"tag":636,"props":1247,"children":1248},{"style":668},[1249],{"type":612,"value":767},{"type":606,"tag":636,"props":1251,"children":1252},{"style":651},[1253],{"type":612,"value":1006},{"type":606,"tag":636,"props":1255,"children":1256},{"style":657},[1257],{"type":612,"value":1011},{"type":606,"tag":636,"props":1259,"children":1260},{"style":1014},[1261],{"type":612,"value":1262},"\"Character count: ",{"type":606,"tag":636,"props":1264,"children":1265},{"style":668},[1266],{"type":612,"value":1022},{"type":606,"tag":636,"props":1268,"children":1269},{"style":651},[1270],{"type":612,"value":1271},"char_count",{"type":606,"tag":636,"props":1273,"children":1274},{"style":668},[1275],{"type":612,"value":1032},{"type":606,"tag":636,"props":1277,"children":1278},{"style":1014},[1279],{"type":612,"value":1037},{"type":606,"tag":636,"props":1281,"children":1282},{"style":651},[1283],{"type":612,"value":1042},{"type":606,"tag":636,"props":1285,"children":1286},{"class":638,"line":153},[1287],{"type":606,"tag":636,"props":1288,"children":1289},{"emptyLinePlaceholder":13},[1290],{"type":612,"value":947},{"type":606,"tag":636,"props":1292,"children":1293},{"class":638,"line":163},[1294],{"type":606,"tag":636,"props":1295,"children":1296},{"style":642},[1297],{"type":612,"value":1298},"# From two lists\n",{"type":606,"tag":636,"props":1300,"children":1301},{"class":638,"line":172},[1302,1307,1311,1315,1320,1324,1329,1333,1338],{"type":606,"tag":636,"props":1303,"children":1304},{"style":651},[1305],{"type":612,"value":1306},"names ",{"type":606,"tag":636,"props":1308,"children":1309},{"style":657},[1310],{"type":612,"value":660},{"type":606,"tag":636,"props":1312,"children":1313},{"style":651},[1314],{"type":612,"value":665},{"type":606,"tag":636,"props":1316,"children":1317},{"style":1014},[1318],{"type":612,"value":1319},"'Alice'",{"type":606,"tag":636,"props":1321,"children":1322},{"style":651},[1323],{"type":612,"value":676},{"type":606,"tag":636,"props":1325,"children":1326},{"style":1014},[1327],{"type":612,"value":1328},"'Bob'",{"type":606,"tag":636,"props":1330,"children":1331},{"style":651},[1332],{"type":612,"value":676},{"type":606,"tag":636,"props":1334,"children":1335},{"style":1014},[1336],{"type":612,"value":1337},"'Charlie'",{"type":606,"tag":636,"props":1339,"children":1340},{"style":651},[1341],{"type":612,"value":713},{"type":606,"tag":636,"props":1343,"children":1344},{"class":638,"line":181},[1345,1350,1354,1358,1363,1367,1372,1376,1381],{"type":606,"tag":636,"props":1346,"children":1347},{"style":651},[1348],{"type":612,"value":1349},"ages ",{"type":606,"tag":636,"props":1351,"children":1352},{"style":657},[1353],{"type":612,"value":660},{"type":606,"tag":636,"props":1355,"children":1356},{"style":651},[1357],{"type":612,"value":665},{"type":606,"tag":636,"props":1359,"children":1360},{"style":668},[1361],{"type":612,"value":1362},"25",{"type":606,"tag":636,"props":1364,"children":1365},{"style":651},[1366],{"type":612,"value":676},{"type":606,"tag":636,"props":1368,"children":1369},{"style":668},[1370],{"type":612,"value":1371},"30",{"type":606,"tag":636,"props":1373,"children":1374},{"style":651},[1375],{"type":612,"value":676},{"type":606,"tag":636,"props":1377,"children":1378},{"style":668},[1379],{"type":612,"value":1380},"35",{"type":606,"tag":636,"props":1382,"children":1383},{"style":651},[1384],{"type":612,"value":713},{"type":606,"tag":636,"props":1386,"children":1387},{"class":638,"line":190},[1388,1393,1397,1402,1406,1411,1415,1420],{"type":606,"tag":636,"props":1389,"children":1390},{"style":651},[1391],{"type":612,"value":1392},"people ",{"type":606,"tag":636,"props":1394,"children":1395},{"style":657},[1396],{"type":612,"value":660},{"type":606,"tag":636,"props":1398,"children":1399},{"style":651},[1400],{"type":612,"value":1401}," {name: age ",{"type":606,"tag":636,"props":1403,"children":1404},{"style":657},[1405],{"type":612,"value":1228},{"type":606,"tag":636,"props":1407,"children":1408},{"style":651},[1409],{"type":612,"value":1410}," name, age ",{"type":606,"tag":636,"props":1412,"children":1413},{"style":657},[1414],{"type":612,"value":754},{"type":606,"tag":636,"props":1416,"children":1417},{"style":668},[1418],{"type":612,"value":1419}," zip",{"type":606,"tag":636,"props":1421,"children":1422},{"style":651},[1423],{"type":612,"value":1424},"(names, ages)}\n",{"type":606,"tag":636,"props":1426,"children":1427},{"class":638,"line":199},[1428,1432,1436,1440,1445,1449,1454,1458,1462],{"type":606,"tag":636,"props":1429,"children":1430},{"style":668},[1431],{"type":612,"value":767},{"type":606,"tag":636,"props":1433,"children":1434},{"style":651},[1435],{"type":612,"value":1006},{"type":606,"tag":636,"props":1437,"children":1438},{"style":657},[1439],{"type":612,"value":1011},{"type":606,"tag":636,"props":1441,"children":1442},{"style":1014},[1443],{"type":612,"value":1444},"\"People: ",{"type":606,"tag":636,"props":1446,"children":1447},{"style":668},[1448],{"type":612,"value":1022},{"type":606,"tag":636,"props":1450,"children":1451},{"style":651},[1452],{"type":612,"value":1453},"people",{"type":606,"tag":636,"props":1455,"children":1456},{"style":668},[1457],{"type":612,"value":1032},{"type":606,"tag":636,"props":1459,"children":1460},{"style":1014},[1461],{"type":612,"value":1037},{"type":606,"tag":636,"props":1463,"children":1464},{"style":651},[1465],{"type":612,"value":1042},{"type":606,"tag":779,"props":1467,"children":1469},{"id":1468},"advanced-comprehensions",[1470],{"type":612,"value":1471},"🔍 Advanced Comprehensions",{"type":606,"tag":615,"props":1473,"children":1474},{},[1475],{"type":612,"value":1476},"Python allows more sophisticated dictionary comprehension operations.",{"type":606,"tag":621,"props":1478,"children":1479},{},[1480],{"type":606,"tag":625,"props":1481,"children":1483},{"className":627,"code":1482,"language":629,"meta":8,"style":8},"# Advanced dictionary comprehensions\nstudents = ['Alice', 'Bob', 'Charlie', 'Diana']\nscores = [85, 92, 78, 95]\n\n# Nested comprehension\ngrade_mapping = {'A': 90, 'B': 80, 'C': 70}\nstudent_grades = {\n    name: {grade: threshold for grade, threshold in grade_mapping.items() \n           if score >= threshold}\n    for name, score in zip(students, scores)\n}\nprint(f\"Student grades: {student_grades}\")\n\n# Conditional key/value\ncategorized = {\n    name: 'High' if score >= 90 else 'Medium' if score >= 80 else 'Low'\n    for name, score in zip(students, scores)\n}\nprint(f\"Categorized: {categorized}\")\n\n# Transform existing dictionary\noriginal = {'a': 1, 'b': 2, 'c': 3}\ntransformed = {k.upper(): v * 10 for k, v in original.items()}\nprint(f\"Transformed: {transformed}\")\n\n# Multiple conditions\nfiltered = {\n    name: score for name, score in zip(students, scores)\n    if len(name) > 3 and score >= 85\n}\nprint(f\"Filtered: {filtered}\")\n",[1484],{"type":606,"tag":632,"props":1485,"children":1486},{"__ignoreMap":8},[1487,1495,1544,1596,1603,1611,1683,1700,1726,1749,1775,1782,1823,1830,1838,1854,1921,1944,1951,1992,1999,2007,2074,2119,2160,2167,2175,2191,2219,2265,2272],{"type":606,"tag":636,"props":1488,"children":1489},{"class":638,"line":12},[1490],{"type":606,"tag":636,"props":1491,"children":1492},{"style":642},[1493],{"type":612,"value":1494},"# Advanced dictionary comprehensions\n",{"type":606,"tag":636,"props":1496,"children":1497},{"class":638,"line":27},[1498,1503,1507,1511,1515,1519,1523,1527,1531,1535,1540],{"type":606,"tag":636,"props":1499,"children":1500},{"style":651},[1501],{"type":612,"value":1502},"students ",{"type":606,"tag":636,"props":1504,"children":1505},{"style":657},[1506],{"type":612,"value":660},{"type":606,"tag":636,"props":1508,"children":1509},{"style":651},[1510],{"type":612,"value":665},{"type":606,"tag":636,"props":1512,"children":1513},{"style":1014},[1514],{"type":612,"value":1319},{"type":606,"tag":636,"props":1516,"children":1517},{"style":651},[1518],{"type":612,"value":676},{"type":606,"tag":636,"props":1520,"children":1521},{"style":1014},[1522],{"type":612,"value":1328},{"type":606,"tag":636,"props":1524,"children":1525},{"style":651},[1526],{"type":612,"value":676},{"type":606,"tag":636,"props":1528,"children":1529},{"style":1014},[1530],{"type":612,"value":1337},{"type":606,"tag":636,"props":1532,"children":1533},{"style":651},[1534],{"type":612,"value":676},{"type":606,"tag":636,"props":1536,"children":1537},{"style":1014},[1538],{"type":612,"value":1539},"'Diana'",{"type":606,"tag":636,"props":1541,"children":1542},{"style":651},[1543],{"type":612,"value":713},{"type":606,"tag":636,"props":1545,"children":1546},{"class":638,"line":36},[1547,1552,1556,1560,1565,1569,1574,1578,1583,1587,1592],{"type":606,"tag":636,"props":1548,"children":1549},{"style":651},[1550],{"type":612,"value":1551},"scores ",{"type":606,"tag":636,"props":1553,"children":1554},{"style":657},[1555],{"type":612,"value":660},{"type":606,"tag":636,"props":1557,"children":1558},{"style":651},[1559],{"type":612,"value":665},{"type":606,"tag":636,"props":1561,"children":1562},{"style":668},[1563],{"type":612,"value":1564},"85",{"type":606,"tag":636,"props":1566,"children":1567},{"style":651},[1568],{"type":612,"value":676},{"type":606,"tag":636,"props":1570,"children":1571},{"style":668},[1572],{"type":612,"value":1573},"92",{"type":606,"tag":636,"props":1575,"children":1576},{"style":651},[1577],{"type":612,"value":676},{"type":606,"tag":636,"props":1579,"children":1580},{"style":668},[1581],{"type":612,"value":1582},"78",{"type":606,"tag":636,"props":1584,"children":1585},{"style":651},[1586],{"type":612,"value":676},{"type":606,"tag":636,"props":1588,"children":1589},{"style":668},[1590],{"type":612,"value":1591},"95",{"type":606,"tag":636,"props":1593,"children":1594},{"style":651},[1595],{"type":612,"value":713},{"type":606,"tag":636,"props":1597,"children":1598},{"class":638,"line":45},[1599],{"type":606,"tag":636,"props":1600,"children":1601},{"emptyLinePlaceholder":13},[1602],{"type":612,"value":947},{"type":606,"tag":636,"props":1604,"children":1605},{"class":638,"line":54},[1606],{"type":606,"tag":636,"props":1607,"children":1608},{"style":642},[1609],{"type":612,"value":1610},"# Nested comprehension\n",{"type":606,"tag":636,"props":1612,"children":1613},{"class":638,"line":63},[1614,1619,1623,1628,1633,1638,1643,1647,1652,1656,1661,1665,1670,1674,1679],{"type":606,"tag":636,"props":1615,"children":1616},{"style":651},[1617],{"type":612,"value":1618},"grade_mapping ",{"type":606,"tag":636,"props":1620,"children":1621},{"style":657},[1622],{"type":612,"value":660},{"type":606,"tag":636,"props":1624,"children":1625},{"style":651},[1626],{"type":612,"value":1627}," {",{"type":606,"tag":636,"props":1629,"children":1630},{"style":1014},[1631],{"type":612,"value":1632},"'A'",{"type":606,"tag":636,"props":1634,"children":1635},{"style":651},[1636],{"type":612,"value":1637},": ",{"type":606,"tag":636,"props":1639,"children":1640},{"style":668},[1641],{"type":612,"value":1642},"90",{"type":606,"tag":636,"props":1644,"children":1645},{"style":651},[1646],{"type":612,"value":676},{"type":606,"tag":636,"props":1648,"children":1649},{"style":1014},[1650],{"type":612,"value":1651},"'B'",{"type":606,"tag":636,"props":1653,"children":1654},{"style":651},[1655],{"type":612,"value":1637},{"type":606,"tag":636,"props":1657,"children":1658},{"style":668},[1659],{"type":612,"value":1660},"80",{"type":606,"tag":636,"props":1662,"children":1663},{"style":651},[1664],{"type":612,"value":676},{"type":606,"tag":636,"props":1666,"children":1667},{"style":1014},[1668],{"type":612,"value":1669},"'C'",{"type":606,"tag":636,"props":1671,"children":1672},{"style":651},[1673],{"type":612,"value":1637},{"type":606,"tag":636,"props":1675,"children":1676},{"style":668},[1677],{"type":612,"value":1678},"70",{"type":606,"tag":636,"props":1680,"children":1681},{"style":651},[1682],{"type":612,"value":1133},{"type":606,"tag":636,"props":1684,"children":1685},{"class":638,"line":72},[1686,1691,1695],{"type":606,"tag":636,"props":1687,"children":1688},{"style":651},[1689],{"type":612,"value":1690},"student_grades ",{"type":606,"tag":636,"props":1692,"children":1693},{"style":657},[1694],{"type":612,"value":660},{"type":606,"tag":636,"props":1696,"children":1697},{"style":651},[1698],{"type":612,"value":1699}," {\n",{"type":606,"tag":636,"props":1701,"children":1702},{"class":638,"line":81},[1703,1708,1712,1717,1721],{"type":606,"tag":636,"props":1704,"children":1705},{"style":651},[1706],{"type":612,"value":1707},"    name: {grade: threshold ",{"type":606,"tag":636,"props":1709,"children":1710},{"style":657},[1711],{"type":612,"value":1228},{"type":606,"tag":636,"props":1713,"children":1714},{"style":651},[1715],{"type":612,"value":1716}," grade, threshold ",{"type":606,"tag":636,"props":1718,"children":1719},{"style":657},[1720],{"type":612,"value":754},{"type":606,"tag":636,"props":1722,"children":1723},{"style":651},[1724],{"type":612,"value":1725}," grade_mapping.items() \n",{"type":606,"tag":636,"props":1727,"children":1728},{"class":638,"line":1060},[1729,1734,1739,1744],{"type":606,"tag":636,"props":1730,"children":1731},{"style":657},[1732],{"type":612,"value":1733},"           if",{"type":606,"tag":636,"props":1735,"children":1736},{"style":651},[1737],{"type":612,"value":1738}," score ",{"type":606,"tag":636,"props":1740,"children":1741},{"style":657},[1742],{"type":612,"value":1743},">=",{"type":606,"tag":636,"props":1745,"children":1746},{"style":651},[1747],{"type":612,"value":1748}," threshold}\n",{"type":606,"tag":636,"props":1750,"children":1751},{"class":638,"line":99},[1752,1757,1762,1766,1770],{"type":606,"tag":636,"props":1753,"children":1754},{"style":657},[1755],{"type":612,"value":1756},"    for",{"type":606,"tag":636,"props":1758,"children":1759},{"style":651},[1760],{"type":612,"value":1761}," name, score ",{"type":606,"tag":636,"props":1763,"children":1764},{"style":657},[1765],{"type":612,"value":754},{"type":606,"tag":636,"props":1767,"children":1768},{"style":668},[1769],{"type":612,"value":1419},{"type":606,"tag":636,"props":1771,"children":1772},{"style":651},[1773],{"type":612,"value":1774},"(students, scores)\n",{"type":606,"tag":636,"props":1776,"children":1777},{"class":638,"line":108},[1778],{"type":606,"tag":636,"props":1779,"children":1780},{"style":651},[1781],{"type":612,"value":1133},{"type":606,"tag":636,"props":1783,"children":1784},{"class":638,"line":117},[1785,1789,1793,1797,1802,1806,1811,1815,1819],{"type":606,"tag":636,"props":1786,"children":1787},{"style":668},[1788],{"type":612,"value":767},{"type":606,"tag":636,"props":1790,"children":1791},{"style":651},[1792],{"type":612,"value":1006},{"type":606,"tag":636,"props":1794,"children":1795},{"style":657},[1796],{"type":612,"value":1011},{"type":606,"tag":636,"props":1798,"children":1799},{"style":1014},[1800],{"type":612,"value":1801},"\"Student grades: ",{"type":606,"tag":636,"props":1803,"children":1804},{"style":668},[1805],{"type":612,"value":1022},{"type":606,"tag":636,"props":1807,"children":1808},{"style":651},[1809],{"type":612,"value":1810},"student_grades",{"type":606,"tag":636,"props":1812,"children":1813},{"style":668},[1814],{"type":612,"value":1032},{"type":606,"tag":636,"props":1816,"children":1817},{"style":1014},[1818],{"type":612,"value":1037},{"type":606,"tag":636,"props":1820,"children":1821},{"style":651},[1822],{"type":612,"value":1042},{"type":606,"tag":636,"props":1824,"children":1825},{"class":638,"line":126},[1826],{"type":606,"tag":636,"props":1827,"children":1828},{"emptyLinePlaceholder":13},[1829],{"type":612,"value":947},{"type":606,"tag":636,"props":1831,"children":1832},{"class":638,"line":135},[1833],{"type":606,"tag":636,"props":1834,"children":1835},{"style":642},[1836],{"type":612,"value":1837},"# Conditional key/value\n",{"type":606,"tag":636,"props":1839,"children":1840},{"class":638,"line":144},[1841,1846,1850],{"type":606,"tag":636,"props":1842,"children":1843},{"style":651},[1844],{"type":612,"value":1845},"categorized ",{"type":606,"tag":636,"props":1847,"children":1848},{"style":657},[1849],{"type":612,"value":660},{"type":606,"tag":636,"props":1851,"children":1852},{"style":651},[1853],{"type":612,"value":1699},{"type":606,"tag":636,"props":1855,"children":1856},{"class":638,"line":153},[1857,1862,1867,1872,1876,1880,1885,1890,1895,1899,1903,1907,1912,1916],{"type":606,"tag":636,"props":1858,"children":1859},{"style":651},[1860],{"type":612,"value":1861},"    name: ",{"type":606,"tag":636,"props":1863,"children":1864},{"style":1014},[1865],{"type":612,"value":1866},"'High'",{"type":606,"tag":636,"props":1868,"children":1869},{"style":657},[1870],{"type":612,"value":1871}," if",{"type":606,"tag":636,"props":1873,"children":1874},{"style":651},[1875],{"type":612,"value":1738},{"type":606,"tag":636,"props":1877,"children":1878},{"style":657},[1879],{"type":612,"value":1743},{"type":606,"tag":636,"props":1881,"children":1882},{"style":668},[1883],{"type":612,"value":1884}," 90",{"type":606,"tag":636,"props":1886,"children":1887},{"style":657},[1888],{"type":612,"value":1889}," else",{"type":606,"tag":636,"props":1891,"children":1892},{"style":1014},[1893],{"type":612,"value":1894}," 'Medium'",{"type":606,"tag":636,"props":1896,"children":1897},{"style":657},[1898],{"type":612,"value":1871},{"type":606,"tag":636,"props":1900,"children":1901},{"style":651},[1902],{"type":612,"value":1738},{"type":606,"tag":636,"props":1904,"children":1905},{"style":657},[1906],{"type":612,"value":1743},{"type":606,"tag":636,"props":1908,"children":1909},{"style":668},[1910],{"type":612,"value":1911}," 80",{"type":606,"tag":636,"props":1913,"children":1914},{"style":657},[1915],{"type":612,"value":1889},{"type":606,"tag":636,"props":1917,"children":1918},{"style":1014},[1919],{"type":612,"value":1920}," 'Low'\n",{"type":606,"tag":636,"props":1922,"children":1923},{"class":638,"line":163},[1924,1928,1932,1936,1940],{"type":606,"tag":636,"props":1925,"children":1926},{"style":657},[1927],{"type":612,"value":1756},{"type":606,"tag":636,"props":1929,"children":1930},{"style":651},[1931],{"type":612,"value":1761},{"type":606,"tag":636,"props":1933,"children":1934},{"style":657},[1935],{"type":612,"value":754},{"type":606,"tag":636,"props":1937,"children":1938},{"style":668},[1939],{"type":612,"value":1419},{"type":606,"tag":636,"props":1941,"children":1942},{"style":651},[1943],{"type":612,"value":1774},{"type":606,"tag":636,"props":1945,"children":1946},{"class":638,"line":172},[1947],{"type":606,"tag":636,"props":1948,"children":1949},{"style":651},[1950],{"type":612,"value":1133},{"type":606,"tag":636,"props":1952,"children":1953},{"class":638,"line":181},[1954,1958,1962,1966,1971,1975,1980,1984,1988],{"type":606,"tag":636,"props":1955,"children":1956},{"style":668},[1957],{"type":612,"value":767},{"type":606,"tag":636,"props":1959,"children":1960},{"style":651},[1961],{"type":612,"value":1006},{"type":606,"tag":636,"props":1963,"children":1964},{"style":657},[1965],{"type":612,"value":1011},{"type":606,"tag":636,"props":1967,"children":1968},{"style":1014},[1969],{"type":612,"value":1970},"\"Categorized: ",{"type":606,"tag":636,"props":1972,"children":1973},{"style":668},[1974],{"type":612,"value":1022},{"type":606,"tag":636,"props":1976,"children":1977},{"style":651},[1978],{"type":612,"value":1979},"categorized",{"type":606,"tag":636,"props":1981,"children":1982},{"style":668},[1983],{"type":612,"value":1032},{"type":606,"tag":636,"props":1985,"children":1986},{"style":1014},[1987],{"type":612,"value":1037},{"type":606,"tag":636,"props":1989,"children":1990},{"style":651},[1991],{"type":612,"value":1042},{"type":606,"tag":636,"props":1993,"children":1994},{"class":638,"line":190},[1995],{"type":606,"tag":636,"props":1996,"children":1997},{"emptyLinePlaceholder":13},[1998],{"type":612,"value":947},{"type":606,"tag":636,"props":2000,"children":2001},{"class":638,"line":199},[2002],{"type":606,"tag":636,"props":2003,"children":2004},{"style":642},[2005],{"type":612,"value":2006},"# Transform existing dictionary\n",{"type":606,"tag":636,"props":2008,"children":2009},{"class":638,"line":208},[2010,2015,2019,2023,2028,2032,2036,2040,2045,2049,2053,2057,2062,2066,2070],{"type":606,"tag":636,"props":2011,"children":2012},{"style":651},[2013],{"type":612,"value":2014},"original ",{"type":606,"tag":636,"props":2016,"children":2017},{"style":657},[2018],{"type":612,"value":660},{"type":606,"tag":636,"props":2020,"children":2021},{"style":651},[2022],{"type":612,"value":1627},{"type":606,"tag":636,"props":2024,"children":2025},{"style":1014},[2026],{"type":612,"value":2027},"'a'",{"type":606,"tag":636,"props":2029,"children":2030},{"style":651},[2031],{"type":612,"value":1637},{"type":606,"tag":636,"props":2033,"children":2034},{"style":668},[2035],{"type":612,"value":671},{"type":606,"tag":636,"props":2037,"children":2038},{"style":651},[2039],{"type":612,"value":676},{"type":606,"tag":636,"props":2041,"children":2042},{"style":1014},[2043],{"type":612,"value":2044},"'b'",{"type":606,"tag":636,"props":2046,"children":2047},{"style":651},[2048],{"type":612,"value":1637},{"type":606,"tag":636,"props":2050,"children":2051},{"style":668},[2052],{"type":612,"value":681},{"type":606,"tag":636,"props":2054,"children":2055},{"style":651},[2056],{"type":612,"value":676},{"type":606,"tag":636,"props":2058,"children":2059},{"style":1014},[2060],{"type":612,"value":2061},"'c'",{"type":606,"tag":636,"props":2063,"children":2064},{"style":651},[2065],{"type":612,"value":1637},{"type":606,"tag":636,"props":2067,"children":2068},{"style":668},[2069],{"type":612,"value":690},{"type":606,"tag":636,"props":2071,"children":2072},{"style":651},[2073],{"type":612,"value":1133},{"type":606,"tag":636,"props":2075,"children":2076},{"class":638,"line":217},[2077,2082,2086,2091,2096,2101,2105,2110,2114],{"type":606,"tag":636,"props":2078,"children":2079},{"style":651},[2080],{"type":612,"value":2081},"transformed ",{"type":606,"tag":636,"props":2083,"children":2084},{"style":657},[2085],{"type":612,"value":660},{"type":606,"tag":636,"props":2087,"children":2088},{"style":651},[2089],{"type":612,"value":2090}," {k.upper(): v ",{"type":606,"tag":636,"props":2092,"children":2093},{"style":657},[2094],{"type":612,"value":2095},"*",{"type":606,"tag":636,"props":2097,"children":2098},{"style":668},[2099],{"type":612,"value":2100}," 10",{"type":606,"tag":636,"props":2102,"children":2103},{"style":657},[2104],{"type":612,"value":744},{"type":606,"tag":636,"props":2106,"children":2107},{"style":651},[2108],{"type":612,"value":2109}," k, v ",{"type":606,"tag":636,"props":2111,"children":2112},{"style":657},[2113],{"type":612,"value":754},{"type":606,"tag":636,"props":2115,"children":2116},{"style":651},[2117],{"type":612,"value":2118}," original.items()}\n",{"type":606,"tag":636,"props":2120,"children":2121},{"class":638,"line":227},[2122,2126,2130,2134,2139,2143,2148,2152,2156],{"type":606,"tag":636,"props":2123,"children":2124},{"style":668},[2125],{"type":612,"value":767},{"type":606,"tag":636,"props":2127,"children":2128},{"style":651},[2129],{"type":612,"value":1006},{"type":606,"tag":636,"props":2131,"children":2132},{"style":657},[2133],{"type":612,"value":1011},{"type":606,"tag":636,"props":2135,"children":2136},{"style":1014},[2137],{"type":612,"value":2138},"\"Transformed: ",{"type":606,"tag":636,"props":2140,"children":2141},{"style":668},[2142],{"type":612,"value":1022},{"type":606,"tag":636,"props":2144,"children":2145},{"style":651},[2146],{"type":612,"value":2147},"transformed",{"type":606,"tag":636,"props":2149,"children":2150},{"style":668},[2151],{"type":612,"value":1032},{"type":606,"tag":636,"props":2153,"children":2154},{"style":1014},[2155],{"type":612,"value":1037},{"type":606,"tag":636,"props":2157,"children":2158},{"style":651},[2159],{"type":612,"value":1042},{"type":606,"tag":636,"props":2161,"children":2162},{"class":638,"line":236},[2163],{"type":606,"tag":636,"props":2164,"children":2165},{"emptyLinePlaceholder":13},[2166],{"type":612,"value":947},{"type":606,"tag":636,"props":2168,"children":2169},{"class":638,"line":245},[2170],{"type":606,"tag":636,"props":2171,"children":2172},{"style":642},[2173],{"type":612,"value":2174},"# Multiple conditions\n",{"type":606,"tag":636,"props":2176,"children":2177},{"class":638,"line":254},[2178,2183,2187],{"type":606,"tag":636,"props":2179,"children":2180},{"style":651},[2181],{"type":612,"value":2182},"filtered ",{"type":606,"tag":636,"props":2184,"children":2185},{"style":657},[2186],{"type":612,"value":660},{"type":606,"tag":636,"props":2188,"children":2189},{"style":651},[2190],{"type":612,"value":1699},{"type":606,"tag":636,"props":2192,"children":2193},{"class":638,"line":263},[2194,2199,2203,2207,2211,2215],{"type":606,"tag":636,"props":2195,"children":2196},{"style":651},[2197],{"type":612,"value":2198},"    name: score ",{"type":606,"tag":636,"props":2200,"children":2201},{"style":657},[2202],{"type":612,"value":1228},{"type":606,"tag":636,"props":2204,"children":2205},{"style":651},[2206],{"type":612,"value":1761},{"type":606,"tag":636,"props":2208,"children":2209},{"style":657},[2210],{"type":612,"value":754},{"type":606,"tag":636,"props":2212,"children":2213},{"style":668},[2214],{"type":612,"value":1419},{"type":606,"tag":636,"props":2216,"children":2217},{"style":651},[2218],{"type":612,"value":1774},{"type":606,"tag":636,"props":2220,"children":2221},{"class":638,"line":272},[2222,2227,2232,2237,2242,2247,2252,2256,2260],{"type":606,"tag":636,"props":2223,"children":2224},{"style":657},[2225],{"type":612,"value":2226},"    if",{"type":606,"tag":636,"props":2228,"children":2229},{"style":668},[2230],{"type":612,"value":2231}," len",{"type":606,"tag":636,"props":2233,"children":2234},{"style":651},[2235],{"type":612,"value":2236},"(name) ",{"type":606,"tag":636,"props":2238,"children":2239},{"style":657},[2240],{"type":612,"value":2241},">",{"type":606,"tag":636,"props":2243,"children":2244},{"style":668},[2245],{"type":612,"value":2246}," 3",{"type":606,"tag":636,"props":2248,"children":2249},{"style":657},[2250],{"type":612,"value":2251}," and",{"type":606,"tag":636,"props":2253,"children":2254},{"style":651},[2255],{"type":612,"value":1738},{"type":606,"tag":636,"props":2257,"children":2258},{"style":657},[2259],{"type":612,"value":1743},{"type":606,"tag":636,"props":2261,"children":2262},{"style":668},[2263],{"type":612,"value":2264}," 85\n",{"type":606,"tag":636,"props":2266,"children":2267},{"class":638,"line":281},[2268],{"type":606,"tag":636,"props":2269,"children":2270},{"style":651},[2271],{"type":612,"value":1133},{"type":606,"tag":636,"props":2273,"children":2274},{"class":638,"line":291},[2275,2279,2283,2287,2292,2296,2301,2305,2309],{"type":606,"tag":636,"props":2276,"children":2277},{"style":668},[2278],{"type":612,"value":767},{"type":606,"tag":636,"props":2280,"children":2281},{"style":651},[2282],{"type":612,"value":1006},{"type":606,"tag":636,"props":2284,"children":2285},{"style":657},[2286],{"type":612,"value":1011},{"type":606,"tag":636,"props":2288,"children":2289},{"style":1014},[2290],{"type":612,"value":2291},"\"Filtered: ",{"type":606,"tag":636,"props":2293,"children":2294},{"style":668},[2295],{"type":612,"value":1022},{"type":606,"tag":636,"props":2297,"children":2298},{"style":651},[2299],{"type":612,"value":2300},"filtered",{"type":606,"tag":636,"props":2302,"children":2303},{"style":668},[2304],{"type":612,"value":1032},{"type":606,"tag":636,"props":2306,"children":2307},{"style":1014},[2308],{"type":612,"value":1037},{"type":606,"tag":636,"props":2310,"children":2311},{"style":651},[2312],{"type":612,"value":1042},{"type":606,"tag":779,"props":2314,"children":2316},{"id":2315},"key-takeaways",[2317],{"type":612,"value":2318},"🎯 Key Takeaways",{"type":606,"tag":791,"props":2320,"children":2324},{"emoji":2321,"title":2322,"type":2323},"📚","Dictionary Comprehension Essentials","success",[2325,2333,2356,2364,2387,2395,2418],{"type":606,"tag":615,"props":2326,"children":2327},{},[2328],{"type":606,"tag":801,"props":2329,"children":2330},{},[2331],{"type":612,"value":2332},"Basic Features:",{"type":606,"tag":807,"props":2334,"children":2335},{},[2336,2341,2346,2351],{"type":606,"tag":811,"props":2337,"children":2338},{},[2339],{"type":612,"value":2340},"Concise dictionary creation",{"type":606,"tag":811,"props":2342,"children":2343},{},[2344],{"type":612,"value":2345},"Built-in filtering with conditions",{"type":606,"tag":811,"props":2347,"children":2348},{},[2349],{"type":612,"value":2350},"Works with any iterable",{"type":606,"tag":811,"props":2352,"children":2353},{},[2354],{"type":612,"value":2355},"Readable and Pythonic",{"type":606,"tag":615,"props":2357,"children":2358},{},[2359],{"type":606,"tag":801,"props":2360,"children":2361},{},[2362],{"type":612,"value":2363},"Advanced Features:",{"type":606,"tag":807,"props":2365,"children":2366},{},[2367,2372,2377,2382],{"type":606,"tag":811,"props":2368,"children":2369},{},[2370],{"type":612,"value":2371},"Nested comprehensions",{"type":606,"tag":811,"props":2373,"children":2374},{},[2375],{"type":612,"value":2376},"Conditional expressions",{"type":606,"tag":811,"props":2378,"children":2379},{},[2380],{"type":612,"value":2381},"Multiple conditions",{"type":606,"tag":811,"props":2383,"children":2384},{},[2385],{"type":612,"value":2386},"Transform existing dictionaries",{"type":606,"tag":615,"props":2388,"children":2389},{},[2390],{"type":606,"tag":801,"props":2391,"children":2392},{},[2393],{"type":612,"value":2394},"Best Practices:",{"type":606,"tag":807,"props":2396,"children":2397},{},[2398,2403,2408,2413],{"type":606,"tag":811,"props":2399,"children":2400},{},[2401],{"type":612,"value":2402},"Keep comprehensions readable",{"type":606,"tag":811,"props":2404,"children":2405},{},[2406],{"type":612,"value":2407},"Use for simple transformations",{"type":606,"tag":811,"props":2409,"children":2410},{},[2411],{"type":612,"value":2412},"Break complex logic into functions",{"type":606,"tag":811,"props":2414,"children":2415},{},[2416],{"type":612,"value":2417},"Consider performance for large datasets",{"type":606,"tag":615,"props":2419,"children":2420},{},[2421,2426],{"type":606,"tag":801,"props":2422,"children":2423},{},[2424],{"type":612,"value":2425},"Remember:",{"type":612,"value":2427}," Dictionary comprehensions are powerful but should remain readable - use regular loops for complex logic!",{"type":606,"tag":2429,"props":2430,"children":2431},"style",{},[2432],{"type":612,"value":2433},"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":2435},[2436,2439,2440],{"id":781,"depth":27,"text":784,"children":2437},[2438],{"id":863,"depth":36,"text":866},{"id":1468,"depth":27,"text":1471},{"id":2315,"depth":27,"text":2318},1782373755897]