[{"data":1,"prerenderedAt":1366},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/file-operations":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[212],{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"body":602,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20},{"type":603,"children":604,"toc":1360},"root",[605,613,619,863,870,875,905,987,993,998,1079,1085,1265,1271,1354],{"type":606,"tag":607,"props":608,"children":609},"element","h1",{"id":216},[610],{"type":611,"value":612},"text","📁 File Operations",{"type":606,"tag":614,"props":615,"children":616},"p",{},[617],{"type":611,"value":618},"File operations are fundamental to most Python applications. Whether you're reading configuration files, processing data, or saving results, understanding how to work with files safely and efficiently is essential.",{"type":606,"tag":620,"props":621,"children":622},"code-try",{},[623],{"type":606,"tag":624,"props":625,"children":629},"pre",{"className":626,"code":627,"language":628,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic file operations\n# Reading a file\nwith open('example.txt', 'r') as file:\n    content = file.read()\n    print(f\"File content: {content}\")\n\n# Writing to a file\nwith open('output.txt', 'w') as file:\n    file.write(\"Hello, Python!\")\n","python",[630],{"type":606,"tag":631,"props":632,"children":633},"code",{"__ignoreMap":8},[634,645,653,711,733,779,787,795,840],{"type":606,"tag":635,"props":636,"children":638},"span",{"class":637,"line":12},"line",[639],{"type":606,"tag":635,"props":640,"children":642},{"style":641},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[643],{"type":611,"value":644},"# Basic file operations\n",{"type":606,"tag":635,"props":646,"children":647},{"class":637,"line":27},[648],{"type":606,"tag":635,"props":649,"children":650},{"style":641},[651],{"type":611,"value":652},"# Reading a file\n",{"type":606,"tag":635,"props":654,"children":655},{"class":637,"line":36},[656,662,668,674,680,685,690,695,700,706],{"type":606,"tag":635,"props":657,"children":659},{"style":658},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[660],{"type":611,"value":661},"with",{"type":606,"tag":635,"props":663,"children":665},{"style":664},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[666],{"type":611,"value":667}," open",{"type":606,"tag":635,"props":669,"children":671},{"style":670},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[672],{"type":611,"value":673},"(",{"type":606,"tag":635,"props":675,"children":677},{"style":676},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[678],{"type":611,"value":679},"'example.txt'",{"type":606,"tag":635,"props":681,"children":682},{"style":670},[683],{"type":611,"value":684},", ",{"type":606,"tag":635,"props":686,"children":687},{"style":676},[688],{"type":611,"value":689},"'r'",{"type":606,"tag":635,"props":691,"children":692},{"style":670},[693],{"type":611,"value":694},") ",{"type":606,"tag":635,"props":696,"children":697},{"style":658},[698],{"type":611,"value":699},"as",{"type":606,"tag":635,"props":701,"children":703},{"style":702},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[704],{"type":611,"value":705}," file",{"type":606,"tag":635,"props":707,"children":708},{"style":670},[709],{"type":611,"value":710},":\n",{"type":606,"tag":635,"props":712,"children":713},{"class":637,"line":45},[714,719,724,728],{"type":606,"tag":635,"props":715,"children":716},{"style":670},[717],{"type":611,"value":718},"    content ",{"type":606,"tag":635,"props":720,"children":721},{"style":658},[722],{"type":611,"value":723},"=",{"type":606,"tag":635,"props":725,"children":726},{"style":702},[727],{"type":611,"value":705},{"type":606,"tag":635,"props":729,"children":730},{"style":670},[731],{"type":611,"value":732},".read()\n",{"type":606,"tag":635,"props":734,"children":735},{"class":637,"line":54},[736,741,745,750,755,760,764,769,774],{"type":606,"tag":635,"props":737,"children":738},{"style":664},[739],{"type":611,"value":740},"    print",{"type":606,"tag":635,"props":742,"children":743},{"style":670},[744],{"type":611,"value":673},{"type":606,"tag":635,"props":746,"children":747},{"style":658},[748],{"type":611,"value":749},"f",{"type":606,"tag":635,"props":751,"children":752},{"style":676},[753],{"type":611,"value":754},"\"File content: ",{"type":606,"tag":635,"props":756,"children":757},{"style":664},[758],{"type":611,"value":759},"{",{"type":606,"tag":635,"props":761,"children":762},{"style":670},[763],{"type":611,"value":17},{"type":606,"tag":635,"props":765,"children":766},{"style":664},[767],{"type":611,"value":768},"}",{"type":606,"tag":635,"props":770,"children":771},{"style":676},[772],{"type":611,"value":773},"\"",{"type":606,"tag":635,"props":775,"children":776},{"style":670},[777],{"type":611,"value":778},")\n",{"type":606,"tag":635,"props":780,"children":781},{"class":637,"line":63},[782],{"type":606,"tag":635,"props":783,"children":784},{"emptyLinePlaceholder":13},[785],{"type":611,"value":786},"\n",{"type":606,"tag":635,"props":788,"children":789},{"class":637,"line":72},[790],{"type":606,"tag":635,"props":791,"children":792},{"style":641},[793],{"type":611,"value":794},"# Writing to a file\n",{"type":606,"tag":635,"props":796,"children":797},{"class":637,"line":81},[798,802,806,810,815,819,824,828,832,836],{"type":606,"tag":635,"props":799,"children":800},{"style":658},[801],{"type":611,"value":661},{"type":606,"tag":635,"props":803,"children":804},{"style":664},[805],{"type":611,"value":667},{"type":606,"tag":635,"props":807,"children":808},{"style":670},[809],{"type":611,"value":673},{"type":606,"tag":635,"props":811,"children":812},{"style":676},[813],{"type":611,"value":814},"'output.txt'",{"type":606,"tag":635,"props":816,"children":817},{"style":670},[818],{"type":611,"value":684},{"type":606,"tag":635,"props":820,"children":821},{"style":676},[822],{"type":611,"value":823},"'w'",{"type":606,"tag":635,"props":825,"children":826},{"style":670},[827],{"type":611,"value":694},{"type":606,"tag":635,"props":829,"children":830},{"style":658},[831],{"type":611,"value":699},{"type":606,"tag":635,"props":833,"children":834},{"style":702},[835],{"type":611,"value":705},{"type":606,"tag":635,"props":837,"children":838},{"style":670},[839],{"type":611,"value":710},{"type":606,"tag":635,"props":841,"children":843},{"class":637,"line":842},9,[844,849,854,859],{"type":606,"tag":635,"props":845,"children":846},{"style":702},[847],{"type":611,"value":848},"    file",{"type":606,"tag":635,"props":850,"children":851},{"style":670},[852],{"type":611,"value":853},".write(",{"type":606,"tag":635,"props":855,"children":856},{"style":676},[857],{"type":611,"value":858},"\"Hello, Python!\"",{"type":606,"tag":635,"props":860,"children":861},{"style":670},[862],{"type":611,"value":778},{"type":606,"tag":864,"props":865,"children":867},"h2",{"id":866},"why-file-operations-matter",[868],{"type":611,"value":869},"🤔 Why File Operations Matter",{"type":606,"tag":614,"props":871,"children":872},{},[873],{"type":611,"value":874},"File operations are crucial for:",{"type":606,"tag":876,"props":877,"children":878},"ul",{},[879,885,890,895,900],{"type":606,"tag":880,"props":881,"children":882},"li",{},[883],{"type":611,"value":884},"Data persistence and storage",{"type":606,"tag":880,"props":886,"children":887},{},[888],{"type":611,"value":889},"Configuration management",{"type":606,"tag":880,"props":891,"children":892},{},[893],{"type":611,"value":894},"Log file processing",{"type":606,"tag":880,"props":896,"children":897},{},[898],{"type":611,"value":899},"Data import/export",{"type":606,"tag":880,"props":901,"children":902},{},[903],{"type":611,"value":904},"Backup and archival",{"type":606,"tag":906,"props":907,"children":911},"info-box",{"emoji":908,"title":909,"type":910},"📝","File Operation Fundamentals","info",[912,921,956,964],{"type":606,"tag":614,"props":913,"children":914},{},[915],{"type":606,"tag":916,"props":917,"children":918},"strong",{},[919],{"type":611,"value":920},"Key Concepts:",{"type":606,"tag":876,"props":922,"children":923},{},[924,929,941,946,951],{"type":606,"tag":880,"props":925,"children":926},{},[927],{"type":611,"value":928},"File modes (read, write, append)",{"type":606,"tag":880,"props":930,"children":931},{},[932,934,939],{"type":611,"value":933},"Context managers (",{"type":606,"tag":631,"props":935,"children":937},{"className":936},[],[938],{"type":611,"value":661},{"type":611,"value":940}," statement)",{"type":606,"tag":880,"props":942,"children":943},{},[944],{"type":611,"value":945},"Text vs binary files",{"type":606,"tag":880,"props":947,"children":948},{},[949],{"type":611,"value":950},"File paths and directories",{"type":606,"tag":880,"props":952,"children":953},{},[954],{"type":611,"value":955},"Error handling",{"type":606,"tag":614,"props":957,"children":958},{},[959],{"type":606,"tag":916,"props":960,"children":961},{},[962],{"type":611,"value":963},"Best Practices:",{"type":606,"tag":876,"props":965,"children":966},{},[967,972,977,982],{"type":606,"tag":880,"props":968,"children":969},{},[970],{"type":611,"value":971},"Always use context managers",{"type":606,"tag":880,"props":973,"children":974},{},[975],{"type":611,"value":976},"Handle exceptions gracefully",{"type":606,"tag":880,"props":978,"children":979},{},[980],{"type":611,"value":981},"Close files properly",{"type":606,"tag":880,"props":983,"children":984},{},[985],{"type":611,"value":986},"Use appropriate file modes",{"type":606,"tag":864,"props":988,"children":990},{"id":989},"what-youll-learn-in-this-section",[991],{"type":611,"value":992},"📚 What You'll Learn in This Section",{"type":606,"tag":614,"props":994,"children":995},{},[996],{"type":611,"value":997},"This section covers essential file operations:",{"type":606,"tag":876,"props":999,"children":1000},{},[1001,1013,1024,1035,1046,1057,1068],{"type":606,"tag":880,"props":1002,"children":1003},{},[1004,1006,1011],{"type":611,"value":1005},"📖 ",{"type":606,"tag":1007,"props":1008,"children":1009},"a",{"href":223},[1010],{"type":611,"value":224},{"type":611,"value":1012}," - Open and read text file content",{"type":606,"tag":880,"props":1014,"children":1015},{},[1016,1018,1022],{"type":611,"value":1017},"✏️ ",{"type":606,"tag":1007,"props":1019,"children":1020},{"href":232},[1021],{"type":611,"value":233},{"type":611,"value":1023}," - Create and write file content",{"type":606,"tag":880,"props":1025,"children":1026},{},[1027,1029,1033],{"type":611,"value":1028},"📊 ",{"type":606,"tag":1007,"props":1030,"children":1031},{"href":241},[1032],{"type":611,"value":242},{"type":611,"value":1034}," - Handle CSV data files",{"type":606,"tag":880,"props":1036,"children":1037},{},[1038,1040,1044],{"type":611,"value":1039},"🗂️ ",{"type":606,"tag":1007,"props":1041,"children":1042},{"href":250},[1043],{"type":611,"value":251},{"type":611,"value":1045}," - Manage file and directory paths",{"type":606,"tag":880,"props":1047,"children":1048},{},[1049,1051,1055],{"type":611,"value":1050},"🔗 ",{"type":606,"tag":1007,"props":1052,"children":1053},{"href":259},[1054],{"type":611,"value":260},{"type":611,"value":1056}," - Process JSON data",{"type":606,"tag":880,"props":1058,"children":1059},{},[1060,1062,1066],{"type":611,"value":1061},"💾 ",{"type":606,"tag":1007,"props":1063,"children":1064},{"href":268},[1065],{"type":611,"value":269},{"type":611,"value":1067}," - Work with binary data",{"type":606,"tag":880,"props":1069,"children":1070},{},[1071,1073,1077],{"type":611,"value":1072},"🔒 ",{"type":606,"tag":1007,"props":1074,"children":1075},{"href":277},[1076],{"type":611,"value":278},{"type":611,"value":1078}," - Safe file handling",{"type":606,"tag":864,"props":1080,"children":1082},{"id":1081},"essential-file-modes-reference",[1083],{"type":611,"value":1084},"📋 Essential File Modes Reference",{"type":606,"tag":906,"props":1086,"children":1090},{"emoji":1087,"title":1088,"type":1089},"📋","File Modes Quick Reference","success",[1091,1099,1166,1174,1221,1229],{"type":606,"tag":614,"props":1092,"children":1093},{},[1094],{"type":606,"tag":916,"props":1095,"children":1096},{},[1097],{"type":611,"value":1098},"Text Modes:",{"type":606,"tag":876,"props":1100,"children":1101},{},[1102,1112,1122,1133,1144,1155],{"type":606,"tag":880,"props":1103,"children":1104},{},[1105,1110],{"type":606,"tag":631,"props":1106,"children":1108},{"className":1107},[],[1109],{"type":611,"value":689},{"type":611,"value":1111},": Read only (default)",{"type":606,"tag":880,"props":1113,"children":1114},{},[1115,1120],{"type":606,"tag":631,"props":1116,"children":1118},{"className":1117},[],[1119],{"type":611,"value":823},{"type":611,"value":1121},": Write only (overwrites existing)",{"type":606,"tag":880,"props":1123,"children":1124},{},[1125,1131],{"type":606,"tag":631,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":611,"value":1130},"'a'",{"type":611,"value":1132},": Append only",{"type":606,"tag":880,"props":1134,"children":1135},{},[1136,1142],{"type":606,"tag":631,"props":1137,"children":1139},{"className":1138},[],[1140],{"type":611,"value":1141},"'r+'",{"type":611,"value":1143},": Read and write",{"type":606,"tag":880,"props":1145,"children":1146},{},[1147,1153],{"type":606,"tag":631,"props":1148,"children":1150},{"className":1149},[],[1151],{"type":611,"value":1152},"'w+'",{"type":611,"value":1154},": Write and read (overwrites)",{"type":606,"tag":880,"props":1156,"children":1157},{},[1158,1164],{"type":606,"tag":631,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":611,"value":1163},"'a+'",{"type":611,"value":1165},": Append and read",{"type":606,"tag":614,"props":1167,"children":1168},{},[1169],{"type":606,"tag":916,"props":1170,"children":1171},{},[1172],{"type":611,"value":1173},"Binary Modes:",{"type":606,"tag":876,"props":1175,"children":1176},{},[1177,1188,1199,1210],{"type":606,"tag":880,"props":1178,"children":1179},{},[1180,1186],{"type":606,"tag":631,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":611,"value":1185},"'rb'",{"type":611,"value":1187},": Read binary",{"type":606,"tag":880,"props":1189,"children":1190},{},[1191,1197],{"type":606,"tag":631,"props":1192,"children":1194},{"className":1193},[],[1195],{"type":611,"value":1196},"'wb'",{"type":611,"value":1198},": Write binary",{"type":606,"tag":880,"props":1200,"children":1201},{},[1202,1208],{"type":606,"tag":631,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":611,"value":1207},"'ab'",{"type":611,"value":1209},": Append binary",{"type":606,"tag":880,"props":1211,"children":1212},{},[1213,1219],{"type":606,"tag":631,"props":1214,"children":1216},{"className":1215},[],[1217],{"type":611,"value":1218},"'rb+'",{"type":611,"value":1220},": Read/write binary",{"type":606,"tag":614,"props":1222,"children":1223},{},[1224],{"type":606,"tag":916,"props":1225,"children":1226},{},[1227],{"type":611,"value":1228},"Special Modes:",{"type":606,"tag":876,"props":1230,"children":1231},{},[1232,1243,1254],{"type":606,"tag":880,"props":1233,"children":1234},{},[1235,1241],{"type":606,"tag":631,"props":1236,"children":1238},{"className":1237},[],[1239],{"type":611,"value":1240},"'x'",{"type":611,"value":1242},": Exclusive creation (fails if exists)",{"type":606,"tag":880,"props":1244,"children":1245},{},[1246,1252],{"type":606,"tag":631,"props":1247,"children":1249},{"className":1248},[],[1250],{"type":611,"value":1251},"'t'",{"type":611,"value":1253},": Text mode (default)",{"type":606,"tag":880,"props":1255,"children":1256},{},[1257,1263],{"type":606,"tag":631,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":611,"value":1262},"'b'",{"type":611,"value":1264},": Binary mode",{"type":606,"tag":864,"props":1266,"children":1268},{"id":1267},"key-takeaways",[1269],{"type":611,"value":1270},"🎯 Key Takeaways",{"type":606,"tag":906,"props":1272,"children":1275},{"emoji":1273,"title":1274,"type":1089},"📚","File Operations Essentials",[1276,1284,1306,1314,1337],{"type":606,"tag":614,"props":1277,"children":1278},{},[1279],{"type":606,"tag":916,"props":1280,"children":1281},{},[1282],{"type":611,"value":1283},"Basic Operations:",{"type":606,"tag":876,"props":1285,"children":1286},{},[1287,1292,1297,1301],{"type":606,"tag":880,"props":1288,"children":1289},{},[1290],{"type":611,"value":1291},"Reading and writing files",{"type":606,"tag":880,"props":1293,"children":1294},{},[1295],{"type":611,"value":1296},"Different file modes",{"type":606,"tag":880,"props":1298,"children":1299},{},[1300],{"type":611,"value":955},{"type":606,"tag":880,"props":1302,"children":1303},{},[1304],{"type":611,"value":1305},"Path management",{"type":606,"tag":614,"props":1307,"children":1308},{},[1309],{"type":606,"tag":916,"props":1310,"children":1311},{},[1312],{"type":611,"value":1313},"Advanced Features:",{"type":606,"tag":876,"props":1315,"children":1316},{},[1317,1322,1327,1332],{"type":606,"tag":880,"props":1318,"children":1319},{},[1320],{"type":611,"value":1321},"CSV and JSON processing",{"type":606,"tag":880,"props":1323,"children":1324},{},[1325],{"type":611,"value":1326},"Binary file handling",{"type":606,"tag":880,"props":1328,"children":1329},{},[1330],{"type":611,"value":1331},"Context managers",{"type":606,"tag":880,"props":1333,"children":1334},{},[1335],{"type":611,"value":1336},"File system operations",{"type":606,"tag":614,"props":1338,"children":1339},{},[1340,1345,1347,1352],{"type":606,"tag":916,"props":1341,"children":1342},{},[1343],{"type":611,"value":1344},"Remember:",{"type":611,"value":1346}," Always use context managers (",{"type":606,"tag":631,"props":1348,"children":1350},{"className":1349},[],[1351],{"type":611,"value":661},{"type":611,"value":1353}," statement) for safe file handling!",{"type":606,"tag":1355,"props":1356,"children":1357},"style",{},[1358],{"type":611,"value":1359},"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":1361},[1362,1363,1364,1365],{"id":866,"depth":27,"text":869},{"id":989,"depth":27,"text":992},{"id":1081,"depth":27,"text":1084},{"id":1267,"depth":27,"text":1270},1782373756234]