[{"data":1,"prerenderedAt":2047},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/sort-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},"/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",[167],{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"body":602,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},{"type":603,"children":604,"toc":2040},"root",[605,614,620,804,811,816,896,903,1281,1287,1292,1913,1919,2034],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"sorting-dictionaries",[611],{"type":612,"value":613},"text","📊 Sorting Dictionaries",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Python provides multiple ways to sort dictionaries by keys or values. Understanding these methods is essential for data organization and presentation.",{"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 sorting\nscores = {'Alice': 85, 'Bob': 92, 'Charlie': 78}\nsorted_by_name = dict(sorted(scores.items()))\nprint(f\"Sorted by name: {sorted_by_name}\")\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,725,757],{"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 sorting\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649,655,661,666,672,677,683,688,693,697,702,706,711,715,720],{"type":606,"tag":636,"props":650,"children":652},{"style":651},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[653],{"type":612,"value":654},"scores ",{"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},"'Alice'",{"type":606,"tag":636,"props":673,"children":674},{"style":651},[675],{"type":612,"value":676},": ",{"type":606,"tag":636,"props":678,"children":680},{"style":679},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[681],{"type":612,"value":682},"85",{"type":606,"tag":636,"props":684,"children":685},{"style":651},[686],{"type":612,"value":687},", ",{"type":606,"tag":636,"props":689,"children":690},{"style":668},[691],{"type":612,"value":692},"'Bob'",{"type":606,"tag":636,"props":694,"children":695},{"style":651},[696],{"type":612,"value":676},{"type":606,"tag":636,"props":698,"children":699},{"style":679},[700],{"type":612,"value":701},"92",{"type":606,"tag":636,"props":703,"children":704},{"style":651},[705],{"type":612,"value":687},{"type":606,"tag":636,"props":707,"children":708},{"style":668},[709],{"type":612,"value":710},"'Charlie'",{"type":606,"tag":636,"props":712,"children":713},{"style":651},[714],{"type":612,"value":676},{"type":606,"tag":636,"props":716,"children":717},{"style":679},[718],{"type":612,"value":719},"78",{"type":606,"tag":636,"props":721,"children":722},{"style":651},[723],{"type":612,"value":724},"}\n",{"type":606,"tag":636,"props":726,"children":727},{"class":638,"line":36},[728,733,737,742,747,752],{"type":606,"tag":636,"props":729,"children":730},{"style":651},[731],{"type":612,"value":732},"sorted_by_name ",{"type":606,"tag":636,"props":734,"children":735},{"style":657},[736],{"type":612,"value":660},{"type":606,"tag":636,"props":738,"children":739},{"style":679},[740],{"type":612,"value":741}," dict",{"type":606,"tag":636,"props":743,"children":744},{"style":651},[745],{"type":612,"value":746},"(",{"type":606,"tag":636,"props":748,"children":749},{"style":679},[750],{"type":612,"value":751},"sorted",{"type":606,"tag":636,"props":753,"children":754},{"style":651},[755],{"type":612,"value":756},"(scores.items()))\n",{"type":606,"tag":636,"props":758,"children":759},{"class":638,"line":45},[760,765,769,774,779,784,789,794,799],{"type":606,"tag":636,"props":761,"children":762},{"style":679},[763],{"type":612,"value":764},"print",{"type":606,"tag":636,"props":766,"children":767},{"style":651},[768],{"type":612,"value":746},{"type":606,"tag":636,"props":770,"children":771},{"style":657},[772],{"type":612,"value":773},"f",{"type":606,"tag":636,"props":775,"children":776},{"style":668},[777],{"type":612,"value":778},"\"Sorted by name: ",{"type":606,"tag":636,"props":780,"children":781},{"style":679},[782],{"type":612,"value":783},"{",{"type":606,"tag":636,"props":785,"children":786},{"style":651},[787],{"type":612,"value":788},"sorted_by_name",{"type":606,"tag":636,"props":790,"children":791},{"style":679},[792],{"type":612,"value":793},"}",{"type":606,"tag":636,"props":795,"children":796},{"style":668},[797],{"type":612,"value":798},"\"",{"type":606,"tag":636,"props":800,"children":801},{"style":651},[802],{"type":612,"value":803},")\n",{"type":606,"tag":805,"props":806,"children":808},"h2",{"id":807},"sorting-methods",[809],{"type":612,"value":810},"🎯 Sorting Methods",{"type":606,"tag":615,"props":812,"children":813},{},[814],{"type":612,"value":815},"Python offers several approaches to sort dictionaries.",{"type":606,"tag":817,"props":818,"children":822},"info-box",{"emoji":819,"title":820,"type":821},"📝","Sorting Methods","info",[823,832,870,878],{"type":606,"tag":615,"props":824,"children":825},{},[826],{"type":606,"tag":827,"props":828,"children":829},"strong",{},[830],{"type":612,"value":831},"Basic Methods:",{"type":606,"tag":833,"props":834,"children":835},"ul",{},[836,848,859],{"type":606,"tag":837,"props":838,"children":839},"li",{},[840,846],{"type":606,"tag":632,"props":841,"children":843},{"className":842},[],[844],{"type":612,"value":845},"sorted(dict.items())",{"type":612,"value":847},": Sort by keys",{"type":606,"tag":837,"props":849,"children":850},{},[851,857],{"type":606,"tag":632,"props":852,"children":854},{"className":853},[],[855],{"type":612,"value":856},"sorted(dict.items(), key=lambda x: x[1])",{"type":612,"value":858},": Sort by values",{"type":606,"tag":837,"props":860,"children":861},{},[862,868],{"type":606,"tag":632,"props":863,"children":865},{"className":864},[],[866],{"type":612,"value":867},"sorted(dict.items(), key=lambda x: x[0])",{"type":612,"value":869},": Sort by keys explicitly",{"type":606,"tag":615,"props":871,"children":872},{},[873],{"type":606,"tag":827,"props":874,"children":875},{},[876],{"type":612,"value":877},"Advanced Methods:",{"type":606,"tag":833,"props":879,"children":880},{},[881,886,891],{"type":606,"tag":837,"props":882,"children":883},{},[884],{"type":612,"value":885},"Custom key functions",{"type":606,"tag":837,"props":887,"children":888},{},[889],{"type":612,"value":890},"Multiple sort criteria",{"type":606,"tag":837,"props":892,"children":893},{},[894],{"type":612,"value":895},"Reverse sorting",{"type":606,"tag":897,"props":898,"children":900},"h3",{"id":899},"basic-examples",[901],{"type":612,"value":902},"Basic Examples",{"type":606,"tag":621,"props":904,"children":905},{},[906],{"type":606,"tag":625,"props":907,"children":909},{"className":627,"code":908,"language":629,"meta":8,"style":8},"# Different ways to sort dictionaries\nscores = {'Alice': 85, 'Bob': 92, 'Charlie': 78}\n\n# Sort by keys\nsorted_by_name = dict(sorted(scores.items()))\nprint(f\"Sorted by name: {sorted_by_name}\")\n\n# Sort by values\nsorted_by_score = dict(sorted(scores.items(), key=lambda x: x[1]))\nprint(f\"Sorted by score: {sorted_by_score}\")\n\n# Sort in reverse order\nsorted_reverse = dict(sorted(scores.items(), reverse=True))\nprint(f\"Reverse sorted: {sorted_reverse}\")\n",[910],{"type":606,"tag":632,"props":911,"children":912},{"__ignoreMap":8},[913,921,984,992,1000,1027,1066,1073,1081,1137,1178,1185,1193,1240],{"type":606,"tag":636,"props":914,"children":915},{"class":638,"line":12},[916],{"type":606,"tag":636,"props":917,"children":918},{"style":642},[919],{"type":612,"value":920},"# Different ways to sort dictionaries\n",{"type":606,"tag":636,"props":922,"children":923},{"class":638,"line":27},[924,928,932,936,940,944,948,952,956,960,964,968,972,976,980],{"type":606,"tag":636,"props":925,"children":926},{"style":651},[927],{"type":612,"value":654},{"type":606,"tag":636,"props":929,"children":930},{"style":657},[931],{"type":612,"value":660},{"type":606,"tag":636,"props":933,"children":934},{"style":651},[935],{"type":612,"value":665},{"type":606,"tag":636,"props":937,"children":938},{"style":668},[939],{"type":612,"value":671},{"type":606,"tag":636,"props":941,"children":942},{"style":651},[943],{"type":612,"value":676},{"type":606,"tag":636,"props":945,"children":946},{"style":679},[947],{"type":612,"value":682},{"type":606,"tag":636,"props":949,"children":950},{"style":651},[951],{"type":612,"value":687},{"type":606,"tag":636,"props":953,"children":954},{"style":668},[955],{"type":612,"value":692},{"type":606,"tag":636,"props":957,"children":958},{"style":651},[959],{"type":612,"value":676},{"type":606,"tag":636,"props":961,"children":962},{"style":679},[963],{"type":612,"value":701},{"type":606,"tag":636,"props":965,"children":966},{"style":651},[967],{"type":612,"value":687},{"type":606,"tag":636,"props":969,"children":970},{"style":668},[971],{"type":612,"value":710},{"type":606,"tag":636,"props":973,"children":974},{"style":651},[975],{"type":612,"value":676},{"type":606,"tag":636,"props":977,"children":978},{"style":679},[979],{"type":612,"value":719},{"type":606,"tag":636,"props":981,"children":982},{"style":651},[983],{"type":612,"value":724},{"type":606,"tag":636,"props":985,"children":986},{"class":638,"line":36},[987],{"type":606,"tag":636,"props":988,"children":989},{"emptyLinePlaceholder":13},[990],{"type":612,"value":991},"\n",{"type":606,"tag":636,"props":993,"children":994},{"class":638,"line":45},[995],{"type":606,"tag":636,"props":996,"children":997},{"style":642},[998],{"type":612,"value":999},"# Sort by keys\n",{"type":606,"tag":636,"props":1001,"children":1002},{"class":638,"line":54},[1003,1007,1011,1015,1019,1023],{"type":606,"tag":636,"props":1004,"children":1005},{"style":651},[1006],{"type":612,"value":732},{"type":606,"tag":636,"props":1008,"children":1009},{"style":657},[1010],{"type":612,"value":660},{"type":606,"tag":636,"props":1012,"children":1013},{"style":679},[1014],{"type":612,"value":741},{"type":606,"tag":636,"props":1016,"children":1017},{"style":651},[1018],{"type":612,"value":746},{"type":606,"tag":636,"props":1020,"children":1021},{"style":679},[1022],{"type":612,"value":751},{"type":606,"tag":636,"props":1024,"children":1025},{"style":651},[1026],{"type":612,"value":756},{"type":606,"tag":636,"props":1028,"children":1029},{"class":638,"line":63},[1030,1034,1038,1042,1046,1050,1054,1058,1062],{"type":606,"tag":636,"props":1031,"children":1032},{"style":679},[1033],{"type":612,"value":764},{"type":606,"tag":636,"props":1035,"children":1036},{"style":651},[1037],{"type":612,"value":746},{"type":606,"tag":636,"props":1039,"children":1040},{"style":657},[1041],{"type":612,"value":773},{"type":606,"tag":636,"props":1043,"children":1044},{"style":668},[1045],{"type":612,"value":778},{"type":606,"tag":636,"props":1047,"children":1048},{"style":679},[1049],{"type":612,"value":783},{"type":606,"tag":636,"props":1051,"children":1052},{"style":651},[1053],{"type":612,"value":788},{"type":606,"tag":636,"props":1055,"children":1056},{"style":679},[1057],{"type":612,"value":793},{"type":606,"tag":636,"props":1059,"children":1060},{"style":668},[1061],{"type":612,"value":798},{"type":606,"tag":636,"props":1063,"children":1064},{"style":651},[1065],{"type":612,"value":803},{"type":606,"tag":636,"props":1067,"children":1068},{"class":638,"line":72},[1069],{"type":606,"tag":636,"props":1070,"children":1071},{"emptyLinePlaceholder":13},[1072],{"type":612,"value":991},{"type":606,"tag":636,"props":1074,"children":1075},{"class":638,"line":81},[1076],{"type":606,"tag":636,"props":1077,"children":1078},{"style":642},[1079],{"type":612,"value":1080},"# Sort by values\n",{"type":606,"tag":636,"props":1082,"children":1084},{"class":638,"line":1083},9,[1085,1090,1094,1098,1102,1106,1111,1117,1122,1127,1132],{"type":606,"tag":636,"props":1086,"children":1087},{"style":651},[1088],{"type":612,"value":1089},"sorted_by_score ",{"type":606,"tag":636,"props":1091,"children":1092},{"style":657},[1093],{"type":612,"value":660},{"type":606,"tag":636,"props":1095,"children":1096},{"style":679},[1097],{"type":612,"value":741},{"type":606,"tag":636,"props":1099,"children":1100},{"style":651},[1101],{"type":612,"value":746},{"type":606,"tag":636,"props":1103,"children":1104},{"style":679},[1105],{"type":612,"value":751},{"type":606,"tag":636,"props":1107,"children":1108},{"style":651},[1109],{"type":612,"value":1110},"(scores.items(), ",{"type":606,"tag":636,"props":1112,"children":1114},{"style":1113},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1115],{"type":612,"value":1116},"key",{"type":606,"tag":636,"props":1118,"children":1119},{"style":657},[1120],{"type":612,"value":1121},"=lambda",{"type":606,"tag":636,"props":1123,"children":1124},{"style":651},[1125],{"type":612,"value":1126}," x: x[",{"type":606,"tag":636,"props":1128,"children":1129},{"style":679},[1130],{"type":612,"value":1131},"1",{"type":606,"tag":636,"props":1133,"children":1134},{"style":651},[1135],{"type":612,"value":1136},"]))\n",{"type":606,"tag":636,"props":1138,"children":1139},{"class":638,"line":99},[1140,1144,1148,1152,1157,1161,1166,1170,1174],{"type":606,"tag":636,"props":1141,"children":1142},{"style":679},[1143],{"type":612,"value":764},{"type":606,"tag":636,"props":1145,"children":1146},{"style":651},[1147],{"type":612,"value":746},{"type":606,"tag":636,"props":1149,"children":1150},{"style":657},[1151],{"type":612,"value":773},{"type":606,"tag":636,"props":1153,"children":1154},{"style":668},[1155],{"type":612,"value":1156},"\"Sorted by score: ",{"type":606,"tag":636,"props":1158,"children":1159},{"style":679},[1160],{"type":612,"value":783},{"type":606,"tag":636,"props":1162,"children":1163},{"style":651},[1164],{"type":612,"value":1165},"sorted_by_score",{"type":606,"tag":636,"props":1167,"children":1168},{"style":679},[1169],{"type":612,"value":793},{"type":606,"tag":636,"props":1171,"children":1172},{"style":668},[1173],{"type":612,"value":798},{"type":606,"tag":636,"props":1175,"children":1176},{"style":651},[1177],{"type":612,"value":803},{"type":606,"tag":636,"props":1179,"children":1180},{"class":638,"line":108},[1181],{"type":606,"tag":636,"props":1182,"children":1183},{"emptyLinePlaceholder":13},[1184],{"type":612,"value":991},{"type":606,"tag":636,"props":1186,"children":1187},{"class":638,"line":117},[1188],{"type":606,"tag":636,"props":1189,"children":1190},{"style":642},[1191],{"type":612,"value":1192},"# Sort in reverse order\n",{"type":606,"tag":636,"props":1194,"children":1195},{"class":638,"line":126},[1196,1201,1205,1209,1213,1217,1221,1226,1230,1235],{"type":606,"tag":636,"props":1197,"children":1198},{"style":651},[1199],{"type":612,"value":1200},"sorted_reverse ",{"type":606,"tag":636,"props":1202,"children":1203},{"style":657},[1204],{"type":612,"value":660},{"type":606,"tag":636,"props":1206,"children":1207},{"style":679},[1208],{"type":612,"value":741},{"type":606,"tag":636,"props":1210,"children":1211},{"style":651},[1212],{"type":612,"value":746},{"type":606,"tag":636,"props":1214,"children":1215},{"style":679},[1216],{"type":612,"value":751},{"type":606,"tag":636,"props":1218,"children":1219},{"style":651},[1220],{"type":612,"value":1110},{"type":606,"tag":636,"props":1222,"children":1223},{"style":1113},[1224],{"type":612,"value":1225},"reverse",{"type":606,"tag":636,"props":1227,"children":1228},{"style":657},[1229],{"type":612,"value":660},{"type":606,"tag":636,"props":1231,"children":1232},{"style":679},[1233],{"type":612,"value":1234},"True",{"type":606,"tag":636,"props":1236,"children":1237},{"style":651},[1238],{"type":612,"value":1239},"))\n",{"type":606,"tag":636,"props":1241,"children":1242},{"class":638,"line":135},[1243,1247,1251,1255,1260,1264,1269,1273,1277],{"type":606,"tag":636,"props":1244,"children":1245},{"style":679},[1246],{"type":612,"value":764},{"type":606,"tag":636,"props":1248,"children":1249},{"style":651},[1250],{"type":612,"value":746},{"type":606,"tag":636,"props":1252,"children":1253},{"style":657},[1254],{"type":612,"value":773},{"type":606,"tag":636,"props":1256,"children":1257},{"style":668},[1258],{"type":612,"value":1259},"\"Reverse sorted: ",{"type":606,"tag":636,"props":1261,"children":1262},{"style":679},[1263],{"type":612,"value":783},{"type":606,"tag":636,"props":1265,"children":1266},{"style":651},[1267],{"type":612,"value":1268},"sorted_reverse",{"type":606,"tag":636,"props":1270,"children":1271},{"style":679},[1272],{"type":612,"value":793},{"type":606,"tag":636,"props":1274,"children":1275},{"style":668},[1276],{"type":612,"value":798},{"type":606,"tag":636,"props":1278,"children":1279},{"style":651},[1280],{"type":612,"value":803},{"type":606,"tag":805,"props":1282,"children":1284},{"id":1283},"advanced-sorting",[1285],{"type":612,"value":1286},"🔍 Advanced Sorting",{"type":606,"tag":615,"props":1288,"children":1289},{},[1290],{"type":612,"value":1291},"Python allows more sophisticated dictionary sorting operations.",{"type":606,"tag":621,"props":1293,"children":1294},{},[1295],{"type":606,"tag":625,"props":1296,"children":1298},{"className":627,"code":1297,"language":629,"meta":8,"style":8},"# Advanced sorting examples\nstudents = {\n    'Alice': {'age': 20, 'score': 85},\n    'Bob': {'age': 19, 'score': 92},\n    'Charlie': {'age': 21, 'score': 78}\n}\n\n# Sort by nested value\nsorted_by_age = dict(sorted(students.items(), \n                           key=lambda x: x[1]['age']))\nprint(f\"Sorted by age: {sorted_by_age}\")\n\n# Sort by multiple criteria\nsorted_by_score_age = dict(sorted(students.items(),\n    key=lambda x: (-x[1]['score'], x[1]['age'])))\nprint(f\"Sorted by score (desc) and age (asc): {sorted_by_score_age}\")\n\n# Custom sorting function\ndef get_average_score(student):\n    return sum(student[1].values()) / len(student[1])\n\nsorted_by_avg = dict(sorted(students.items(),\n                           key=get_average_score))\nprint(f\"Sorted by average: {sorted_by_avg}\")\n",[1299],{"type":606,"tag":632,"props":1300,"children":1301},{"__ignoreMap":8},[1302,1310,1327,1376,1421,1466,1473,1480,1488,1517,1550,1591,1598,1606,1635,1696,1737,1744,1752,1771,1821,1828,1856,1872],{"type":606,"tag":636,"props":1303,"children":1304},{"class":638,"line":12},[1305],{"type":606,"tag":636,"props":1306,"children":1307},{"style":642},[1308],{"type":612,"value":1309},"# Advanced sorting examples\n",{"type":606,"tag":636,"props":1311,"children":1312},{"class":638,"line":27},[1313,1318,1322],{"type":606,"tag":636,"props":1314,"children":1315},{"style":651},[1316],{"type":612,"value":1317},"students ",{"type":606,"tag":636,"props":1319,"children":1320},{"style":657},[1321],{"type":612,"value":660},{"type":606,"tag":636,"props":1323,"children":1324},{"style":651},[1325],{"type":612,"value":1326}," {\n",{"type":606,"tag":636,"props":1328,"children":1329},{"class":638,"line":36},[1330,1335,1340,1345,1349,1354,1358,1363,1367,1371],{"type":606,"tag":636,"props":1331,"children":1332},{"style":668},[1333],{"type":612,"value":1334},"    'Alice'",{"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":1344},"'age'",{"type":606,"tag":636,"props":1346,"children":1347},{"style":651},[1348],{"type":612,"value":676},{"type":606,"tag":636,"props":1350,"children":1351},{"style":679},[1352],{"type":612,"value":1353},"20",{"type":606,"tag":636,"props":1355,"children":1356},{"style":651},[1357],{"type":612,"value":687},{"type":606,"tag":636,"props":1359,"children":1360},{"style":668},[1361],{"type":612,"value":1362},"'score'",{"type":606,"tag":636,"props":1364,"children":1365},{"style":651},[1366],{"type":612,"value":676},{"type":606,"tag":636,"props":1368,"children":1369},{"style":679},[1370],{"type":612,"value":682},{"type":606,"tag":636,"props":1372,"children":1373},{"style":651},[1374],{"type":612,"value":1375},"},\n",{"type":606,"tag":636,"props":1377,"children":1378},{"class":638,"line":45},[1379,1384,1388,1392,1396,1401,1405,1409,1413,1417],{"type":606,"tag":636,"props":1380,"children":1381},{"style":668},[1382],{"type":612,"value":1383},"    'Bob'",{"type":606,"tag":636,"props":1385,"children":1386},{"style":651},[1387],{"type":612,"value":1339},{"type":606,"tag":636,"props":1389,"children":1390},{"style":668},[1391],{"type":612,"value":1344},{"type":606,"tag":636,"props":1393,"children":1394},{"style":651},[1395],{"type":612,"value":676},{"type":606,"tag":636,"props":1397,"children":1398},{"style":679},[1399],{"type":612,"value":1400},"19",{"type":606,"tag":636,"props":1402,"children":1403},{"style":651},[1404],{"type":612,"value":687},{"type":606,"tag":636,"props":1406,"children":1407},{"style":668},[1408],{"type":612,"value":1362},{"type":606,"tag":636,"props":1410,"children":1411},{"style":651},[1412],{"type":612,"value":676},{"type":606,"tag":636,"props":1414,"children":1415},{"style":679},[1416],{"type":612,"value":701},{"type":606,"tag":636,"props":1418,"children":1419},{"style":651},[1420],{"type":612,"value":1375},{"type":606,"tag":636,"props":1422,"children":1423},{"class":638,"line":54},[1424,1429,1433,1437,1441,1446,1450,1454,1458,1462],{"type":606,"tag":636,"props":1425,"children":1426},{"style":668},[1427],{"type":612,"value":1428},"    'Charlie'",{"type":606,"tag":636,"props":1430,"children":1431},{"style":651},[1432],{"type":612,"value":1339},{"type":606,"tag":636,"props":1434,"children":1435},{"style":668},[1436],{"type":612,"value":1344},{"type":606,"tag":636,"props":1438,"children":1439},{"style":651},[1440],{"type":612,"value":676},{"type":606,"tag":636,"props":1442,"children":1443},{"style":679},[1444],{"type":612,"value":1445},"21",{"type":606,"tag":636,"props":1447,"children":1448},{"style":651},[1449],{"type":612,"value":687},{"type":606,"tag":636,"props":1451,"children":1452},{"style":668},[1453],{"type":612,"value":1362},{"type":606,"tag":636,"props":1455,"children":1456},{"style":651},[1457],{"type":612,"value":676},{"type":606,"tag":636,"props":1459,"children":1460},{"style":679},[1461],{"type":612,"value":719},{"type":606,"tag":636,"props":1463,"children":1464},{"style":651},[1465],{"type":612,"value":724},{"type":606,"tag":636,"props":1467,"children":1468},{"class":638,"line":63},[1469],{"type":606,"tag":636,"props":1470,"children":1471},{"style":651},[1472],{"type":612,"value":724},{"type":606,"tag":636,"props":1474,"children":1475},{"class":638,"line":72},[1476],{"type":606,"tag":636,"props":1477,"children":1478},{"emptyLinePlaceholder":13},[1479],{"type":612,"value":991},{"type":606,"tag":636,"props":1481,"children":1482},{"class":638,"line":81},[1483],{"type":606,"tag":636,"props":1484,"children":1485},{"style":642},[1486],{"type":612,"value":1487},"# Sort by nested value\n",{"type":606,"tag":636,"props":1489,"children":1490},{"class":638,"line":1083},[1491,1496,1500,1504,1508,1512],{"type":606,"tag":636,"props":1492,"children":1493},{"style":651},[1494],{"type":612,"value":1495},"sorted_by_age ",{"type":606,"tag":636,"props":1497,"children":1498},{"style":657},[1499],{"type":612,"value":660},{"type":606,"tag":636,"props":1501,"children":1502},{"style":679},[1503],{"type":612,"value":741},{"type":606,"tag":636,"props":1505,"children":1506},{"style":651},[1507],{"type":612,"value":746},{"type":606,"tag":636,"props":1509,"children":1510},{"style":679},[1511],{"type":612,"value":751},{"type":606,"tag":636,"props":1513,"children":1514},{"style":651},[1515],{"type":612,"value":1516},"(students.items(), \n",{"type":606,"tag":636,"props":1518,"children":1519},{"class":638,"line":99},[1520,1525,1529,1533,1537,1542,1546],{"type":606,"tag":636,"props":1521,"children":1522},{"style":1113},[1523],{"type":612,"value":1524},"                           key",{"type":606,"tag":636,"props":1526,"children":1527},{"style":657},[1528],{"type":612,"value":1121},{"type":606,"tag":636,"props":1530,"children":1531},{"style":651},[1532],{"type":612,"value":1126},{"type":606,"tag":636,"props":1534,"children":1535},{"style":679},[1536],{"type":612,"value":1131},{"type":606,"tag":636,"props":1538,"children":1539},{"style":651},[1540],{"type":612,"value":1541},"][",{"type":606,"tag":636,"props":1543,"children":1544},{"style":668},[1545],{"type":612,"value":1344},{"type":606,"tag":636,"props":1547,"children":1548},{"style":651},[1549],{"type":612,"value":1136},{"type":606,"tag":636,"props":1551,"children":1552},{"class":638,"line":108},[1553,1557,1561,1565,1570,1574,1579,1583,1587],{"type":606,"tag":636,"props":1554,"children":1555},{"style":679},[1556],{"type":612,"value":764},{"type":606,"tag":636,"props":1558,"children":1559},{"style":651},[1560],{"type":612,"value":746},{"type":606,"tag":636,"props":1562,"children":1563},{"style":657},[1564],{"type":612,"value":773},{"type":606,"tag":636,"props":1566,"children":1567},{"style":668},[1568],{"type":612,"value":1569},"\"Sorted by age: ",{"type":606,"tag":636,"props":1571,"children":1572},{"style":679},[1573],{"type":612,"value":783},{"type":606,"tag":636,"props":1575,"children":1576},{"style":651},[1577],{"type":612,"value":1578},"sorted_by_age",{"type":606,"tag":636,"props":1580,"children":1581},{"style":679},[1582],{"type":612,"value":793},{"type":606,"tag":636,"props":1584,"children":1585},{"style":668},[1586],{"type":612,"value":798},{"type":606,"tag":636,"props":1588,"children":1589},{"style":651},[1590],{"type":612,"value":803},{"type":606,"tag":636,"props":1592,"children":1593},{"class":638,"line":117},[1594],{"type":606,"tag":636,"props":1595,"children":1596},{"emptyLinePlaceholder":13},[1597],{"type":612,"value":991},{"type":606,"tag":636,"props":1599,"children":1600},{"class":638,"line":126},[1601],{"type":606,"tag":636,"props":1602,"children":1603},{"style":642},[1604],{"type":612,"value":1605},"# Sort by multiple criteria\n",{"type":606,"tag":636,"props":1607,"children":1608},{"class":638,"line":135},[1609,1614,1618,1622,1626,1630],{"type":606,"tag":636,"props":1610,"children":1611},{"style":651},[1612],{"type":612,"value":1613},"sorted_by_score_age ",{"type":606,"tag":636,"props":1615,"children":1616},{"style":657},[1617],{"type":612,"value":660},{"type":606,"tag":636,"props":1619,"children":1620},{"style":679},[1621],{"type":612,"value":741},{"type":606,"tag":636,"props":1623,"children":1624},{"style":651},[1625],{"type":612,"value":746},{"type":606,"tag":636,"props":1627,"children":1628},{"style":679},[1629],{"type":612,"value":751},{"type":606,"tag":636,"props":1631,"children":1632},{"style":651},[1633],{"type":612,"value":1634},"(students.items(),\n",{"type":606,"tag":636,"props":1636,"children":1637},{"class":638,"line":144},[1638,1643,1647,1652,1657,1662,1666,1670,1674,1679,1683,1687,1691],{"type":606,"tag":636,"props":1639,"children":1640},{"style":1113},[1641],{"type":612,"value":1642},"    key",{"type":606,"tag":636,"props":1644,"children":1645},{"style":657},[1646],{"type":612,"value":1121},{"type":606,"tag":636,"props":1648,"children":1649},{"style":651},[1650],{"type":612,"value":1651}," x: (",{"type":606,"tag":636,"props":1653,"children":1654},{"style":657},[1655],{"type":612,"value":1656},"-",{"type":606,"tag":636,"props":1658,"children":1659},{"style":651},[1660],{"type":612,"value":1661},"x[",{"type":606,"tag":636,"props":1663,"children":1664},{"style":679},[1665],{"type":612,"value":1131},{"type":606,"tag":636,"props":1667,"children":1668},{"style":651},[1669],{"type":612,"value":1541},{"type":606,"tag":636,"props":1671,"children":1672},{"style":668},[1673],{"type":612,"value":1362},{"type":606,"tag":636,"props":1675,"children":1676},{"style":651},[1677],{"type":612,"value":1678},"], x[",{"type":606,"tag":636,"props":1680,"children":1681},{"style":679},[1682],{"type":612,"value":1131},{"type":606,"tag":636,"props":1684,"children":1685},{"style":651},[1686],{"type":612,"value":1541},{"type":606,"tag":636,"props":1688,"children":1689},{"style":668},[1690],{"type":612,"value":1344},{"type":606,"tag":636,"props":1692,"children":1693},{"style":651},[1694],{"type":612,"value":1695},"])))\n",{"type":606,"tag":636,"props":1697,"children":1698},{"class":638,"line":153},[1699,1703,1707,1711,1716,1720,1725,1729,1733],{"type":606,"tag":636,"props":1700,"children":1701},{"style":679},[1702],{"type":612,"value":764},{"type":606,"tag":636,"props":1704,"children":1705},{"style":651},[1706],{"type":612,"value":746},{"type":606,"tag":636,"props":1708,"children":1709},{"style":657},[1710],{"type":612,"value":773},{"type":606,"tag":636,"props":1712,"children":1713},{"style":668},[1714],{"type":612,"value":1715},"\"Sorted by score (desc) and age (asc): ",{"type":606,"tag":636,"props":1717,"children":1718},{"style":679},[1719],{"type":612,"value":783},{"type":606,"tag":636,"props":1721,"children":1722},{"style":651},[1723],{"type":612,"value":1724},"sorted_by_score_age",{"type":606,"tag":636,"props":1726,"children":1727},{"style":679},[1728],{"type":612,"value":793},{"type":606,"tag":636,"props":1730,"children":1731},{"style":668},[1732],{"type":612,"value":798},{"type":606,"tag":636,"props":1734,"children":1735},{"style":651},[1736],{"type":612,"value":803},{"type":606,"tag":636,"props":1738,"children":1739},{"class":638,"line":163},[1740],{"type":606,"tag":636,"props":1741,"children":1742},{"emptyLinePlaceholder":13},[1743],{"type":612,"value":991},{"type":606,"tag":636,"props":1745,"children":1746},{"class":638,"line":172},[1747],{"type":606,"tag":636,"props":1748,"children":1749},{"style":642},[1750],{"type":612,"value":1751},"# Custom sorting function\n",{"type":606,"tag":636,"props":1753,"children":1754},{"class":638,"line":181},[1755,1760,1766],{"type":606,"tag":636,"props":1756,"children":1757},{"style":657},[1758],{"type":612,"value":1759},"def",{"type":606,"tag":636,"props":1761,"children":1763},{"style":1762},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1764],{"type":612,"value":1765}," get_average_score",{"type":606,"tag":636,"props":1767,"children":1768},{"style":651},[1769],{"type":612,"value":1770},"(student):\n",{"type":606,"tag":636,"props":1772,"children":1773},{"class":638,"line":190},[1774,1779,1784,1789,1793,1798,1803,1808,1812,1816],{"type":606,"tag":636,"props":1775,"children":1776},{"style":657},[1777],{"type":612,"value":1778},"    return",{"type":606,"tag":636,"props":1780,"children":1781},{"style":679},[1782],{"type":612,"value":1783}," sum",{"type":606,"tag":636,"props":1785,"children":1786},{"style":651},[1787],{"type":612,"value":1788},"(student[",{"type":606,"tag":636,"props":1790,"children":1791},{"style":679},[1792],{"type":612,"value":1131},{"type":606,"tag":636,"props":1794,"children":1795},{"style":651},[1796],{"type":612,"value":1797},"].values()) ",{"type":606,"tag":636,"props":1799,"children":1800},{"style":657},[1801],{"type":612,"value":1802},"/",{"type":606,"tag":636,"props":1804,"children":1805},{"style":679},[1806],{"type":612,"value":1807}," len",{"type":606,"tag":636,"props":1809,"children":1810},{"style":651},[1811],{"type":612,"value":1788},{"type":606,"tag":636,"props":1813,"children":1814},{"style":679},[1815],{"type":612,"value":1131},{"type":606,"tag":636,"props":1817,"children":1818},{"style":651},[1819],{"type":612,"value":1820},"])\n",{"type":606,"tag":636,"props":1822,"children":1823},{"class":638,"line":199},[1824],{"type":606,"tag":636,"props":1825,"children":1826},{"emptyLinePlaceholder":13},[1827],{"type":612,"value":991},{"type":606,"tag":636,"props":1829,"children":1830},{"class":638,"line":208},[1831,1836,1840,1844,1848,1852],{"type":606,"tag":636,"props":1832,"children":1833},{"style":651},[1834],{"type":612,"value":1835},"sorted_by_avg ",{"type":606,"tag":636,"props":1837,"children":1838},{"style":657},[1839],{"type":612,"value":660},{"type":606,"tag":636,"props":1841,"children":1842},{"style":679},[1843],{"type":612,"value":741},{"type":606,"tag":636,"props":1845,"children":1846},{"style":651},[1847],{"type":612,"value":746},{"type":606,"tag":636,"props":1849,"children":1850},{"style":679},[1851],{"type":612,"value":751},{"type":606,"tag":636,"props":1853,"children":1854},{"style":651},[1855],{"type":612,"value":1634},{"type":606,"tag":636,"props":1857,"children":1858},{"class":638,"line":217},[1859,1863,1867],{"type":606,"tag":636,"props":1860,"children":1861},{"style":1113},[1862],{"type":612,"value":1524},{"type":606,"tag":636,"props":1864,"children":1865},{"style":657},[1866],{"type":612,"value":660},{"type":606,"tag":636,"props":1868,"children":1869},{"style":651},[1870],{"type":612,"value":1871},"get_average_score))\n",{"type":606,"tag":636,"props":1873,"children":1874},{"class":638,"line":227},[1875,1879,1883,1887,1892,1896,1901,1905,1909],{"type":606,"tag":636,"props":1876,"children":1877},{"style":679},[1878],{"type":612,"value":764},{"type":606,"tag":636,"props":1880,"children":1881},{"style":651},[1882],{"type":612,"value":746},{"type":606,"tag":636,"props":1884,"children":1885},{"style":657},[1886],{"type":612,"value":773},{"type":606,"tag":636,"props":1888,"children":1889},{"style":668},[1890],{"type":612,"value":1891},"\"Sorted by average: ",{"type":606,"tag":636,"props":1893,"children":1894},{"style":679},[1895],{"type":612,"value":783},{"type":606,"tag":636,"props":1897,"children":1898},{"style":651},[1899],{"type":612,"value":1900},"sorted_by_avg",{"type":606,"tag":636,"props":1902,"children":1903},{"style":679},[1904],{"type":612,"value":793},{"type":606,"tag":636,"props":1906,"children":1907},{"style":668},[1908],{"type":612,"value":798},{"type":606,"tag":636,"props":1910,"children":1911},{"style":651},[1912],{"type":612,"value":803},{"type":606,"tag":805,"props":1914,"children":1916},{"id":1915},"key-takeaways",[1917],{"type":612,"value":1918},"🎯 Key Takeaways",{"type":606,"tag":817,"props":1920,"children":1924},{"emoji":1921,"title":1922,"type":1923},"📚","Dictionary Sorting Essentials","success",[1925,1932,1961,1969,1985,1993,2024],{"type":606,"tag":615,"props":1926,"children":1927},{},[1928],{"type":606,"tag":827,"props":1929,"children":1930},{},[1931],{"type":612,"value":831},{"type":606,"tag":833,"props":1933,"children":1934},{},[1935,1952,1957],{"type":606,"tag":837,"props":1936,"children":1937},{},[1938,1944,1946],{"type":606,"tag":632,"props":1939,"children":1941},{"className":1940},[],[1942],{"type":612,"value":1943},"sorted()",{"type":612,"value":1945}," with ",{"type":606,"tag":632,"props":1947,"children":1949},{"className":1948},[],[1950],{"type":612,"value":1951},"items()",{"type":606,"tag":837,"props":1953,"children":1954},{},[1955],{"type":612,"value":1956},"Key and value sorting",{"type":606,"tag":837,"props":1958,"children":1959},{},[1960],{"type":612,"value":895},{"type":606,"tag":615,"props":1962,"children":1963},{},[1964],{"type":606,"tag":827,"props":1965,"children":1966},{},[1967],{"type":612,"value":1968},"Advanced Features:",{"type":606,"tag":833,"props":1970,"children":1971},{},[1972,1976,1980],{"type":606,"tag":837,"props":1973,"children":1974},{},[1975],{"type":612,"value":885},{"type":606,"tag":837,"props":1977,"children":1978},{},[1979],{"type":612,"value":890},{"type":606,"tag":837,"props":1981,"children":1982},{},[1983],{"type":612,"value":1984},"Nested value sorting",{"type":606,"tag":615,"props":1986,"children":1987},{},[1988],{"type":606,"tag":827,"props":1989,"children":1990},{},[1991],{"type":612,"value":1992},"Best Practices:",{"type":606,"tag":833,"props":1994,"children":1995},{},[1996,2009,2014,2019],{"type":606,"tag":837,"props":1997,"children":1998},{},[1999,2001,2007],{"type":612,"value":2000},"Use ",{"type":606,"tag":632,"props":2002,"children":2004},{"className":2003},[],[2005],{"type":612,"value":2006},"lambda",{"type":612,"value":2008}," for simple sorts",{"type":606,"tag":837,"props":2010,"children":2011},{},[2012],{"type":612,"value":2013},"Use custom functions for complex sorts",{"type":606,"tag":837,"props":2015,"children":2016},{},[2017],{"type":612,"value":2018},"Consider memory usage",{"type":606,"tag":837,"props":2020,"children":2021},{},[2022],{"type":612,"value":2023},"Handle edge cases",{"type":606,"tag":615,"props":2025,"children":2026},{},[2027,2032],{"type":606,"tag":827,"props":2028,"children":2029},{},[2030],{"type":612,"value":2031},"Remember:",{"type":612,"value":2033}," Dictionaries maintain insertion order in Python 3.7+, but sorting creates new dictionaries!",{"type":606,"tag":2035,"props":2036,"children":2037},"style",{},[2038],{"type":612,"value":2039},"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":2041},[2042,2045,2046],{"id":807,"depth":27,"text":810,"children":2043},[2044],{"id":899,"depth":36,"text":902},{"id":1283,"depth":27,"text":1286},{"id":1915,"depth":27,"text":1918},1782373755319]