[{"data":1,"prerenderedAt":2231},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/error-handling":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361},"/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,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[351],{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"body":602,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20},{"type":603,"children":604,"toc":2221},"root",[605,614,620,956,963,968,1024,1154,1160,1165,1224,1230,1237,1478,1484,1642,1648,1653,2138,2144,2149,2157,2210,2215],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"️-error-handling",[611],{"type":612,"value":613},"text","🛡️ Error Handling",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Error handling is crucial for building robust Python applications. Python provides powerful tools to catch, handle, and recover from errors gracefully, preventing crashes and providing meaningful feedback to users.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"code":627,"language":628,"meta":8,"className":629,"style":8},"# Basic error handling\ntry:\n    result = 10 / 0\nexcept ZeroDivisionError:\n    print(\"Cannot divide by zero!\")\n    result = 0\n\nprint(f\"Result: {result}\")\n\n# Multiple exception types\ntry:\n    number = int(\"abc\")\nexcept ValueError:\n    print(\"Invalid number format\")\nexcept Exception as e:\n    print(f\"Unexpected error: {e}\")\n","python","language-python shiki shiki-themes github-light github-dark",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,661,690,707,731,746,754,800,808,816,827,857,873,893,915],{"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 error handling\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649,655],{"type":606,"tag":636,"props":650,"children":652},{"style":651},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[653],{"type":612,"value":654},"try",{"type":606,"tag":636,"props":656,"children":658},{"style":657},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[659],{"type":612,"value":660},":\n",{"type":606,"tag":636,"props":662,"children":663},{"class":638,"line":36},[664,669,674,680,685],{"type":606,"tag":636,"props":665,"children":666},{"style":657},[667],{"type":612,"value":668},"    result ",{"type":606,"tag":636,"props":670,"children":671},{"style":651},[672],{"type":612,"value":673},"=",{"type":606,"tag":636,"props":675,"children":677},{"style":676},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[678],{"type":612,"value":679}," 10",{"type":606,"tag":636,"props":681,"children":682},{"style":651},[683],{"type":612,"value":684}," /",{"type":606,"tag":636,"props":686,"children":687},{"style":676},[688],{"type":612,"value":689}," 0\n",{"type":606,"tag":636,"props":691,"children":692},{"class":638,"line":45},[693,698,703],{"type":606,"tag":636,"props":694,"children":695},{"style":651},[696],{"type":612,"value":697},"except",{"type":606,"tag":636,"props":699,"children":700},{"style":676},[701],{"type":612,"value":702}," ZeroDivisionError",{"type":606,"tag":636,"props":704,"children":705},{"style":657},[706],{"type":612,"value":660},{"type":606,"tag":636,"props":708,"children":709},{"class":638,"line":54},[710,715,720,726],{"type":606,"tag":636,"props":711,"children":712},{"style":676},[713],{"type":612,"value":714},"    print",{"type":606,"tag":636,"props":716,"children":717},{"style":657},[718],{"type":612,"value":719},"(",{"type":606,"tag":636,"props":721,"children":723},{"style":722},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[724],{"type":612,"value":725},"\"Cannot divide by zero!\"",{"type":606,"tag":636,"props":727,"children":728},{"style":657},[729],{"type":612,"value":730},")\n",{"type":606,"tag":636,"props":732,"children":733},{"class":638,"line":63},[734,738,742],{"type":606,"tag":636,"props":735,"children":736},{"style":657},[737],{"type":612,"value":668},{"type":606,"tag":636,"props":739,"children":740},{"style":651},[741],{"type":612,"value":673},{"type":606,"tag":636,"props":743,"children":744},{"style":676},[745],{"type":612,"value":689},{"type":606,"tag":636,"props":747,"children":748},{"class":638,"line":72},[749],{"type":606,"tag":636,"props":750,"children":751},{"emptyLinePlaceholder":13},[752],{"type":612,"value":753},"\n",{"type":606,"tag":636,"props":755,"children":756},{"class":638,"line":81},[757,762,766,771,776,781,786,791,796],{"type":606,"tag":636,"props":758,"children":759},{"style":676},[760],{"type":612,"value":761},"print",{"type":606,"tag":636,"props":763,"children":764},{"style":657},[765],{"type":612,"value":719},{"type":606,"tag":636,"props":767,"children":768},{"style":651},[769],{"type":612,"value":770},"f",{"type":606,"tag":636,"props":772,"children":773},{"style":722},[774],{"type":612,"value":775},"\"Result: ",{"type":606,"tag":636,"props":777,"children":778},{"style":676},[779],{"type":612,"value":780},"{",{"type":606,"tag":636,"props":782,"children":783},{"style":657},[784],{"type":612,"value":785},"result",{"type":606,"tag":636,"props":787,"children":788},{"style":676},[789],{"type":612,"value":790},"}",{"type":606,"tag":636,"props":792,"children":793},{"style":722},[794],{"type":612,"value":795},"\"",{"type":606,"tag":636,"props":797,"children":798},{"style":657},[799],{"type":612,"value":730},{"type":606,"tag":636,"props":801,"children":803},{"class":638,"line":802},9,[804],{"type":606,"tag":636,"props":805,"children":806},{"emptyLinePlaceholder":13},[807],{"type":612,"value":753},{"type":606,"tag":636,"props":809,"children":810},{"class":638,"line":99},[811],{"type":606,"tag":636,"props":812,"children":813},{"style":642},[814],{"type":612,"value":815},"# Multiple exception types\n",{"type":606,"tag":636,"props":817,"children":818},{"class":638,"line":108},[819,823],{"type":606,"tag":636,"props":820,"children":821},{"style":651},[822],{"type":612,"value":654},{"type":606,"tag":636,"props":824,"children":825},{"style":657},[826],{"type":612,"value":660},{"type":606,"tag":636,"props":828,"children":829},{"class":638,"line":117},[830,835,839,844,848,853],{"type":606,"tag":636,"props":831,"children":832},{"style":657},[833],{"type":612,"value":834},"    number ",{"type":606,"tag":636,"props":836,"children":837},{"style":651},[838],{"type":612,"value":673},{"type":606,"tag":636,"props":840,"children":841},{"style":676},[842],{"type":612,"value":843}," int",{"type":606,"tag":636,"props":845,"children":846},{"style":657},[847],{"type":612,"value":719},{"type":606,"tag":636,"props":849,"children":850},{"style":722},[851],{"type":612,"value":852},"\"abc\"",{"type":606,"tag":636,"props":854,"children":855},{"style":657},[856],{"type":612,"value":730},{"type":606,"tag":636,"props":858,"children":859},{"class":638,"line":126},[860,864,869],{"type":606,"tag":636,"props":861,"children":862},{"style":651},[863],{"type":612,"value":697},{"type":606,"tag":636,"props":865,"children":866},{"style":676},[867],{"type":612,"value":868}," ValueError",{"type":606,"tag":636,"props":870,"children":871},{"style":657},[872],{"type":612,"value":660},{"type":606,"tag":636,"props":874,"children":875},{"class":638,"line":135},[876,880,884,889],{"type":606,"tag":636,"props":877,"children":878},{"style":676},[879],{"type":612,"value":714},{"type":606,"tag":636,"props":881,"children":882},{"style":657},[883],{"type":612,"value":719},{"type":606,"tag":636,"props":885,"children":886},{"style":722},[887],{"type":612,"value":888},"\"Invalid number format\"",{"type":606,"tag":636,"props":890,"children":891},{"style":657},[892],{"type":612,"value":730},{"type":606,"tag":636,"props":894,"children":895},{"class":638,"line":144},[896,900,905,910],{"type":606,"tag":636,"props":897,"children":898},{"style":651},[899],{"type":612,"value":697},{"type":606,"tag":636,"props":901,"children":902},{"style":676},[903],{"type":612,"value":904}," Exception",{"type":606,"tag":636,"props":906,"children":907},{"style":651},[908],{"type":612,"value":909}," as",{"type":606,"tag":636,"props":911,"children":912},{"style":657},[913],{"type":612,"value":914}," e:\n",{"type":606,"tag":636,"props":916,"children":917},{"class":638,"line":153},[918,922,926,930,935,939,944,948,952],{"type":606,"tag":636,"props":919,"children":920},{"style":676},[921],{"type":612,"value":714},{"type":606,"tag":636,"props":923,"children":924},{"style":657},[925],{"type":612,"value":719},{"type":606,"tag":636,"props":927,"children":928},{"style":651},[929],{"type":612,"value":770},{"type":606,"tag":636,"props":931,"children":932},{"style":722},[933],{"type":612,"value":934},"\"Unexpected error: ",{"type":606,"tag":636,"props":936,"children":937},{"style":676},[938],{"type":612,"value":780},{"type":606,"tag":636,"props":940,"children":941},{"style":657},[942],{"type":612,"value":943},"e",{"type":606,"tag":636,"props":945,"children":946},{"style":676},[947],{"type":612,"value":790},{"type":606,"tag":636,"props":949,"children":950},{"style":722},[951],{"type":612,"value":795},{"type":606,"tag":636,"props":953,"children":954},{"style":657},[955],{"type":612,"value":730},{"type":606,"tag":957,"props":958,"children":960},"h2",{"id":959},"why-error-handling-matters",[961],{"type":612,"value":962},"🎯 Why Error Handling Matters",{"type":606,"tag":615,"props":964,"children":965},{},[966],{"type":612,"value":967},"Proper error handling helps you:",{"type":606,"tag":969,"props":970,"children":971},"ul",{},[972,984,994,1004,1014],{"type":606,"tag":973,"props":974,"children":975},"li",{},[976,982],{"type":606,"tag":977,"props":978,"children":979},"strong",{},[980],{"type":612,"value":981},"Prevent Crashes",{"type":612,"value":983}," 💥: Keep applications running",{"type":606,"tag":973,"props":985,"children":986},{},[987,992],{"type":606,"tag":977,"props":988,"children":989},{},[990],{"type":612,"value":991},"User Experience",{"type":612,"value":993}," 😊: Provide helpful error messages",{"type":606,"tag":973,"props":995,"children":996},{},[997,1002],{"type":606,"tag":977,"props":998,"children":999},{},[1000],{"type":612,"value":1001},"Debugging",{"type":612,"value":1003}," 🔍: Identify and fix issues quickly",{"type":606,"tag":973,"props":1005,"children":1006},{},[1007,1012],{"type":606,"tag":977,"props":1008,"children":1009},{},[1010],{"type":612,"value":1011},"Data Safety",{"type":612,"value":1013}," 🔒: Protect against corruption",{"type":606,"tag":973,"props":1015,"children":1016},{},[1017,1022],{"type":606,"tag":977,"props":1018,"children":1019},{},[1020],{"type":612,"value":1021},"Maintenance",{"type":612,"value":1023}," 🔧: Build reliable, maintainable code",{"type":606,"tag":1025,"props":1026,"children":1030},"info-box",{"emoji":1027,"title":1028,"type":1029},"🛠️","Python's Error Handling Toolkit","info",[1031,1039,1097,1105,1123,1131],{"type":606,"tag":615,"props":1032,"children":1033},{},[1034],{"type":606,"tag":977,"props":1035,"children":1036},{},[1037],{"type":612,"value":1038},"Core Components:",{"type":606,"tag":969,"props":1040,"children":1041},{},[1042,1053,1064,1075,1086],{"type":606,"tag":973,"props":1043,"children":1044},{},[1045,1051],{"type":606,"tag":632,"props":1046,"children":1048},{"className":1047},[],[1049],{"type":612,"value":1050},"try/except",{"type":612,"value":1052},": Catch and handle exceptions",{"type":606,"tag":973,"props":1054,"children":1055},{},[1056,1062],{"type":606,"tag":632,"props":1057,"children":1059},{"className":1058},[],[1060],{"type":612,"value":1061},"finally",{"type":612,"value":1063},": Always execute cleanup code",{"type":606,"tag":973,"props":1065,"children":1066},{},[1067,1073],{"type":606,"tag":632,"props":1068,"children":1070},{"className":1069},[],[1071],{"type":612,"value":1072},"raise",{"type":612,"value":1074},": Create custom exceptions",{"type":606,"tag":973,"props":1076,"children":1077},{},[1078,1084],{"type":606,"tag":632,"props":1079,"children":1081},{"className":1080},[],[1082],{"type":612,"value":1083},"logging",{"type":612,"value":1085},": Record errors and events",{"type":606,"tag":973,"props":1087,"children":1088},{},[1089,1095],{"type":606,"tag":632,"props":1090,"children":1092},{"className":1091},[],[1093],{"type":612,"value":1094},"assert",{"type":612,"value":1096},": Debug-time checks",{"type":606,"tag":615,"props":1098,"children":1099},{},[1100],{"type":606,"tag":977,"props":1101,"children":1102},{},[1103],{"type":612,"value":1104},"Exception Types:",{"type":606,"tag":969,"props":1106,"children":1107},{},[1108,1113,1118],{"type":606,"tag":973,"props":1109,"children":1110},{},[1111],{"type":612,"value":1112},"Built-in exceptions (ValueError, TypeError, etc.)",{"type":606,"tag":973,"props":1114,"children":1115},{},[1116],{"type":612,"value":1117},"Custom exceptions for specific needs",{"type":606,"tag":973,"props":1119,"children":1120},{},[1121],{"type":612,"value":1122},"Exception hierarchy for organized handling",{"type":606,"tag":615,"props":1124,"children":1125},{},[1126],{"type":606,"tag":977,"props":1127,"children":1128},{},[1129],{"type":612,"value":1130},"Best Practices:",{"type":606,"tag":969,"props":1132,"children":1133},{},[1134,1139,1144,1149],{"type":606,"tag":973,"props":1135,"children":1136},{},[1137],{"type":612,"value":1138},"Catch specific exceptions",{"type":606,"tag":973,"props":1140,"children":1141},{},[1142],{"type":612,"value":1143},"Provide meaningful error messages",{"type":606,"tag":973,"props":1145,"children":1146},{},[1147],{"type":612,"value":1148},"Log errors for debugging",{"type":606,"tag":973,"props":1150,"children":1151},{},[1152],{"type":612,"value":1153},"Clean up resources properly",{"type":606,"tag":957,"props":1155,"children":1157},{"id":1156},"error-handling-topics",[1158],{"type":612,"value":1159},"📚 Error Handling Topics",{"type":606,"tag":615,"props":1161,"children":1162},{},[1163],{"type":612,"value":1164},"Master Python's error handling capabilities:",{"type":606,"tag":969,"props":1166,"children":1167},{},[1168,1180,1191,1202,1213],{"type":606,"tag":973,"props":1169,"children":1170},{},[1171,1173,1178],{"type":612,"value":1172},"🚨 ",{"type":606,"tag":1174,"props":1175,"children":1176},"a",{"href":363},[1177],{"type":612,"value":364},{"type":612,"value":1179}," Learn try/except blocks and exception handling patterns.",{"type":606,"tag":973,"props":1181,"children":1182},{},[1183,1185,1189],{"type":612,"value":1184},"⚡ ",{"type":606,"tag":1174,"props":1186,"children":1187},{"href":372},[1188],{"type":612,"value":373},{"type":612,"value":1190}," Build your own exception classes for specific error cases.",{"type":606,"tag":973,"props":1192,"children":1193},{},[1194,1196,1200],{"type":612,"value":1195},"🔍 ",{"type":606,"tag":1174,"props":1197,"children":1198},{"href":381},[1199],{"type":612,"value":382},{"type":612,"value":1201}," Use debugging tools and techniques to find and fix issues.",{"type":606,"tag":973,"props":1203,"children":1204},{},[1205,1207,1211],{"type":612,"value":1206},"📝 ",{"type":606,"tag":1174,"props":1208,"children":1209},{"href":390},[1210],{"type":612,"value":391},{"type":612,"value":1212}," Implement logging for tracking errors and application behavior.",{"type":606,"tag":973,"props":1214,"children":1215},{},[1216,1218,1222],{"type":612,"value":1217},"🔄 ",{"type":606,"tag":1174,"props":1219,"children":1220},{"href":399},[1221],{"type":612,"value":400},{"type":612,"value":1223}," Add resilience with automatic retry mechanisms.",{"type":606,"tag":957,"props":1225,"children":1227},{"id":1226},"exception-reference-tables",[1228],{"type":612,"value":1229},"📊 Exception Reference Tables",{"type":606,"tag":1231,"props":1232,"children":1234},"h3",{"id":1233},"common-built-in-exceptions",[1235],{"type":612,"value":1236},"Common Built-in Exceptions",{"type":606,"tag":1238,"props":1239,"children":1240},"table",{},[1241,1265],{"type":606,"tag":1242,"props":1243,"children":1244},"thead",{},[1245],{"type":606,"tag":1246,"props":1247,"children":1248},"tr",{},[1249,1255,1260],{"type":606,"tag":1250,"props":1251,"children":1252},"th",{},[1253],{"type":612,"value":1254},"Exception",{"type":606,"tag":1250,"props":1256,"children":1257},{},[1258],{"type":612,"value":1259},"When It Occurs",{"type":606,"tag":1250,"props":1261,"children":1262},{},[1263],{"type":612,"value":1264},"Example",{"type":606,"tag":1266,"props":1267,"children":1268},"tbody",{},[1269,1296,1322,1348,1374,1400,1426,1452],{"type":606,"tag":1246,"props":1270,"children":1271},{},[1272,1282,1287],{"type":606,"tag":1273,"props":1274,"children":1275},"td",{},[1276],{"type":606,"tag":632,"props":1277,"children":1279},{"className":1278},[],[1280],{"type":612,"value":1281},"ValueError",{"type":606,"tag":1273,"props":1283,"children":1284},{},[1285],{"type":612,"value":1286},"Invalid value for operation",{"type":606,"tag":1273,"props":1288,"children":1289},{},[1290],{"type":606,"tag":632,"props":1291,"children":1293},{"className":1292},[],[1294],{"type":612,"value":1295},"int(\"abc\")",{"type":606,"tag":1246,"props":1297,"children":1298},{},[1299,1308,1313],{"type":606,"tag":1273,"props":1300,"children":1301},{},[1302],{"type":606,"tag":632,"props":1303,"children":1305},{"className":1304},[],[1306],{"type":612,"value":1307},"TypeError",{"type":606,"tag":1273,"props":1309,"children":1310},{},[1311],{"type":612,"value":1312},"Wrong data type",{"type":606,"tag":1273,"props":1314,"children":1315},{},[1316],{"type":606,"tag":632,"props":1317,"children":1319},{"className":1318},[],[1320],{"type":612,"value":1321},"\"text\" + 5",{"type":606,"tag":1246,"props":1323,"children":1324},{},[1325,1334,1339],{"type":606,"tag":1273,"props":1326,"children":1327},{},[1328],{"type":606,"tag":632,"props":1329,"children":1331},{"className":1330},[],[1332],{"type":612,"value":1333},"KeyError",{"type":606,"tag":1273,"props":1335,"children":1336},{},[1337],{"type":612,"value":1338},"Dictionary key not found",{"type":606,"tag":1273,"props":1340,"children":1341},{},[1342],{"type":606,"tag":632,"props":1343,"children":1345},{"className":1344},[],[1346],{"type":612,"value":1347},"dict[\"missing_key\"]",{"type":606,"tag":1246,"props":1349,"children":1350},{},[1351,1360,1365],{"type":606,"tag":1273,"props":1352,"children":1353},{},[1354],{"type":606,"tag":632,"props":1355,"children":1357},{"className":1356},[],[1358],{"type":612,"value":1359},"IndexError",{"type":606,"tag":1273,"props":1361,"children":1362},{},[1363],{"type":612,"value":1364},"List index out of range",{"type":606,"tag":1273,"props":1366,"children":1367},{},[1368],{"type":606,"tag":632,"props":1369,"children":1371},{"className":1370},[],[1372],{"type":612,"value":1373},"list[100]",{"type":606,"tag":1246,"props":1375,"children":1376},{},[1377,1386,1391],{"type":606,"tag":1273,"props":1378,"children":1379},{},[1380],{"type":606,"tag":632,"props":1381,"children":1383},{"className":1382},[],[1384],{"type":612,"value":1385},"FileNotFoundError",{"type":606,"tag":1273,"props":1387,"children":1388},{},[1389],{"type":612,"value":1390},"File doesn't exist",{"type":606,"tag":1273,"props":1392,"children":1393},{},[1394],{"type":606,"tag":632,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":612,"value":1399},"open(\"missing.txt\")",{"type":606,"tag":1246,"props":1401,"children":1402},{},[1403,1412,1417],{"type":606,"tag":1273,"props":1404,"children":1405},{},[1406],{"type":606,"tag":632,"props":1407,"children":1409},{"className":1408},[],[1410],{"type":612,"value":1411},"ZeroDivisionError",{"type":606,"tag":1273,"props":1413,"children":1414},{},[1415],{"type":612,"value":1416},"Division by zero",{"type":606,"tag":1273,"props":1418,"children":1419},{},[1420],{"type":606,"tag":632,"props":1421,"children":1423},{"className":1422},[],[1424],{"type":612,"value":1425},"10 / 0",{"type":606,"tag":1246,"props":1427,"children":1428},{},[1429,1438,1443],{"type":606,"tag":1273,"props":1430,"children":1431},{},[1432],{"type":606,"tag":632,"props":1433,"children":1435},{"className":1434},[],[1436],{"type":612,"value":1437},"AttributeError",{"type":606,"tag":1273,"props":1439,"children":1440},{},[1441],{"type":612,"value":1442},"Object has no attribute",{"type":606,"tag":1273,"props":1444,"children":1445},{},[1446],{"type":606,"tag":632,"props":1447,"children":1449},{"className":1448},[],[1450],{"type":612,"value":1451},"\"text\".missing_method()",{"type":606,"tag":1246,"props":1453,"children":1454},{},[1455,1464,1469],{"type":606,"tag":1273,"props":1456,"children":1457},{},[1458],{"type":606,"tag":632,"props":1459,"children":1461},{"className":1460},[],[1462],{"type":612,"value":1463},"ImportError",{"type":606,"tag":1273,"props":1465,"children":1466},{},[1467],{"type":612,"value":1468},"Module import fails",{"type":606,"tag":1273,"props":1470,"children":1471},{},[1472],{"type":606,"tag":632,"props":1473,"children":1475},{"className":1474},[],[1476],{"type":612,"value":1477},"import nonexistent",{"type":606,"tag":1231,"props":1479,"children":1481},{"id":1480},"exception-handling-patterns",[1482],{"type":612,"value":1483},"Exception Handling Patterns",{"type":606,"tag":1238,"props":1485,"children":1486},{},[1487,1507],{"type":606,"tag":1242,"props":1488,"children":1489},{},[1490],{"type":606,"tag":1246,"props":1491,"children":1492},{},[1493,1498,1503],{"type":606,"tag":1250,"props":1494,"children":1495},{},[1496],{"type":612,"value":1497},"Pattern",{"type":606,"tag":1250,"props":1499,"children":1500},{},[1501],{"type":612,"value":1502},"Use Case",{"type":606,"tag":1250,"props":1504,"children":1505},{},[1506],{"type":612,"value":1264},{"type":606,"tag":1266,"props":1508,"children":1509},{},[1510,1532,1554,1576,1598,1620],{"type":606,"tag":1246,"props":1511,"children":1512},{},[1513,1518,1523],{"type":606,"tag":1273,"props":1514,"children":1515},{},[1516],{"type":612,"value":1517},"Basic try/except",{"type":606,"tag":1273,"props":1519,"children":1520},{},[1521],{"type":612,"value":1522},"Handle single exception",{"type":606,"tag":1273,"props":1524,"children":1525},{},[1526],{"type":606,"tag":632,"props":1527,"children":1529},{"className":1528},[],[1530],{"type":612,"value":1531},"except ValueError:",{"type":606,"tag":1246,"props":1533,"children":1534},{},[1535,1540,1545],{"type":606,"tag":1273,"props":1536,"children":1537},{},[1538],{"type":612,"value":1539},"Multiple except",{"type":606,"tag":1273,"props":1541,"children":1542},{},[1543],{"type":612,"value":1544},"Handle different errors",{"type":606,"tag":1273,"props":1546,"children":1547},{},[1548],{"type":606,"tag":632,"props":1549,"children":1551},{"className":1550},[],[1552],{"type":612,"value":1553},"except (ValueError, TypeError):",{"type":606,"tag":1246,"props":1555,"children":1556},{},[1557,1562,1567],{"type":606,"tag":1273,"props":1558,"children":1559},{},[1560],{"type":612,"value":1561},"Catch all",{"type":606,"tag":1273,"props":1563,"children":1564},{},[1565],{"type":612,"value":1566},"Handle any exception",{"type":606,"tag":1273,"props":1568,"children":1569},{},[1570],{"type":606,"tag":632,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":612,"value":1575},"except Exception:",{"type":606,"tag":1246,"props":1577,"children":1578},{},[1579,1584,1589],{"type":606,"tag":1273,"props":1580,"children":1581},{},[1582],{"type":612,"value":1583},"Exception info",{"type":606,"tag":1273,"props":1585,"children":1586},{},[1587],{"type":612,"value":1588},"Get error details",{"type":606,"tag":1273,"props":1590,"children":1591},{},[1592],{"type":606,"tag":632,"props":1593,"children":1595},{"className":1594},[],[1596],{"type":612,"value":1597},"except Exception as e:",{"type":606,"tag":1246,"props":1599,"children":1600},{},[1601,1606,1611],{"type":606,"tag":1273,"props":1602,"children":1603},{},[1604],{"type":612,"value":1605},"Finally block",{"type":606,"tag":1273,"props":1607,"children":1608},{},[1609],{"type":612,"value":1610},"Always execute cleanup",{"type":606,"tag":1273,"props":1612,"children":1613},{},[1614],{"type":606,"tag":632,"props":1615,"children":1617},{"className":1616},[],[1618],{"type":612,"value":1619},"finally:",{"type":606,"tag":1246,"props":1621,"children":1622},{},[1623,1628,1633],{"type":606,"tag":1273,"props":1624,"children":1625},{},[1626],{"type":612,"value":1627},"Else block",{"type":606,"tag":1273,"props":1629,"children":1630},{},[1631],{"type":612,"value":1632},"Run if no exceptions",{"type":606,"tag":1273,"props":1634,"children":1635},{},[1636],{"type":606,"tag":632,"props":1637,"children":1639},{"className":1638},[],[1640],{"type":612,"value":1641},"else:",{"type":606,"tag":957,"props":1643,"children":1645},{"id":1644},"quick-examples",[1646],{"type":612,"value":1647},"🌟 Quick Examples",{"type":606,"tag":615,"props":1649,"children":1650},{},[1651],{"type":612,"value":1652},"Here's what you'll learn to handle:",{"type":606,"tag":621,"props":1654,"children":1655},{},[1656],{"type":606,"tag":625,"props":1657,"children":1659},{"code":1658,"language":628,"meta":8,"className":629,"style":8},"# File handling with errors\ntry:\n    with open(\"data.txt\", \"r\") as file:\n        content = file.read()\n        print(\"File read successfully\")\nexcept FileNotFoundError:\n    print(\"File not found\")\nexcept PermissionError:\n    print(\"No permission to read file\")\n\n# Data conversion with errors\ntry:\n    user_input = \"25\"\n    age = int(user_input)\n    print(f\"Age: {age}\")\nexcept ValueError:\n    print(\"Please enter a valid number\")\n\n# Custom error handling\nclass CustomError(Exception):\n    pass\n\ntry:\n    raise CustomError(\"Something went wrong\")\nexcept CustomError as e:\n    print(f\"Custom error: {e}\")\n",[1660],{"type":606,"tag":632,"props":1661,"children":1662},{"__ignoreMap":8},[1663,1671,1682,1734,1755,1776,1792,1812,1828,1848,1855,1863,1874,1891,1912,1953,1968,1988,1995,2003,2030,2038,2045,2056,2078,2098],{"type":606,"tag":636,"props":1664,"children":1665},{"class":638,"line":12},[1666],{"type":606,"tag":636,"props":1667,"children":1668},{"style":642},[1669],{"type":612,"value":1670},"# File handling with errors\n",{"type":606,"tag":636,"props":1672,"children":1673},{"class":638,"line":27},[1674,1678],{"type":606,"tag":636,"props":1675,"children":1676},{"style":651},[1677],{"type":612,"value":654},{"type":606,"tag":636,"props":1679,"children":1680},{"style":657},[1681],{"type":612,"value":660},{"type":606,"tag":636,"props":1683,"children":1684},{"class":638,"line":36},[1685,1690,1695,1699,1704,1709,1714,1719,1724,1730],{"type":606,"tag":636,"props":1686,"children":1687},{"style":651},[1688],{"type":612,"value":1689},"    with",{"type":606,"tag":636,"props":1691,"children":1692},{"style":676},[1693],{"type":612,"value":1694}," open",{"type":606,"tag":636,"props":1696,"children":1697},{"style":657},[1698],{"type":612,"value":719},{"type":606,"tag":636,"props":1700,"children":1701},{"style":722},[1702],{"type":612,"value":1703},"\"data.txt\"",{"type":606,"tag":636,"props":1705,"children":1706},{"style":657},[1707],{"type":612,"value":1708},", ",{"type":606,"tag":636,"props":1710,"children":1711},{"style":722},[1712],{"type":612,"value":1713},"\"r\"",{"type":606,"tag":636,"props":1715,"children":1716},{"style":657},[1717],{"type":612,"value":1718},") ",{"type":606,"tag":636,"props":1720,"children":1721},{"style":651},[1722],{"type":612,"value":1723},"as",{"type":606,"tag":636,"props":1725,"children":1727},{"style":1726},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1728],{"type":612,"value":1729}," file",{"type":606,"tag":636,"props":1731,"children":1732},{"style":657},[1733],{"type":612,"value":660},{"type":606,"tag":636,"props":1735,"children":1736},{"class":638,"line":45},[1737,1742,1746,1750],{"type":606,"tag":636,"props":1738,"children":1739},{"style":657},[1740],{"type":612,"value":1741},"        content ",{"type":606,"tag":636,"props":1743,"children":1744},{"style":651},[1745],{"type":612,"value":673},{"type":606,"tag":636,"props":1747,"children":1748},{"style":1726},[1749],{"type":612,"value":1729},{"type":606,"tag":636,"props":1751,"children":1752},{"style":657},[1753],{"type":612,"value":1754},".read()\n",{"type":606,"tag":636,"props":1756,"children":1757},{"class":638,"line":54},[1758,1763,1767,1772],{"type":606,"tag":636,"props":1759,"children":1760},{"style":676},[1761],{"type":612,"value":1762},"        print",{"type":606,"tag":636,"props":1764,"children":1765},{"style":657},[1766],{"type":612,"value":719},{"type":606,"tag":636,"props":1768,"children":1769},{"style":722},[1770],{"type":612,"value":1771},"\"File read successfully\"",{"type":606,"tag":636,"props":1773,"children":1774},{"style":657},[1775],{"type":612,"value":730},{"type":606,"tag":636,"props":1777,"children":1778},{"class":638,"line":63},[1779,1783,1788],{"type":606,"tag":636,"props":1780,"children":1781},{"style":651},[1782],{"type":612,"value":697},{"type":606,"tag":636,"props":1784,"children":1785},{"style":676},[1786],{"type":612,"value":1787}," FileNotFoundError",{"type":606,"tag":636,"props":1789,"children":1790},{"style":657},[1791],{"type":612,"value":660},{"type":606,"tag":636,"props":1793,"children":1794},{"class":638,"line":72},[1795,1799,1803,1808],{"type":606,"tag":636,"props":1796,"children":1797},{"style":676},[1798],{"type":612,"value":714},{"type":606,"tag":636,"props":1800,"children":1801},{"style":657},[1802],{"type":612,"value":719},{"type":606,"tag":636,"props":1804,"children":1805},{"style":722},[1806],{"type":612,"value":1807},"\"File not found\"",{"type":606,"tag":636,"props":1809,"children":1810},{"style":657},[1811],{"type":612,"value":730},{"type":606,"tag":636,"props":1813,"children":1814},{"class":638,"line":81},[1815,1819,1824],{"type":606,"tag":636,"props":1816,"children":1817},{"style":651},[1818],{"type":612,"value":697},{"type":606,"tag":636,"props":1820,"children":1821},{"style":676},[1822],{"type":612,"value":1823}," PermissionError",{"type":606,"tag":636,"props":1825,"children":1826},{"style":657},[1827],{"type":612,"value":660},{"type":606,"tag":636,"props":1829,"children":1830},{"class":638,"line":802},[1831,1835,1839,1844],{"type":606,"tag":636,"props":1832,"children":1833},{"style":676},[1834],{"type":612,"value":714},{"type":606,"tag":636,"props":1836,"children":1837},{"style":657},[1838],{"type":612,"value":719},{"type":606,"tag":636,"props":1840,"children":1841},{"style":722},[1842],{"type":612,"value":1843},"\"No permission to read file\"",{"type":606,"tag":636,"props":1845,"children":1846},{"style":657},[1847],{"type":612,"value":730},{"type":606,"tag":636,"props":1849,"children":1850},{"class":638,"line":99},[1851],{"type":606,"tag":636,"props":1852,"children":1853},{"emptyLinePlaceholder":13},[1854],{"type":612,"value":753},{"type":606,"tag":636,"props":1856,"children":1857},{"class":638,"line":108},[1858],{"type":606,"tag":636,"props":1859,"children":1860},{"style":642},[1861],{"type":612,"value":1862},"# Data conversion with errors\n",{"type":606,"tag":636,"props":1864,"children":1865},{"class":638,"line":117},[1866,1870],{"type":606,"tag":636,"props":1867,"children":1868},{"style":651},[1869],{"type":612,"value":654},{"type":606,"tag":636,"props":1871,"children":1872},{"style":657},[1873],{"type":612,"value":660},{"type":606,"tag":636,"props":1875,"children":1876},{"class":638,"line":126},[1877,1882,1886],{"type":606,"tag":636,"props":1878,"children":1879},{"style":657},[1880],{"type":612,"value":1881},"    user_input ",{"type":606,"tag":636,"props":1883,"children":1884},{"style":651},[1885],{"type":612,"value":673},{"type":606,"tag":636,"props":1887,"children":1888},{"style":722},[1889],{"type":612,"value":1890}," \"25\"\n",{"type":606,"tag":636,"props":1892,"children":1893},{"class":638,"line":135},[1894,1899,1903,1907],{"type":606,"tag":636,"props":1895,"children":1896},{"style":657},[1897],{"type":612,"value":1898},"    age ",{"type":606,"tag":636,"props":1900,"children":1901},{"style":651},[1902],{"type":612,"value":673},{"type":606,"tag":636,"props":1904,"children":1905},{"style":676},[1906],{"type":612,"value":843},{"type":606,"tag":636,"props":1908,"children":1909},{"style":657},[1910],{"type":612,"value":1911},"(user_input)\n",{"type":606,"tag":636,"props":1913,"children":1914},{"class":638,"line":144},[1915,1919,1923,1927,1932,1936,1941,1945,1949],{"type":606,"tag":636,"props":1916,"children":1917},{"style":676},[1918],{"type":612,"value":714},{"type":606,"tag":636,"props":1920,"children":1921},{"style":657},[1922],{"type":612,"value":719},{"type":606,"tag":636,"props":1924,"children":1925},{"style":651},[1926],{"type":612,"value":770},{"type":606,"tag":636,"props":1928,"children":1929},{"style":722},[1930],{"type":612,"value":1931},"\"Age: ",{"type":606,"tag":636,"props":1933,"children":1934},{"style":676},[1935],{"type":612,"value":780},{"type":606,"tag":636,"props":1937,"children":1938},{"style":657},[1939],{"type":612,"value":1940},"age",{"type":606,"tag":636,"props":1942,"children":1943},{"style":676},[1944],{"type":612,"value":790},{"type":606,"tag":636,"props":1946,"children":1947},{"style":722},[1948],{"type":612,"value":795},{"type":606,"tag":636,"props":1950,"children":1951},{"style":657},[1952],{"type":612,"value":730},{"type":606,"tag":636,"props":1954,"children":1955},{"class":638,"line":153},[1956,1960,1964],{"type":606,"tag":636,"props":1957,"children":1958},{"style":651},[1959],{"type":612,"value":697},{"type":606,"tag":636,"props":1961,"children":1962},{"style":676},[1963],{"type":612,"value":868},{"type":606,"tag":636,"props":1965,"children":1966},{"style":657},[1967],{"type":612,"value":660},{"type":606,"tag":636,"props":1969,"children":1970},{"class":638,"line":163},[1971,1975,1979,1984],{"type":606,"tag":636,"props":1972,"children":1973},{"style":676},[1974],{"type":612,"value":714},{"type":606,"tag":636,"props":1976,"children":1977},{"style":657},[1978],{"type":612,"value":719},{"type":606,"tag":636,"props":1980,"children":1981},{"style":722},[1982],{"type":612,"value":1983},"\"Please enter a valid number\"",{"type":606,"tag":636,"props":1985,"children":1986},{"style":657},[1987],{"type":612,"value":730},{"type":606,"tag":636,"props":1989,"children":1990},{"class":638,"line":172},[1991],{"type":606,"tag":636,"props":1992,"children":1993},{"emptyLinePlaceholder":13},[1994],{"type":612,"value":753},{"type":606,"tag":636,"props":1996,"children":1997},{"class":638,"line":181},[1998],{"type":606,"tag":636,"props":1999,"children":2000},{"style":642},[2001],{"type":612,"value":2002},"# Custom error handling\n",{"type":606,"tag":636,"props":2004,"children":2005},{"class":638,"line":190},[2006,2011,2017,2021,2025],{"type":606,"tag":636,"props":2007,"children":2008},{"style":651},[2009],{"type":612,"value":2010},"class",{"type":606,"tag":636,"props":2012,"children":2014},{"style":2013},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2015],{"type":612,"value":2016}," CustomError",{"type":606,"tag":636,"props":2018,"children":2019},{"style":657},[2020],{"type":612,"value":719},{"type":606,"tag":636,"props":2022,"children":2023},{"style":676},[2024],{"type":612,"value":1254},{"type":606,"tag":636,"props":2026,"children":2027},{"style":657},[2028],{"type":612,"value":2029},"):\n",{"type":606,"tag":636,"props":2031,"children":2032},{"class":638,"line":199},[2033],{"type":606,"tag":636,"props":2034,"children":2035},{"style":651},[2036],{"type":612,"value":2037},"    pass\n",{"type":606,"tag":636,"props":2039,"children":2040},{"class":638,"line":208},[2041],{"type":606,"tag":636,"props":2042,"children":2043},{"emptyLinePlaceholder":13},[2044],{"type":612,"value":753},{"type":606,"tag":636,"props":2046,"children":2047},{"class":638,"line":217},[2048,2052],{"type":606,"tag":636,"props":2049,"children":2050},{"style":651},[2051],{"type":612,"value":654},{"type":606,"tag":636,"props":2053,"children":2054},{"style":657},[2055],{"type":612,"value":660},{"type":606,"tag":636,"props":2057,"children":2058},{"class":638,"line":227},[2059,2064,2069,2074],{"type":606,"tag":636,"props":2060,"children":2061},{"style":651},[2062],{"type":612,"value":2063},"    raise",{"type":606,"tag":636,"props":2065,"children":2066},{"style":657},[2067],{"type":612,"value":2068}," CustomError(",{"type":606,"tag":636,"props":2070,"children":2071},{"style":722},[2072],{"type":612,"value":2073},"\"Something went wrong\"",{"type":606,"tag":636,"props":2075,"children":2076},{"style":657},[2077],{"type":612,"value":730},{"type":606,"tag":636,"props":2079,"children":2080},{"class":638,"line":236},[2081,2085,2090,2094],{"type":606,"tag":636,"props":2082,"children":2083},{"style":651},[2084],{"type":612,"value":697},{"type":606,"tag":636,"props":2086,"children":2087},{"style":657},[2088],{"type":612,"value":2089}," CustomError ",{"type":606,"tag":636,"props":2091,"children":2092},{"style":651},[2093],{"type":612,"value":1723},{"type":606,"tag":636,"props":2095,"children":2096},{"style":657},[2097],{"type":612,"value":914},{"type":606,"tag":636,"props":2099,"children":2100},{"class":638,"line":245},[2101,2105,2109,2113,2118,2122,2126,2130,2134],{"type":606,"tag":636,"props":2102,"children":2103},{"style":676},[2104],{"type":612,"value":714},{"type":606,"tag":636,"props":2106,"children":2107},{"style":657},[2108],{"type":612,"value":719},{"type":606,"tag":636,"props":2110,"children":2111},{"style":651},[2112],{"type":612,"value":770},{"type":606,"tag":636,"props":2114,"children":2115},{"style":722},[2116],{"type":612,"value":2117},"\"Custom error: ",{"type":606,"tag":636,"props":2119,"children":2120},{"style":676},[2121],{"type":612,"value":780},{"type":606,"tag":636,"props":2123,"children":2124},{"style":657},[2125],{"type":612,"value":943},{"type":606,"tag":636,"props":2127,"children":2128},{"style":676},[2129],{"type":612,"value":790},{"type":606,"tag":636,"props":2131,"children":2132},{"style":722},[2133],{"type":612,"value":795},{"type":606,"tag":636,"props":2135,"children":2136},{"style":657},[2137],{"type":612,"value":730},{"type":606,"tag":957,"props":2139,"children":2141},{"id":2140},"️-error-handling-hierarchy",[2142],{"type":612,"value":2143},"🏗️ Error Handling Hierarchy",{"type":606,"tag":615,"props":2145,"children":2146},{},[2147],{"type":612,"value":2148},"Understanding Python's exception hierarchy helps you catch errors effectively:",{"type":606,"tag":625,"props":2150,"children":2152},{"code":2151},"BaseException\n +-- Exception\n      +-- ValueError\n      +-- TypeError  \n      +-- KeyError\n      +-- IndexError\n      +-- FileNotFoundError\n      +-- ZeroDivisionError\n      +-- AttributeError\n      +-- ImportError\n",[2153],{"type":606,"tag":632,"props":2154,"children":2155},{"__ignoreMap":8},[2156],{"type":612,"value":2151},{"type":606,"tag":1025,"props":2158,"children":2162},{"emoji":2159,"title":2160,"type":2161},"🛡️","Ready to Handle Errors?","success",[2163,2168,2196],{"type":606,"tag":615,"props":2164,"children":2165},{},[2166],{"type":612,"value":2167},"Error handling is essential for professional Python development. Master these topics to:",{"type":606,"tag":969,"props":2169,"children":2170},{},[2171,2176,2181,2186,2191],{"type":606,"tag":973,"props":2172,"children":2173},{},[2174],{"type":612,"value":2175},"🚨 Build crash-resistant applications",{"type":606,"tag":973,"props":2177,"children":2178},{},[2179],{"type":612,"value":2180},"🔍 Debug issues effectively",{"type":606,"tag":973,"props":2182,"children":2183},{},[2184],{"type":612,"value":2185},"📝 Track application behavior",{"type":606,"tag":973,"props":2187,"children":2188},{},[2189],{"type":612,"value":2190},"⚡ Create robust, maintainable code",{"type":606,"tag":973,"props":2192,"children":2193},{},[2194],{"type":612,"value":2195},"🔄 Implement fault-tolerant systems",{"type":606,"tag":615,"props":2197,"children":2198},{},[2199,2204,2206],{"type":606,"tag":977,"props":2200,"children":2201},{},[2202],{"type":612,"value":2203},"Start your journey",{"type":612,"value":2205},": Begin with ",{"type":606,"tag":1174,"props":2207,"children":2208},{"href":363},[2209],{"type":612,"value":364},{"type":606,"tag":615,"props":2211,"children":2212},{},[2213],{"type":612,"value":2214},"Build robust Python applications that handle errors gracefully! 🛡️✨",{"type":606,"tag":2216,"props":2217,"children":2218},"style",{},[2219],{"type":612,"value":2220},"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":2222},[2223,2224,2225,2229,2230],{"id":959,"depth":27,"text":962},{"id":1156,"depth":27,"text":1159},{"id":1226,"depth":27,"text":1229,"children":2226},[2227,2228],{"id":1233,"depth":36,"text":1236},{"id":1480,"depth":36,"text":1483},{"id":1644,"depth":27,"text":1647},{"id":2140,"depth":27,"text":2143},1782373759211]