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