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