[{"data":1,"prerenderedAt":7722},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/file-operations-reference":988},[4,22,31,40,49,58,67,76,86,95,104,113,122,131,141,150,159,168,177,186,196,205,214,223,233,242,251,260,269,279,288,297,306,315,324,333,342,351,360,369,379,388,397,406,415,424,433,442,452,461,470,479,488,497,506,515,525,534,543,552,561,570,579,588,597,606,616,625,634,643,652,661,670,680,689,698,707,716,725,734,744,753,762,771,780,789,798,807,817,826,835,844,853,863,872,881,890,900,909,918,927,936,945,953,961,970,979],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21},"/python/getting-started","python",false,"","Getting Started","Begin your Python programming journey. Learn what Python is, how to set it up, and write your first programs. Perfect for complete beginners starting their coding adventure.","getting-started",1,true,"pi pi-folder","markdown","content:python:1.getting-started.md","content","python/1.getting-started.md","python/1.getting-started","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/what-is-python","What is Python","Discover Python's fascinating history, design philosophy, and key features. Learn why Python has become one of the world's most popular programming languages and perfect for beginners.","what-is-python",2,"content:python:2.what-is-python.md","python/2.what-is-python.md","python/2.what-is-python",{"_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/setup-python","Setup Python","Learn how to install Python on your computer and set up your development environment. Step-by-step guide for Windows, macOS, and Linux with beginner-friendly instructions.","setup-python",3,"content:python:3.setup-python.md","python/3.setup-python.md","python/3.setup-python",{"_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/your-first-program","Your First Program","Write and run your first Python program! Learn the basics of Python programming with simple examples and step-by-step instructions for beginners.","your-first-program",4,"content:python:4.your-first-program.md","python/4.your-first-program.md","python/4.your-first-program",{"_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/python-code-structure","Python Code Structure","Learn how Python code is organized and structured. Understand indentation, line breaks, and the basic rules that make Python programs work correctly.","python-code-structure",5,"content:python:5.python-code-structure.md","python/5.python-code-structure.md","python/5.python-code-structure",{"_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/writing-comments","Writing Comments","Learn how to write effective comments in Python. Discover when and how to document your code to make it clear, maintainable, and easy to understand.","writing-comments",6,"content:python:6.writing-comments.md","python/6.writing-comments.md","python/6.writing-comments",{"_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/working-with-variables","Working with Variables","Learn how to create, use, and manage variables in Python. Understand how to store data, change values, and follow naming conventions for clean, readable code.","working-with-variables",7,"content:python:7.working-with-variables.md","python/7.working-with-variables.md","python/7.working-with-variables",{"_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/basic-data-types","Basic Data Types","Learn about Python's fundamental data types including numbers, text, and boolean values","basic-data-types",8,"content:python:8.basic-data-types.md","python/8.basic-data-types.md","python/8.basic-data-types",[86,95,104,113,122],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":91,"_type":15,"_id":92,"_source":17,"_file":93,"_stem":94,"_extension":20},"/python/understanding-data-types","Understanding Data Types","Learn how Python identifies different data types and why they're important for programming","understanding-data-types",9,"content:python:9.understanding-data-types.md","python/9.understanding-data-types.md","python/9.understanding-data-types",{"_path":96,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":97,"description":98,"slug":99,"parentId":77,"order":100,"_type":15,"_id":101,"_source":17,"_file":102,"_stem":103,"_extension":20},"/python/working-with-numbers","Working with Numbers","Learn about Python's numeric data types including integers and floats, and how to perform calculations","working-with-numbers",10,"content:python:10.working-with-numbers.md","python/10.working-with-numbers.md","python/10.working-with-numbers",{"_path":105,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":106,"description":107,"slug":108,"parentId":77,"order":109,"_type":15,"_id":110,"_source":17,"_file":111,"_stem":112,"_extension":20},"/python/text-and-strings","Text and Strings","Learn how to work with text data in Python using strings, including creation, manipulation, and formatting","text-and-strings",11,"content:python:11.text-and-strings.md","python/11.text-and-strings.md","python/11.text-and-strings",{"_path":114,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":115,"description":116,"slug":117,"parentId":77,"order":118,"_type":15,"_id":119,"_source":17,"_file":120,"_stem":121,"_extension":20},"/python/true-false-values","True/False Values","Learn about boolean values in Python, including True/False logic, comparison operations, and how to use booleans for decision-making in your programs","true-false-values",12,"content:python:12.true-false-values.md","python/12.true-false-values.md","python/12.true-false-values",{"_path":123,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":124,"description":125,"slug":126,"parentId":77,"order":127,"_type":15,"_id":128,"_source":17,"_file":129,"_stem":130,"_extension":20},"/python/converting-types","Converting Types","Learn how to convert between different Python data types including strings, numbers, and booleans","converting-types",13,"content:python:13.converting-types.md","python/13.converting-types.md","python/13.converting-types",{"_path":132,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":133,"description":134,"slug":135,"order":136,"isParent":13,"icon":14,"_type":15,"_id":137,"_source":17,"_file":138,"_stem":139,"_extension":20,"children":140},"/python/python-operators","Python Operators","Learn about Python operators - the symbols and keywords that perform operations on data. Discover arithmetic, comparison, logical, and assignment operators with simple examples.","python-operators",14,"content:python:14.python-operators.md","python/14.python-operators.md","python/14.python-operators",[141,150,159,168,177],{"_path":142,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":143,"description":144,"slug":145,"parentId":132,"order":146,"_type":15,"_id":147,"_source":17,"_file":148,"_stem":149,"_extension":20},"/python/math-operations","Math Operations","Learn Python's arithmetic operators for mathematical calculations. Master addition, subtraction, multiplication, division, and more with practical examples.","math-operations",15,"content:python:15.math-operations.md","python/15.math-operations.md","python/15.math-operations",{"_path":151,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":152,"description":153,"slug":154,"parentId":132,"order":155,"_type":15,"_id":156,"_source":17,"_file":157,"_stem":158,"_extension":20},"/python/comparing-values","Comparing Values","Learn Python's comparison operators to compare values and make decisions. Master equality, inequality, and relational operators with practical examples.","comparing-values",16,"content:python:16.comparing-values.md","python/16.comparing-values.md","python/16.comparing-values",{"_path":160,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":161,"description":162,"slug":163,"parentId":132,"order":164,"_type":15,"_id":165,"_source":17,"_file":166,"_stem":167,"_extension":20},"/python/logic-operations","Logic Operations","Learn about Python's logical operators for combining conditions and creating complex boolean expressions","logic-operations",17,"content:python:17.logic-operations.md","python/17.logic-operations.md","python/17.logic-operations",{"_path":169,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":170,"description":171,"slug":172,"parentId":132,"order":173,"_type":15,"_id":174,"_source":17,"_file":175,"_stem":176,"_extension":20},"/python/value-assignment","Value Assignment","Learn about Python's assignment operators for efficiently updating variables and performing calculations","value-assignment",18,"content:python:18.value-assignment.md","python/18.value-assignment.md","python/18.value-assignment",{"_path":178,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":179,"description":180,"slug":181,"parentId":132,"order":182,"_type":15,"_id":183,"_source":17,"_file":184,"_stem":185,"_extension":20},"/python/operator-precedence","Operator Precedence","Learn how Python evaluates expressions with multiple operators and how to control evaluation order","operator-precedence",19,"content:python:19.operator-precedence.md","python/19.operator-precedence.md","python/19.operator-precedence",{"_path":187,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":188,"description":189,"slug":190,"order":191,"isParent":13,"icon":14,"_type":15,"_id":192,"_source":17,"_file":193,"_stem":194,"_extension":20,"children":195},"/python/decision-making","Decision Making","Learn how to make decisions in your Python programs using conditional statements and control flow","decision-making",20,"content:python:20.decision-making.md","python/20.decision-making.md","python/20.decision-making",[196,205,214],{"_path":197,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":198,"description":199,"slug":200,"parentId":187,"order":201,"_type":15,"_id":202,"_source":17,"_file":203,"_stem":204,"_extension":20},"/python/if-statements","If Statements","Learn how to use if statements to make decisions and control program flow in Python","if-statements",21,"content:python:21.if-statements.md","python/21.if-statements.md","python/21.if-statements",{"_path":206,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":207,"description":208,"slug":209,"parentId":187,"order":210,"_type":15,"_id":211,"_source":17,"_file":212,"_stem":213,"_extension":20},"/python/multiple-conditions","Multiple Conditions","Learn how to handle multiple conditions using elif statements and complex conditional logic in Python","multiple-conditions",22,"content:python:22.multiple-conditions.md","python/22.multiple-conditions.md","python/22.multiple-conditions",{"_path":215,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":216,"description":217,"slug":218,"parentId":187,"order":219,"_type":15,"_id":220,"_source":17,"_file":221,"_stem":222,"_extension":20},"/python/pattern-matching","Pattern Matching","Learn how to use Python's match-case statements for powerful pattern matching and complex decision making","pattern-matching",23,"content:python:23.pattern-matching.md","python/23.pattern-matching.md","python/23.pattern-matching",{"_path":224,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":225,"description":226,"slug":227,"order":228,"isParent":13,"icon":14,"_type":15,"_id":229,"_source":17,"_file":230,"_stem":231,"_extension":20,"children":232},"/python/repetition-and-loops","Python Loops","Learn how to use loops to repeat code efficiently and handle repetitive tasks in Python","repetition-and-loops",24,"content:python:24.repetition-and-loops.md","python/24.repetition-and-loops.md","python/24.repetition-and-loops",[233,242,251,260],{"_path":234,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":235,"description":236,"slug":237,"parentId":224,"order":238,"_type":15,"_id":239,"_source":17,"_file":240,"_stem":241,"_extension":20},"/python/while-loops","While Loops","Learn how to use while loops for condition-based repetition and create loops that run until specific conditions are met","while-loops",25,"content:python:25.while-loops.md","python/25.while-loops.md","python/25.while-loops",{"_path":243,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":244,"description":245,"slug":246,"parentId":224,"order":247,"_type":15,"_id":248,"_source":17,"_file":249,"_stem":250,"_extension":20},"/python/for-loops","For Loops","Learn how to use for loops to iterate through sequences, collections, and ranges efficiently in Python","for-loops",26,"content:python:26.for-loops.md","python/26.for-loops.md","python/26.for-loops",{"_path":252,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":253,"description":254,"slug":255,"parentId":224,"order":256,"_type":15,"_id":257,"_source":17,"_file":258,"_stem":259,"_extension":20},"/python/loop-control","Loop Control","Master advanced loop control techniques including break, continue, and else clauses for sophisticated iteration patterns","loop-control",27,"content:python:27.loop-control.md","python/27.loop-control.md","python/27.loop-control",{"_path":261,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":262,"description":263,"slug":264,"parentId":224,"order":265,"_type":15,"_id":266,"_source":17,"_file":267,"_stem":268,"_extension":20},"/python/nested-loops","Nested Loops","Learn how to use nested loops to process multi-dimensional data, create patterns, and handle complex iteration scenarios","nested-loops",28,"content:python:28.nested-loops.md","python/28.nested-loops.md","python/28.nested-loops",{"_path":270,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":271,"description":272,"slug":273,"order":274,"isParent":13,"icon":14,"_type":15,"_id":275,"_source":17,"_file":276,"_stem":277,"_extension":20,"children":278},"/python/python-lists","Python Lists","Learn about Python lists, one of the most important and versatile data structures for storing and organizing collections of data","python-lists",29,"content:python:29.python-lists.md","python/29.python-lists.md","python/29.python-lists",[279,288,297,306,315,324,333,342,351,360],{"_path":280,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":281,"description":282,"slug":283,"parentId":270,"order":284,"_type":15,"_id":285,"_source":17,"_file":286,"_stem":287,"_extension":20},"/python/creating-lists","Creating Lists","Learn different methods to create and initialize Python lists, from simple literals to advanced techniques","creating-lists",30,"content:python:30.creating-lists.md","python/30.creating-lists.md","python/30.creating-lists",{"_path":289,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":290,"description":291,"slug":292,"parentId":270,"order":293,"_type":15,"_id":294,"_source":17,"_file":295,"_stem":296,"_extension":20},"/python/reading-list-data","Reading List Data","Master techniques for accessing and retrieving data from Python lists using indexing, slicing, and built-in methods","reading-list-data",31,"content:python:31.reading-list-data.md","python/31.reading-list-data.md","python/31.reading-list-data",{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":270,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python/modifying-lists","Modifying Lists","Learn how to change, update, and modify existing elements in Python lists using indexing and various methods","modifying-lists",32,"content:python:32.modifying-lists.md","python/32.modifying-lists.md","python/32.modifying-lists",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":270,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python/adding-to-lists","Adding to Lists","Learn various methods to add elements to Python lists including append, insert, extend, and concatenation techniques","adding-to-lists",33,"content:python:33.adding-to-lists.md","python/33.adding-to-lists.md","python/33.adding-to-lists",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":270,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python/removing-from-lists","Removing from Lists","Learn different methods to remove and delete elements from Python lists including remove, pop, del, and clear","removing-from-lists",34,"content:python:34.removing-from-lists.md","python/34.removing-from-lists.md","python/34.removing-from-lists",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":270,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python/looping-through-lists","Looping Through Lists","Learn different ways to iterate through Python lists using for loops, while loops, enumerate, and other iteration techniques","looping-through-lists",35,"content:python:35.looping-through-lists.md","python/35.looping-through-lists.md","python/35.looping-through-lists",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":270,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python/list-shortcuts","List Shortcuts","Learn powerful Python list shortcuts including list comprehensions, slicing tricks, and built-in functions for efficient list operations","list-shortcuts",36,"content:python:36.list-shortcuts.md","python/36.list-shortcuts.md","python/36.list-shortcuts",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":270,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python/organizing-lists","Organizing Lists","Learn how to sort, reverse, and organize Python lists using built-in methods and custom sorting techniques","organizing-lists",37,"content:python:37.organizing-lists.md","python/37.organizing-lists.md","python/37.organizing-lists",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":270,"order":356,"_type":15,"_id":357,"_source":17,"_file":358,"_stem":359,"_extension":20},"/python/combining-lists","Combining Lists","Learn various techniques to combine, merge, and join Python lists including concatenation, zipping, and advanced merging strategies","combining-lists",38,"content:python:38.combining-lists.md","python/38.combining-lists.md","python/38.combining-lists",{"_path":361,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":362,"description":363,"slug":364,"parentId":270,"order":365,"_type":15,"_id":366,"_source":17,"_file":367,"_stem":368,"_extension":20},"/python/essential-list-tools","Essential List Tools","Master powerful built-in functions and advanced techniques for efficient Python list manipulation and data processing","essential-list-tools",39,"content:python:39.essential-list-tools.md","python/39.essential-list-tools.md","python/39.essential-list-tools",{"_path":370,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":371,"description":372,"slug":373,"order":374,"isParent":13,"icon":14,"_type":15,"_id":375,"_source":17,"_file":376,"_stem":377,"_extension":20,"children":378},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[961],{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"body":989,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},{"type":990,"children":991,"toc":7689},"root",[992,999,1005,1012,1635,1640,1647,1829,2396,2402,2408,2582,2588,2724,2730,2864,2870,3073,3079,3359,3970,3976,3982,4417,4423,4734,4740,4746,5156,5162,5430,5434,5569,5575,5581,5979,5984,6183,6189,6195,6356,6362,6368,6921,6927,7575,7581,7683],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":965},[997],{"type":998,"value":963},"text",{"type":993,"tag":1000,"props":1001,"children":1002},"p",{},[1003],{"type":998,"value":1004},"Complete reference for Python file operations, modes, and methods. This covers all aspects of file handling including opening, reading, writing, and managing files and directories.",{"type":993,"tag":1006,"props":1007,"children":1009},"h2",{"id":1008},"file-opening-modes",[1010],{"type":998,"value":1011},"File Opening Modes",{"type":993,"tag":1013,"props":1014,"children":1015},"table",{},[1016,1065],{"type":993,"tag":1017,"props":1018,"children":1019},"thead",{},[1020],{"type":993,"tag":1021,"props":1022,"children":1023},"tr",{},[1024,1030,1035,1040,1045,1050,1055,1060],{"type":993,"tag":1025,"props":1026,"children":1027},"th",{},[1028],{"type":998,"value":1029},"Mode",{"type":993,"tag":1025,"props":1031,"children":1032},{},[1033],{"type":998,"value":1034},"Description",{"type":993,"tag":1025,"props":1036,"children":1037},{},[1038],{"type":998,"value":1039},"Read",{"type":993,"tag":1025,"props":1041,"children":1042},{},[1043],{"type":998,"value":1044},"Write",{"type":993,"tag":1025,"props":1046,"children":1047},{},[1048],{"type":998,"value":1049},"Create",{"type":993,"tag":1025,"props":1051,"children":1052},{},[1053],{"type":998,"value":1054},"Truncate",{"type":993,"tag":1025,"props":1056,"children":1057},{},[1058],{"type":998,"value":1059},"Position",{"type":993,"tag":1025,"props":1061,"children":1062},{},[1063],{"type":998,"value":1064},"Binary",{"type":993,"tag":1066,"props":1067,"children":1068},"tbody",{},[1069,1114,1154,1195,1236,1276,1315,1356,1396,1436,1476,1516,1556,1595],{"type":993,"tag":1021,"props":1070,"children":1071},{},[1072,1082,1087,1092,1097,1101,1105,1110],{"type":993,"tag":1073,"props":1074,"children":1075},"td",{},[1076],{"type":993,"tag":1077,"props":1078,"children":1079},"strong",{},[1080],{"type":998,"value":1081},"'r'",{"type":993,"tag":1073,"props":1083,"children":1084},{},[1085],{"type":998,"value":1086},"Read only (default)",{"type":993,"tag":1073,"props":1088,"children":1089},{},[1090],{"type":998,"value":1091},"✓",{"type":993,"tag":1073,"props":1093,"children":1094},{},[1095],{"type":998,"value":1096},"✗",{"type":993,"tag":1073,"props":1098,"children":1099},{},[1100],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1102,"children":1103},{},[1104],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1106,"children":1107},{},[1108],{"type":998,"value":1109},"Start",{"type":993,"tag":1073,"props":1111,"children":1112},{},[1113],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1115,"children":1116},{},[1117,1125,1130,1134,1138,1142,1146,1150],{"type":993,"tag":1073,"props":1118,"children":1119},{},[1120],{"type":993,"tag":1077,"props":1121,"children":1122},{},[1123],{"type":998,"value":1124},"'w'",{"type":993,"tag":1073,"props":1126,"children":1127},{},[1128],{"type":998,"value":1129},"Write only",{"type":993,"tag":1073,"props":1131,"children":1132},{},[1133],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1135,"children":1136},{},[1137],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1139,"children":1140},{},[1141],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1143,"children":1144},{},[1145],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1147,"children":1148},{},[1149],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1151,"children":1152},{},[1153],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1155,"children":1156},{},[1157,1165,1170,1174,1178,1182,1186,1191],{"type":993,"tag":1073,"props":1158,"children":1159},{},[1160],{"type":993,"tag":1077,"props":1161,"children":1162},{},[1163],{"type":998,"value":1164},"'a'",{"type":993,"tag":1073,"props":1166,"children":1167},{},[1168],{"type":998,"value":1169},"Append only",{"type":993,"tag":1073,"props":1171,"children":1172},{},[1173],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1175,"children":1176},{},[1177],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1179,"children":1180},{},[1181],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1183,"children":1184},{},[1185],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1187,"children":1188},{},[1189],{"type":998,"value":1190},"End",{"type":993,"tag":1073,"props":1192,"children":1193},{},[1194],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1196,"children":1197},{},[1198,1206,1211,1215,1219,1224,1228,1232],{"type":993,"tag":1073,"props":1199,"children":1200},{},[1201],{"type":993,"tag":1077,"props":1202,"children":1203},{},[1204],{"type":998,"value":1205},"'x'",{"type":993,"tag":1073,"props":1207,"children":1208},{},[1209],{"type":998,"value":1210},"Exclusive creation",{"type":993,"tag":1073,"props":1212,"children":1213},{},[1214],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1216,"children":1217},{},[1218],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1220,"children":1221},{},[1222],{"type":998,"value":1223},"✓*",{"type":993,"tag":1073,"props":1225,"children":1226},{},[1227],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1229,"children":1230},{},[1231],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1233,"children":1234},{},[1235],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1237,"children":1238},{},[1239,1247,1252,1256,1260,1264,1268,1272],{"type":993,"tag":1073,"props":1240,"children":1241},{},[1242],{"type":993,"tag":1077,"props":1243,"children":1244},{},[1245],{"type":998,"value":1246},"'r+'",{"type":993,"tag":1073,"props":1248,"children":1249},{},[1250],{"type":998,"value":1251},"Read and write",{"type":993,"tag":1073,"props":1253,"children":1254},{},[1255],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1257,"children":1258},{},[1259],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1261,"children":1262},{},[1263],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1265,"children":1266},{},[1267],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1269,"children":1270},{},[1271],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1273,"children":1274},{},[1275],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1277,"children":1278},{},[1279,1287,1291,1295,1299,1303,1307,1311],{"type":993,"tag":1073,"props":1280,"children":1281},{},[1282],{"type":993,"tag":1077,"props":1283,"children":1284},{},[1285],{"type":998,"value":1286},"'w+'",{"type":993,"tag":1073,"props":1288,"children":1289},{},[1290],{"type":998,"value":1251},{"type":993,"tag":1073,"props":1292,"children":1293},{},[1294],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1296,"children":1297},{},[1298],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1300,"children":1301},{},[1302],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1304,"children":1305},{},[1306],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1308,"children":1309},{},[1310],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1312,"children":1313},{},[1314],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1316,"children":1317},{},[1318,1326,1331,1335,1339,1343,1347,1352],{"type":993,"tag":1073,"props":1319,"children":1320},{},[1321],{"type":993,"tag":1077,"props":1322,"children":1323},{},[1324],{"type":998,"value":1325},"'a+'",{"type":993,"tag":1073,"props":1327,"children":1328},{},[1329],{"type":998,"value":1330},"Read and append",{"type":993,"tag":1073,"props":1332,"children":1333},{},[1334],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1336,"children":1337},{},[1338],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1340,"children":1341},{},[1342],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1344,"children":1345},{},[1346],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1348,"children":1349},{},[1350],{"type":998,"value":1351},"End/Start**",{"type":993,"tag":1073,"props":1353,"children":1354},{},[1355],{"type":998,"value":1096},{"type":993,"tag":1021,"props":1357,"children":1358},{},[1359,1367,1372,1376,1380,1384,1388,1392],{"type":993,"tag":1073,"props":1360,"children":1361},{},[1362],{"type":993,"tag":1077,"props":1363,"children":1364},{},[1365],{"type":998,"value":1366},"'rb'",{"type":993,"tag":1073,"props":1368,"children":1369},{},[1370],{"type":998,"value":1371},"Read binary",{"type":993,"tag":1073,"props":1373,"children":1374},{},[1375],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1377,"children":1378},{},[1379],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1381,"children":1382},{},[1383],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1385,"children":1386},{},[1387],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1389,"children":1390},{},[1391],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1393,"children":1394},{},[1395],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1397,"children":1398},{},[1399,1407,1412,1416,1420,1424,1428,1432],{"type":993,"tag":1073,"props":1400,"children":1401},{},[1402],{"type":993,"tag":1077,"props":1403,"children":1404},{},[1405],{"type":998,"value":1406},"'wb'",{"type":993,"tag":1073,"props":1408,"children":1409},{},[1410],{"type":998,"value":1411},"Write binary",{"type":993,"tag":1073,"props":1413,"children":1414},{},[1415],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1417,"children":1418},{},[1419],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1421,"children":1422},{},[1423],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1425,"children":1426},{},[1427],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1429,"children":1430},{},[1431],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1433,"children":1434},{},[1435],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1437,"children":1438},{},[1439,1447,1452,1456,1460,1464,1468,1472],{"type":993,"tag":1073,"props":1440,"children":1441},{},[1442],{"type":993,"tag":1077,"props":1443,"children":1444},{},[1445],{"type":998,"value":1446},"'ab'",{"type":993,"tag":1073,"props":1448,"children":1449},{},[1450],{"type":998,"value":1451},"Append binary",{"type":993,"tag":1073,"props":1453,"children":1454},{},[1455],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1457,"children":1458},{},[1459],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1461,"children":1462},{},[1463],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1465,"children":1466},{},[1467],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1469,"children":1470},{},[1471],{"type":998,"value":1190},{"type":993,"tag":1073,"props":1473,"children":1474},{},[1475],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1477,"children":1478},{},[1479,1487,1492,1496,1500,1504,1508,1512],{"type":993,"tag":1073,"props":1480,"children":1481},{},[1482],{"type":993,"tag":1077,"props":1483,"children":1484},{},[1485],{"type":998,"value":1486},"'xb'",{"type":993,"tag":1073,"props":1488,"children":1489},{},[1490],{"type":998,"value":1491},"Exclusive binary",{"type":993,"tag":1073,"props":1493,"children":1494},{},[1495],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1497,"children":1498},{},[1499],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1501,"children":1502},{},[1503],{"type":998,"value":1223},{"type":993,"tag":1073,"props":1505,"children":1506},{},[1507],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1509,"children":1510},{},[1511],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1513,"children":1514},{},[1515],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1517,"children":1518},{},[1519,1527,1532,1536,1540,1544,1548,1552],{"type":993,"tag":1073,"props":1520,"children":1521},{},[1522],{"type":993,"tag":1077,"props":1523,"children":1524},{},[1525],{"type":998,"value":1526},"'rb+'",{"type":993,"tag":1073,"props":1528,"children":1529},{},[1530],{"type":998,"value":1531},"Read/write binary",{"type":993,"tag":1073,"props":1533,"children":1534},{},[1535],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1537,"children":1538},{},[1539],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1541,"children":1542},{},[1543],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1545,"children":1546},{},[1547],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1549,"children":1550},{},[1551],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1553,"children":1554},{},[1555],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1557,"children":1558},{},[1559,1567,1571,1575,1579,1583,1587,1591],{"type":993,"tag":1073,"props":1560,"children":1561},{},[1562],{"type":993,"tag":1077,"props":1563,"children":1564},{},[1565],{"type":998,"value":1566},"'wb+'",{"type":993,"tag":1073,"props":1568,"children":1569},{},[1570],{"type":998,"value":1531},{"type":993,"tag":1073,"props":1572,"children":1573},{},[1574],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1576,"children":1577},{},[1578],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1580,"children":1581},{},[1582],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1584,"children":1585},{},[1586],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1588,"children":1589},{},[1590],{"type":998,"value":1109},{"type":993,"tag":1073,"props":1592,"children":1593},{},[1594],{"type":998,"value":1091},{"type":993,"tag":1021,"props":1596,"children":1597},{},[1598,1606,1611,1615,1619,1623,1627,1631],{"type":993,"tag":1073,"props":1599,"children":1600},{},[1601],{"type":993,"tag":1077,"props":1602,"children":1603},{},[1604],{"type":998,"value":1605},"'ab+'",{"type":993,"tag":1073,"props":1607,"children":1608},{},[1609],{"type":998,"value":1610},"Read/append binary",{"type":993,"tag":1073,"props":1612,"children":1613},{},[1614],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1616,"children":1617},{},[1618],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1620,"children":1621},{},[1622],{"type":998,"value":1091},{"type":993,"tag":1073,"props":1624,"children":1625},{},[1626],{"type":998,"value":1096},{"type":993,"tag":1073,"props":1628,"children":1629},{},[1630],{"type":998,"value":1351},{"type":993,"tag":1073,"props":1632,"children":1633},{},[1634],{"type":998,"value":1091},{"type":993,"tag":1000,"props":1636,"children":1637},{},[1638],{"type":998,"value":1639},"*Fails if file exists | **Reading starts at beginning, writing at end",{"type":993,"tag":1641,"props":1642,"children":1644},"h3",{"id":1643},"mode-examples",[1645],{"type":998,"value":1646},"Mode Examples",{"type":993,"tag":1648,"props":1649,"children":1650},"code-try",{},[1651],{"type":993,"tag":1652,"props":1653,"children":1656},"pre",{"className":1654,"code":1655,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic file reading\nwith open('data.txt', 'w') as f:\n    f.write(\"Hello World\\nSecond Line\")\n\nwith open('data.txt', 'r') as f:\n    content = f.read()\n    print(content)\n",[1657],{"type":993,"tag":1658,"props":1659,"children":1660},"code",{"__ignoreMap":8},[1661,1672,1723,1751,1759,1798,1816],{"type":993,"tag":1662,"props":1663,"children":1665},"span",{"class":1664,"line":12},"line",[1666],{"type":993,"tag":1662,"props":1667,"children":1669},{"style":1668},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1670],{"type":998,"value":1671},"# Basic file reading\n",{"type":993,"tag":1662,"props":1673,"children":1674},{"class":1664,"line":27},[1675,1681,1687,1693,1699,1704,1708,1713,1718],{"type":993,"tag":1662,"props":1676,"children":1678},{"style":1677},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1679],{"type":998,"value":1680},"with",{"type":993,"tag":1662,"props":1682,"children":1684},{"style":1683},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1685],{"type":998,"value":1686}," open",{"type":993,"tag":1662,"props":1688,"children":1690},{"style":1689},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1691],{"type":998,"value":1692},"(",{"type":993,"tag":1662,"props":1694,"children":1696},{"style":1695},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1697],{"type":998,"value":1698},"'data.txt'",{"type":993,"tag":1662,"props":1700,"children":1701},{"style":1689},[1702],{"type":998,"value":1703},", ",{"type":993,"tag":1662,"props":1705,"children":1706},{"style":1695},[1707],{"type":998,"value":1124},{"type":993,"tag":1662,"props":1709,"children":1710},{"style":1689},[1711],{"type":998,"value":1712},") ",{"type":993,"tag":1662,"props":1714,"children":1715},{"style":1677},[1716],{"type":998,"value":1717},"as",{"type":993,"tag":1662,"props":1719,"children":1720},{"style":1689},[1721],{"type":998,"value":1722}," f:\n",{"type":993,"tag":1662,"props":1724,"children":1725},{"class":1664,"line":36},[1726,1731,1736,1741,1746],{"type":993,"tag":1662,"props":1727,"children":1728},{"style":1689},[1729],{"type":998,"value":1730},"    f.write(",{"type":993,"tag":1662,"props":1732,"children":1733},{"style":1695},[1734],{"type":998,"value":1735},"\"Hello World",{"type":993,"tag":1662,"props":1737,"children":1738},{"style":1683},[1739],{"type":998,"value":1740},"\\n",{"type":993,"tag":1662,"props":1742,"children":1743},{"style":1695},[1744],{"type":998,"value":1745},"Second Line\"",{"type":993,"tag":1662,"props":1747,"children":1748},{"style":1689},[1749],{"type":998,"value":1750},")\n",{"type":993,"tag":1662,"props":1752,"children":1753},{"class":1664,"line":45},[1754],{"type":993,"tag":1662,"props":1755,"children":1756},{"emptyLinePlaceholder":13},[1757],{"type":998,"value":1758},"\n",{"type":993,"tag":1662,"props":1760,"children":1761},{"class":1664,"line":54},[1762,1766,1770,1774,1778,1782,1786,1790,1794],{"type":993,"tag":1662,"props":1763,"children":1764},{"style":1677},[1765],{"type":998,"value":1680},{"type":993,"tag":1662,"props":1767,"children":1768},{"style":1683},[1769],{"type":998,"value":1686},{"type":993,"tag":1662,"props":1771,"children":1772},{"style":1689},[1773],{"type":998,"value":1692},{"type":993,"tag":1662,"props":1775,"children":1776},{"style":1695},[1777],{"type":998,"value":1698},{"type":993,"tag":1662,"props":1779,"children":1780},{"style":1689},[1781],{"type":998,"value":1703},{"type":993,"tag":1662,"props":1783,"children":1784},{"style":1695},[1785],{"type":998,"value":1081},{"type":993,"tag":1662,"props":1787,"children":1788},{"style":1689},[1789],{"type":998,"value":1712},{"type":993,"tag":1662,"props":1791,"children":1792},{"style":1677},[1793],{"type":998,"value":1717},{"type":993,"tag":1662,"props":1795,"children":1796},{"style":1689},[1797],{"type":998,"value":1722},{"type":993,"tag":1662,"props":1799,"children":1800},{"class":1664,"line":63},[1801,1806,1811],{"type":993,"tag":1662,"props":1802,"children":1803},{"style":1689},[1804],{"type":998,"value":1805},"    content ",{"type":993,"tag":1662,"props":1807,"children":1808},{"style":1677},[1809],{"type":998,"value":1810},"=",{"type":993,"tag":1662,"props":1812,"children":1813},{"style":1689},[1814],{"type":998,"value":1815}," f.read()\n",{"type":993,"tag":1662,"props":1817,"children":1818},{"class":1664,"line":72},[1819,1824],{"type":993,"tag":1662,"props":1820,"children":1821},{"style":1683},[1822],{"type":998,"value":1823},"    print",{"type":993,"tag":1662,"props":1825,"children":1826},{"style":1689},[1827],{"type":998,"value":1828},"(content)\n",{"type":993,"tag":1652,"props":1830,"children":1832},{"className":1654,"code":1831,"language":6,"meta":8,"style":8},"# Basic file modes\nwith open('data.txt', 'r') as f:         # Read text file\n    content = f.read()\n\nwith open('data.txt', 'w') as f:         # Write text file (overwrites)\n    f.write(\"Hello World\")\n\nwith open('data.txt', 'a') as f:         # Append to text file\n    f.write(\"New line\")\n\n# Binary modes\nwith open('image.jpg', 'rb') as f:       # Read binary file\n    data = f.read()\n\nwith open('output.jpg', 'wb') as f:      # Write binary file\n    f.write(data)\n\n# Read and write modes\nwith open('data.txt', 'r+') as f:        # Read and write existing file\n    content = f.read()\n    f.write(\"Additional text\")\n\n# Exclusive creation\ntry:\n    with open('new_file.txt', 'x') as f: # Create new file (fails if exists)\n        f.write(\"New file content\")\nexcept FileExistsError:\n    print(\"File already exists\")\n",[1833],{"type":993,"tag":1658,"props":1834,"children":1835},{"__ignoreMap":8},[1836,1844,1889,1904,1911,1955,1971,1978,2022,2038,2045,2053,2099,2115,2122,2168,2176,2183,2191,2236,2251,2267,2274,2282,2295,2342,2359,2376],{"type":993,"tag":1662,"props":1837,"children":1838},{"class":1664,"line":12},[1839],{"type":993,"tag":1662,"props":1840,"children":1841},{"style":1668},[1842],{"type":998,"value":1843},"# Basic file modes\n",{"type":993,"tag":1662,"props":1845,"children":1846},{"class":1664,"line":27},[1847,1851,1855,1859,1863,1867,1871,1875,1879,1884],{"type":993,"tag":1662,"props":1848,"children":1849},{"style":1677},[1850],{"type":998,"value":1680},{"type":993,"tag":1662,"props":1852,"children":1853},{"style":1683},[1854],{"type":998,"value":1686},{"type":993,"tag":1662,"props":1856,"children":1857},{"style":1689},[1858],{"type":998,"value":1692},{"type":993,"tag":1662,"props":1860,"children":1861},{"style":1695},[1862],{"type":998,"value":1698},{"type":993,"tag":1662,"props":1864,"children":1865},{"style":1689},[1866],{"type":998,"value":1703},{"type":993,"tag":1662,"props":1868,"children":1869},{"style":1695},[1870],{"type":998,"value":1081},{"type":993,"tag":1662,"props":1872,"children":1873},{"style":1689},[1874],{"type":998,"value":1712},{"type":993,"tag":1662,"props":1876,"children":1877},{"style":1677},[1878],{"type":998,"value":1717},{"type":993,"tag":1662,"props":1880,"children":1881},{"style":1689},[1882],{"type":998,"value":1883}," f:         ",{"type":993,"tag":1662,"props":1885,"children":1886},{"style":1668},[1887],{"type":998,"value":1888},"# Read text file\n",{"type":993,"tag":1662,"props":1890,"children":1891},{"class":1664,"line":36},[1892,1896,1900],{"type":993,"tag":1662,"props":1893,"children":1894},{"style":1689},[1895],{"type":998,"value":1805},{"type":993,"tag":1662,"props":1897,"children":1898},{"style":1677},[1899],{"type":998,"value":1810},{"type":993,"tag":1662,"props":1901,"children":1902},{"style":1689},[1903],{"type":998,"value":1815},{"type":993,"tag":1662,"props":1905,"children":1906},{"class":1664,"line":45},[1907],{"type":993,"tag":1662,"props":1908,"children":1909},{"emptyLinePlaceholder":13},[1910],{"type":998,"value":1758},{"type":993,"tag":1662,"props":1912,"children":1913},{"class":1664,"line":54},[1914,1918,1922,1926,1930,1934,1938,1942,1946,1950],{"type":993,"tag":1662,"props":1915,"children":1916},{"style":1677},[1917],{"type":998,"value":1680},{"type":993,"tag":1662,"props":1919,"children":1920},{"style":1683},[1921],{"type":998,"value":1686},{"type":993,"tag":1662,"props":1923,"children":1924},{"style":1689},[1925],{"type":998,"value":1692},{"type":993,"tag":1662,"props":1927,"children":1928},{"style":1695},[1929],{"type":998,"value":1698},{"type":993,"tag":1662,"props":1931,"children":1932},{"style":1689},[1933],{"type":998,"value":1703},{"type":993,"tag":1662,"props":1935,"children":1936},{"style":1695},[1937],{"type":998,"value":1124},{"type":993,"tag":1662,"props":1939,"children":1940},{"style":1689},[1941],{"type":998,"value":1712},{"type":993,"tag":1662,"props":1943,"children":1944},{"style":1677},[1945],{"type":998,"value":1717},{"type":993,"tag":1662,"props":1947,"children":1948},{"style":1689},[1949],{"type":998,"value":1883},{"type":993,"tag":1662,"props":1951,"children":1952},{"style":1668},[1953],{"type":998,"value":1954},"# Write text file (overwrites)\n",{"type":993,"tag":1662,"props":1956,"children":1957},{"class":1664,"line":63},[1958,1962,1967],{"type":993,"tag":1662,"props":1959,"children":1960},{"style":1689},[1961],{"type":998,"value":1730},{"type":993,"tag":1662,"props":1963,"children":1964},{"style":1695},[1965],{"type":998,"value":1966},"\"Hello World\"",{"type":993,"tag":1662,"props":1968,"children":1969},{"style":1689},[1970],{"type":998,"value":1750},{"type":993,"tag":1662,"props":1972,"children":1973},{"class":1664,"line":72},[1974],{"type":993,"tag":1662,"props":1975,"children":1976},{"emptyLinePlaceholder":13},[1977],{"type":998,"value":1758},{"type":993,"tag":1662,"props":1979,"children":1980},{"class":1664,"line":81},[1981,1985,1989,1993,1997,2001,2005,2009,2013,2017],{"type":993,"tag":1662,"props":1982,"children":1983},{"style":1677},[1984],{"type":998,"value":1680},{"type":993,"tag":1662,"props":1986,"children":1987},{"style":1683},[1988],{"type":998,"value":1686},{"type":993,"tag":1662,"props":1990,"children":1991},{"style":1689},[1992],{"type":998,"value":1692},{"type":993,"tag":1662,"props":1994,"children":1995},{"style":1695},[1996],{"type":998,"value":1698},{"type":993,"tag":1662,"props":1998,"children":1999},{"style":1689},[2000],{"type":998,"value":1703},{"type":993,"tag":1662,"props":2002,"children":2003},{"style":1695},[2004],{"type":998,"value":1164},{"type":993,"tag":1662,"props":2006,"children":2007},{"style":1689},[2008],{"type":998,"value":1712},{"type":993,"tag":1662,"props":2010,"children":2011},{"style":1677},[2012],{"type":998,"value":1717},{"type":993,"tag":1662,"props":2014,"children":2015},{"style":1689},[2016],{"type":998,"value":1883},{"type":993,"tag":1662,"props":2018,"children":2019},{"style":1668},[2020],{"type":998,"value":2021},"# Append to text file\n",{"type":993,"tag":1662,"props":2023,"children":2024},{"class":1664,"line":91},[2025,2029,2034],{"type":993,"tag":1662,"props":2026,"children":2027},{"style":1689},[2028],{"type":998,"value":1730},{"type":993,"tag":1662,"props":2030,"children":2031},{"style":1695},[2032],{"type":998,"value":2033},"\"New line\"",{"type":993,"tag":1662,"props":2035,"children":2036},{"style":1689},[2037],{"type":998,"value":1750},{"type":993,"tag":1662,"props":2039,"children":2040},{"class":1664,"line":100},[2041],{"type":993,"tag":1662,"props":2042,"children":2043},{"emptyLinePlaceholder":13},[2044],{"type":998,"value":1758},{"type":993,"tag":1662,"props":2046,"children":2047},{"class":1664,"line":109},[2048],{"type":993,"tag":1662,"props":2049,"children":2050},{"style":1668},[2051],{"type":998,"value":2052},"# Binary modes\n",{"type":993,"tag":1662,"props":2054,"children":2055},{"class":1664,"line":118},[2056,2060,2064,2068,2073,2077,2081,2085,2089,2094],{"type":993,"tag":1662,"props":2057,"children":2058},{"style":1677},[2059],{"type":998,"value":1680},{"type":993,"tag":1662,"props":2061,"children":2062},{"style":1683},[2063],{"type":998,"value":1686},{"type":993,"tag":1662,"props":2065,"children":2066},{"style":1689},[2067],{"type":998,"value":1692},{"type":993,"tag":1662,"props":2069,"children":2070},{"style":1695},[2071],{"type":998,"value":2072},"'image.jpg'",{"type":993,"tag":1662,"props":2074,"children":2075},{"style":1689},[2076],{"type":998,"value":1703},{"type":993,"tag":1662,"props":2078,"children":2079},{"style":1695},[2080],{"type":998,"value":1366},{"type":993,"tag":1662,"props":2082,"children":2083},{"style":1689},[2084],{"type":998,"value":1712},{"type":993,"tag":1662,"props":2086,"children":2087},{"style":1677},[2088],{"type":998,"value":1717},{"type":993,"tag":1662,"props":2090,"children":2091},{"style":1689},[2092],{"type":998,"value":2093}," f:       ",{"type":993,"tag":1662,"props":2095,"children":2096},{"style":1668},[2097],{"type":998,"value":2098},"# Read binary file\n",{"type":993,"tag":1662,"props":2100,"children":2101},{"class":1664,"line":127},[2102,2107,2111],{"type":993,"tag":1662,"props":2103,"children":2104},{"style":1689},[2105],{"type":998,"value":2106},"    data ",{"type":993,"tag":1662,"props":2108,"children":2109},{"style":1677},[2110],{"type":998,"value":1810},{"type":993,"tag":1662,"props":2112,"children":2113},{"style":1689},[2114],{"type":998,"value":1815},{"type":993,"tag":1662,"props":2116,"children":2117},{"class":1664,"line":136},[2118],{"type":993,"tag":1662,"props":2119,"children":2120},{"emptyLinePlaceholder":13},[2121],{"type":998,"value":1758},{"type":993,"tag":1662,"props":2123,"children":2124},{"class":1664,"line":146},[2125,2129,2133,2137,2142,2146,2150,2154,2158,2163],{"type":993,"tag":1662,"props":2126,"children":2127},{"style":1677},[2128],{"type":998,"value":1680},{"type":993,"tag":1662,"props":2130,"children":2131},{"style":1683},[2132],{"type":998,"value":1686},{"type":993,"tag":1662,"props":2134,"children":2135},{"style":1689},[2136],{"type":998,"value":1692},{"type":993,"tag":1662,"props":2138,"children":2139},{"style":1695},[2140],{"type":998,"value":2141},"'output.jpg'",{"type":993,"tag":1662,"props":2143,"children":2144},{"style":1689},[2145],{"type":998,"value":1703},{"type":993,"tag":1662,"props":2147,"children":2148},{"style":1695},[2149],{"type":998,"value":1406},{"type":993,"tag":1662,"props":2151,"children":2152},{"style":1689},[2153],{"type":998,"value":1712},{"type":993,"tag":1662,"props":2155,"children":2156},{"style":1677},[2157],{"type":998,"value":1717},{"type":993,"tag":1662,"props":2159,"children":2160},{"style":1689},[2161],{"type":998,"value":2162}," f:      ",{"type":993,"tag":1662,"props":2164,"children":2165},{"style":1668},[2166],{"type":998,"value":2167},"# Write binary file\n",{"type":993,"tag":1662,"props":2169,"children":2170},{"class":1664,"line":155},[2171],{"type":993,"tag":1662,"props":2172,"children":2173},{"style":1689},[2174],{"type":998,"value":2175},"    f.write(data)\n",{"type":993,"tag":1662,"props":2177,"children":2178},{"class":1664,"line":164},[2179],{"type":993,"tag":1662,"props":2180,"children":2181},{"emptyLinePlaceholder":13},[2182],{"type":998,"value":1758},{"type":993,"tag":1662,"props":2184,"children":2185},{"class":1664,"line":173},[2186],{"type":993,"tag":1662,"props":2187,"children":2188},{"style":1668},[2189],{"type":998,"value":2190},"# Read and write modes\n",{"type":993,"tag":1662,"props":2192,"children":2193},{"class":1664,"line":182},[2194,2198,2202,2206,2210,2214,2218,2222,2226,2231],{"type":993,"tag":1662,"props":2195,"children":2196},{"style":1677},[2197],{"type":998,"value":1680},{"type":993,"tag":1662,"props":2199,"children":2200},{"style":1683},[2201],{"type":998,"value":1686},{"type":993,"tag":1662,"props":2203,"children":2204},{"style":1689},[2205],{"type":998,"value":1692},{"type":993,"tag":1662,"props":2207,"children":2208},{"style":1695},[2209],{"type":998,"value":1698},{"type":993,"tag":1662,"props":2211,"children":2212},{"style":1689},[2213],{"type":998,"value":1703},{"type":993,"tag":1662,"props":2215,"children":2216},{"style":1695},[2217],{"type":998,"value":1246},{"type":993,"tag":1662,"props":2219,"children":2220},{"style":1689},[2221],{"type":998,"value":1712},{"type":993,"tag":1662,"props":2223,"children":2224},{"style":1677},[2225],{"type":998,"value":1717},{"type":993,"tag":1662,"props":2227,"children":2228},{"style":1689},[2229],{"type":998,"value":2230}," f:        ",{"type":993,"tag":1662,"props":2232,"children":2233},{"style":1668},[2234],{"type":998,"value":2235},"# Read and write existing file\n",{"type":993,"tag":1662,"props":2237,"children":2238},{"class":1664,"line":191},[2239,2243,2247],{"type":993,"tag":1662,"props":2240,"children":2241},{"style":1689},[2242],{"type":998,"value":1805},{"type":993,"tag":1662,"props":2244,"children":2245},{"style":1677},[2246],{"type":998,"value":1810},{"type":993,"tag":1662,"props":2248,"children":2249},{"style":1689},[2250],{"type":998,"value":1815},{"type":993,"tag":1662,"props":2252,"children":2253},{"class":1664,"line":201},[2254,2258,2263],{"type":993,"tag":1662,"props":2255,"children":2256},{"style":1689},[2257],{"type":998,"value":1730},{"type":993,"tag":1662,"props":2259,"children":2260},{"style":1695},[2261],{"type":998,"value":2262},"\"Additional text\"",{"type":993,"tag":1662,"props":2264,"children":2265},{"style":1689},[2266],{"type":998,"value":1750},{"type":993,"tag":1662,"props":2268,"children":2269},{"class":1664,"line":210},[2270],{"type":993,"tag":1662,"props":2271,"children":2272},{"emptyLinePlaceholder":13},[2273],{"type":998,"value":1758},{"type":993,"tag":1662,"props":2275,"children":2276},{"class":1664,"line":219},[2277],{"type":993,"tag":1662,"props":2278,"children":2279},{"style":1668},[2280],{"type":998,"value":2281},"# Exclusive creation\n",{"type":993,"tag":1662,"props":2283,"children":2284},{"class":1664,"line":228},[2285,2290],{"type":993,"tag":1662,"props":2286,"children":2287},{"style":1677},[2288],{"type":998,"value":2289},"try",{"type":993,"tag":1662,"props":2291,"children":2292},{"style":1689},[2293],{"type":998,"value":2294},":\n",{"type":993,"tag":1662,"props":2296,"children":2297},{"class":1664,"line":238},[2298,2303,2307,2311,2316,2320,2324,2328,2332,2337],{"type":993,"tag":1662,"props":2299,"children":2300},{"style":1677},[2301],{"type":998,"value":2302},"    with",{"type":993,"tag":1662,"props":2304,"children":2305},{"style":1683},[2306],{"type":998,"value":1686},{"type":993,"tag":1662,"props":2308,"children":2309},{"style":1689},[2310],{"type":998,"value":1692},{"type":993,"tag":1662,"props":2312,"children":2313},{"style":1695},[2314],{"type":998,"value":2315},"'new_file.txt'",{"type":993,"tag":1662,"props":2317,"children":2318},{"style":1689},[2319],{"type":998,"value":1703},{"type":993,"tag":1662,"props":2321,"children":2322},{"style":1695},[2323],{"type":998,"value":1205},{"type":993,"tag":1662,"props":2325,"children":2326},{"style":1689},[2327],{"type":998,"value":1712},{"type":993,"tag":1662,"props":2329,"children":2330},{"style":1677},[2331],{"type":998,"value":1717},{"type":993,"tag":1662,"props":2333,"children":2334},{"style":1689},[2335],{"type":998,"value":2336}," f: ",{"type":993,"tag":1662,"props":2338,"children":2339},{"style":1668},[2340],{"type":998,"value":2341},"# Create new file (fails if exists)\n",{"type":993,"tag":1662,"props":2343,"children":2344},{"class":1664,"line":247},[2345,2350,2355],{"type":993,"tag":1662,"props":2346,"children":2347},{"style":1689},[2348],{"type":998,"value":2349},"        f.write(",{"type":993,"tag":1662,"props":2351,"children":2352},{"style":1695},[2353],{"type":998,"value":2354},"\"New file content\"",{"type":993,"tag":1662,"props":2356,"children":2357},{"style":1689},[2358],{"type":998,"value":1750},{"type":993,"tag":1662,"props":2360,"children":2361},{"class":1664,"line":256},[2362,2367,2372],{"type":993,"tag":1662,"props":2363,"children":2364},{"style":1677},[2365],{"type":998,"value":2366},"except",{"type":993,"tag":1662,"props":2368,"children":2369},{"style":1683},[2370],{"type":998,"value":2371}," FileExistsError",{"type":993,"tag":1662,"props":2373,"children":2374},{"style":1689},[2375],{"type":998,"value":2294},{"type":993,"tag":1662,"props":2377,"children":2378},{"class":1664,"line":265},[2379,2383,2387,2392],{"type":993,"tag":1662,"props":2380,"children":2381},{"style":1683},[2382],{"type":998,"value":1823},{"type":993,"tag":1662,"props":2384,"children":2385},{"style":1689},[2386],{"type":998,"value":1692},{"type":993,"tag":1662,"props":2388,"children":2389},{"style":1695},[2390],{"type":998,"value":2391},"\"File already exists\"",{"type":993,"tag":1662,"props":2393,"children":2394},{"style":1689},[2395],{"type":998,"value":1750},{"type":993,"tag":1006,"props":2397,"children":2399},{"id":2398},"file-object-methods",[2400],{"type":998,"value":2401},"File Object Methods",{"type":993,"tag":1641,"props":2403,"children":2405},{"id":2404},"reading-methods",[2406],{"type":998,"value":2407},"Reading Methods",{"type":993,"tag":1013,"props":2409,"children":2410},{},[2411,2441],{"type":993,"tag":1017,"props":2412,"children":2413},{},[2414],{"type":993,"tag":1021,"props":2415,"children":2416},{},[2417,2422,2427,2432,2437],{"type":993,"tag":1025,"props":2418,"children":2419},{},[2420],{"type":998,"value":2421},"Method",{"type":993,"tag":1025,"props":2423,"children":2424},{},[2425],{"type":998,"value":2426},"Purpose",{"type":993,"tag":1025,"props":2428,"children":2429},{},[2430],{"type":998,"value":2431},"Example",{"type":993,"tag":1025,"props":2433,"children":2434},{},[2435],{"type":998,"value":2436},"Return Type",{"type":993,"tag":1025,"props":2438,"children":2439},{},[2440],{"type":998,"value":1034},{"type":993,"tag":1066,"props":2442,"children":2443},{},[2444,2479,2513,2547],{"type":993,"tag":1021,"props":2445,"children":2446},{},[2447,2455,2460,2469,2474],{"type":993,"tag":1073,"props":2448,"children":2449},{},[2450],{"type":993,"tag":1077,"props":2451,"children":2452},{},[2453],{"type":998,"value":2454},"read()",{"type":993,"tag":1073,"props":2456,"children":2457},{},[2458],{"type":998,"value":2459},"Read entire file",{"type":993,"tag":1073,"props":2461,"children":2462},{},[2463],{"type":993,"tag":1658,"props":2464,"children":2466},{"className":2465},[],[2467],{"type":998,"value":2468},"f.read()",{"type":993,"tag":1073,"props":2470,"children":2471},{},[2472],{"type":998,"value":2473},"str/bytes",{"type":993,"tag":1073,"props":2475,"children":2476},{},[2477],{"type":998,"value":2478},"Read all remaining content",{"type":993,"tag":1021,"props":2480,"children":2481},{},[2482,2490,2495,2504,2508],{"type":993,"tag":1073,"props":2483,"children":2484},{},[2485],{"type":993,"tag":1077,"props":2486,"children":2487},{},[2488],{"type":998,"value":2489},"read(size)",{"type":993,"tag":1073,"props":2491,"children":2492},{},[2493],{"type":998,"value":2494},"Read specific bytes",{"type":993,"tag":1073,"props":2496,"children":2497},{},[2498],{"type":993,"tag":1658,"props":2499,"children":2501},{"className":2500},[],[2502],{"type":998,"value":2503},"f.read(100)",{"type":993,"tag":1073,"props":2505,"children":2506},{},[2507],{"type":998,"value":2473},{"type":993,"tag":1073,"props":2509,"children":2510},{},[2511],{"type":998,"value":2512},"Read up to size characters",{"type":993,"tag":1021,"props":2514,"children":2515},{},[2516,2524,2529,2538,2542],{"type":993,"tag":1073,"props":2517,"children":2518},{},[2519],{"type":993,"tag":1077,"props":2520,"children":2521},{},[2522],{"type":998,"value":2523},"readline()",{"type":993,"tag":1073,"props":2525,"children":2526},{},[2527],{"type":998,"value":2528},"Read single line",{"type":993,"tag":1073,"props":2530,"children":2531},{},[2532],{"type":993,"tag":1658,"props":2533,"children":2535},{"className":2534},[],[2536],{"type":998,"value":2537},"f.readline()",{"type":993,"tag":1073,"props":2539,"children":2540},{},[2541],{"type":998,"value":2473},{"type":993,"tag":1073,"props":2543,"children":2544},{},[2545],{"type":998,"value":2546},"Read next line including newline",{"type":993,"tag":1021,"props":2548,"children":2549},{},[2550,2558,2563,2572,2577],{"type":993,"tag":1073,"props":2551,"children":2552},{},[2553],{"type":993,"tag":1077,"props":2554,"children":2555},{},[2556],{"type":998,"value":2557},"readlines()",{"type":993,"tag":1073,"props":2559,"children":2560},{},[2561],{"type":998,"value":2562},"Read all lines",{"type":993,"tag":1073,"props":2564,"children":2565},{},[2566],{"type":993,"tag":1658,"props":2567,"children":2569},{"className":2568},[],[2570],{"type":998,"value":2571},"f.readlines()",{"type":993,"tag":1073,"props":2573,"children":2574},{},[2575],{"type":998,"value":2576},"list",{"type":993,"tag":1073,"props":2578,"children":2579},{},[2580],{"type":998,"value":2581},"Read all lines into list",{"type":993,"tag":1641,"props":2583,"children":2585},{"id":2584},"writing-methods",[2586],{"type":998,"value":2587},"Writing Methods",{"type":993,"tag":1013,"props":2589,"children":2590},{},[2591,2617],{"type":993,"tag":1017,"props":2592,"children":2593},{},[2594],{"type":993,"tag":1021,"props":2595,"children":2596},{},[2597,2601,2605,2609,2613],{"type":993,"tag":1025,"props":2598,"children":2599},{},[2600],{"type":998,"value":2421},{"type":993,"tag":1025,"props":2602,"children":2603},{},[2604],{"type":998,"value":2426},{"type":993,"tag":1025,"props":2606,"children":2607},{},[2608],{"type":998,"value":2431},{"type":993,"tag":1025,"props":2610,"children":2611},{},[2612],{"type":998,"value":2436},{"type":993,"tag":1025,"props":2614,"children":2615},{},[2616],{"type":998,"value":1034},{"type":993,"tag":1066,"props":2618,"children":2619},{},[2620,2655,2690],{"type":993,"tag":1021,"props":2621,"children":2622},{},[2623,2631,2636,2645,2650],{"type":993,"tag":1073,"props":2624,"children":2625},{},[2626],{"type":993,"tag":1077,"props":2627,"children":2628},{},[2629],{"type":998,"value":2630},"write()",{"type":993,"tag":1073,"props":2632,"children":2633},{},[2634],{"type":998,"value":2635},"Write string/bytes",{"type":993,"tag":1073,"props":2637,"children":2638},{},[2639],{"type":993,"tag":1658,"props":2640,"children":2642},{"className":2641},[],[2643],{"type":998,"value":2644},"f.write(\"text\")",{"type":993,"tag":1073,"props":2646,"children":2647},{},[2648],{"type":998,"value":2649},"int",{"type":993,"tag":1073,"props":2651,"children":2652},{},[2653],{"type":998,"value":2654},"Write content, return characters written",{"type":993,"tag":1021,"props":2656,"children":2657},{},[2658,2666,2671,2680,2685],{"type":993,"tag":1073,"props":2659,"children":2660},{},[2661],{"type":993,"tag":1077,"props":2662,"children":2663},{},[2664],{"type":998,"value":2665},"writelines()",{"type":993,"tag":1073,"props":2667,"children":2668},{},[2669],{"type":998,"value":2670},"Write list of lines",{"type":993,"tag":1073,"props":2672,"children":2673},{},[2674],{"type":993,"tag":1658,"props":2675,"children":2677},{"className":2676},[],[2678],{"type":998,"value":2679},"f.writelines(lines)",{"type":993,"tag":1073,"props":2681,"children":2682},{},[2683],{"type":998,"value":2684},"None",{"type":993,"tag":1073,"props":2686,"children":2687},{},[2688],{"type":998,"value":2689},"Write sequence of strings",{"type":993,"tag":1021,"props":2691,"children":2692},{},[2693,2701,2706,2715,2719],{"type":993,"tag":1073,"props":2694,"children":2695},{},[2696],{"type":993,"tag":1077,"props":2697,"children":2698},{},[2699],{"type":998,"value":2700},"flush()",{"type":993,"tag":1073,"props":2702,"children":2703},{},[2704],{"type":998,"value":2705},"Force write to disk",{"type":993,"tag":1073,"props":2707,"children":2708},{},[2709],{"type":993,"tag":1658,"props":2710,"children":2712},{"className":2711},[],[2713],{"type":998,"value":2714},"f.flush()",{"type":993,"tag":1073,"props":2716,"children":2717},{},[2718],{"type":998,"value":2684},{"type":993,"tag":1073,"props":2720,"children":2721},{},[2722],{"type":998,"value":2723},"Flush internal buffer to disk",{"type":993,"tag":1641,"props":2725,"children":2727},{"id":2726},"position-methods",[2728],{"type":998,"value":2729},"Position Methods",{"type":993,"tag":1013,"props":2731,"children":2732},{},[2733,2759],{"type":993,"tag":1017,"props":2734,"children":2735},{},[2736],{"type":993,"tag":1021,"props":2737,"children":2738},{},[2739,2743,2747,2751,2755],{"type":993,"tag":1025,"props":2740,"children":2741},{},[2742],{"type":998,"value":2421},{"type":993,"tag":1025,"props":2744,"children":2745},{},[2746],{"type":998,"value":2426},{"type":993,"tag":1025,"props":2748,"children":2749},{},[2750],{"type":998,"value":2431},{"type":993,"tag":1025,"props":2752,"children":2753},{},[2754],{"type":998,"value":2436},{"type":993,"tag":1025,"props":2756,"children":2757},{},[2758],{"type":998,"value":1034},{"type":993,"tag":1066,"props":2760,"children":2761},{},[2762,2796,2830],{"type":993,"tag":1021,"props":2763,"children":2764},{},[2765,2773,2778,2787,2791],{"type":993,"tag":1073,"props":2766,"children":2767},{},[2768],{"type":993,"tag":1077,"props":2769,"children":2770},{},[2771],{"type":998,"value":2772},"tell()",{"type":993,"tag":1073,"props":2774,"children":2775},{},[2776],{"type":998,"value":2777},"Get current position",{"type":993,"tag":1073,"props":2779,"children":2780},{},[2781],{"type":993,"tag":1658,"props":2782,"children":2784},{"className":2783},[],[2785],{"type":998,"value":2786},"f.tell()",{"type":993,"tag":1073,"props":2788,"children":2789},{},[2790],{"type":998,"value":2649},{"type":993,"tag":1073,"props":2792,"children":2793},{},[2794],{"type":998,"value":2795},"Return current file position",{"type":993,"tag":1021,"props":2797,"children":2798},{},[2799,2807,2812,2821,2825],{"type":993,"tag":1073,"props":2800,"children":2801},{},[2802],{"type":993,"tag":1077,"props":2803,"children":2804},{},[2805],{"type":998,"value":2806},"seek()",{"type":993,"tag":1073,"props":2808,"children":2809},{},[2810],{"type":998,"value":2811},"Change position",{"type":993,"tag":1073,"props":2813,"children":2814},{},[2815],{"type":993,"tag":1658,"props":2816,"children":2818},{"className":2817},[],[2819],{"type":998,"value":2820},"f.seek(0)",{"type":993,"tag":1073,"props":2822,"children":2823},{},[2824],{"type":998,"value":2649},{"type":993,"tag":1073,"props":2826,"children":2827},{},[2828],{"type":998,"value":2829},"Move to specific position",{"type":993,"tag":1021,"props":2831,"children":2832},{},[2833,2841,2846,2855,2859],{"type":993,"tag":1073,"props":2834,"children":2835},{},[2836],{"type":993,"tag":1077,"props":2837,"children":2838},{},[2839],{"type":998,"value":2840},"seek(offset, whence)",{"type":993,"tag":1073,"props":2842,"children":2843},{},[2844],{"type":998,"value":2845},"Relative seek",{"type":993,"tag":1073,"props":2847,"children":2848},{},[2849],{"type":993,"tag":1658,"props":2850,"children":2852},{"className":2851},[],[2853],{"type":998,"value":2854},"f.seek(10, 1)",{"type":993,"tag":1073,"props":2856,"children":2857},{},[2858],{"type":998,"value":2649},{"type":993,"tag":1073,"props":2860,"children":2861},{},[2862],{"type":998,"value":2863},"Move relative to whence (0=start, 1=current, 2=end)",{"type":993,"tag":1641,"props":2865,"children":2867},{"id":2866},"file-state-methods",[2868],{"type":998,"value":2869},"File State Methods",{"type":993,"tag":1013,"props":2871,"children":2872},{},[2873,2899],{"type":993,"tag":1017,"props":2874,"children":2875},{},[2876],{"type":993,"tag":1021,"props":2877,"children":2878},{},[2879,2883,2887,2891,2895],{"type":993,"tag":1025,"props":2880,"children":2881},{},[2882],{"type":998,"value":2421},{"type":993,"tag":1025,"props":2884,"children":2885},{},[2886],{"type":998,"value":2426},{"type":993,"tag":1025,"props":2888,"children":2889},{},[2890],{"type":998,"value":2431},{"type":993,"tag":1025,"props":2892,"children":2893},{},[2894],{"type":998,"value":2436},{"type":993,"tag":1025,"props":2896,"children":2897},{},[2898],{"type":998,"value":1034},{"type":993,"tag":1066,"props":2900,"children":2901},{},[2902,2936,2971,3005,3039],{"type":993,"tag":1021,"props":2903,"children":2904},{},[2905,2913,2918,2927,2931],{"type":993,"tag":1073,"props":2906,"children":2907},{},[2908],{"type":993,"tag":1077,"props":2909,"children":2910},{},[2911],{"type":998,"value":2912},"close()",{"type":993,"tag":1073,"props":2914,"children":2915},{},[2916],{"type":998,"value":2917},"Close file",{"type":993,"tag":1073,"props":2919,"children":2920},{},[2921],{"type":993,"tag":1658,"props":2922,"children":2924},{"className":2923},[],[2925],{"type":998,"value":2926},"f.close()",{"type":993,"tag":1073,"props":2928,"children":2929},{},[2930],{"type":998,"value":2684},{"type":993,"tag":1073,"props":2932,"children":2933},{},[2934],{"type":998,"value":2935},"Close file and free resources",{"type":993,"tag":1021,"props":2937,"children":2938},{},[2939,2947,2952,2961,2966],{"type":993,"tag":1073,"props":2940,"children":2941},{},[2942],{"type":993,"tag":1077,"props":2943,"children":2944},{},[2945],{"type":998,"value":2946},"closed",{"type":993,"tag":1073,"props":2948,"children":2949},{},[2950],{"type":998,"value":2951},"Check if closed",{"type":993,"tag":1073,"props":2953,"children":2954},{},[2955],{"type":993,"tag":1658,"props":2956,"children":2958},{"className":2957},[],[2959],{"type":998,"value":2960},"f.closed",{"type":993,"tag":1073,"props":2962,"children":2963},{},[2964],{"type":998,"value":2965},"bool",{"type":993,"tag":1073,"props":2967,"children":2968},{},[2969],{"type":998,"value":2970},"True if file is closed",{"type":993,"tag":1021,"props":2972,"children":2973},{},[2974,2982,2987,2996,3000],{"type":993,"tag":1073,"props":2975,"children":2976},{},[2977],{"type":993,"tag":1077,"props":2978,"children":2979},{},[2980],{"type":998,"value":2981},"readable()",{"type":993,"tag":1073,"props":2983,"children":2984},{},[2985],{"type":998,"value":2986},"Check if readable",{"type":993,"tag":1073,"props":2988,"children":2989},{},[2990],{"type":993,"tag":1658,"props":2991,"children":2993},{"className":2992},[],[2994],{"type":998,"value":2995},"f.readable()",{"type":993,"tag":1073,"props":2997,"children":2998},{},[2999],{"type":998,"value":2965},{"type":993,"tag":1073,"props":3001,"children":3002},{},[3003],{"type":998,"value":3004},"True if file supports reading",{"type":993,"tag":1021,"props":3006,"children":3007},{},[3008,3016,3021,3030,3034],{"type":993,"tag":1073,"props":3009,"children":3010},{},[3011],{"type":993,"tag":1077,"props":3012,"children":3013},{},[3014],{"type":998,"value":3015},"writable()",{"type":993,"tag":1073,"props":3017,"children":3018},{},[3019],{"type":998,"value":3020},"Check if writable",{"type":993,"tag":1073,"props":3022,"children":3023},{},[3024],{"type":993,"tag":1658,"props":3025,"children":3027},{"className":3026},[],[3028],{"type":998,"value":3029},"f.writable()",{"type":993,"tag":1073,"props":3031,"children":3032},{},[3033],{"type":998,"value":2965},{"type":993,"tag":1073,"props":3035,"children":3036},{},[3037],{"type":998,"value":3038},"True if file supports writing",{"type":993,"tag":1021,"props":3040,"children":3041},{},[3042,3050,3055,3064,3068],{"type":993,"tag":1073,"props":3043,"children":3044},{},[3045],{"type":993,"tag":1077,"props":3046,"children":3047},{},[3048],{"type":998,"value":3049},"seekable()",{"type":993,"tag":1073,"props":3051,"children":3052},{},[3053],{"type":998,"value":3054},"Check if seekable",{"type":993,"tag":1073,"props":3056,"children":3057},{},[3058],{"type":993,"tag":1658,"props":3059,"children":3061},{"className":3060},[],[3062],{"type":998,"value":3063},"f.seekable()",{"type":993,"tag":1073,"props":3065,"children":3066},{},[3067],{"type":998,"value":2965},{"type":993,"tag":1073,"props":3069,"children":3070},{},[3071],{"type":998,"value":3072},"True if file supports seeking",{"type":993,"tag":1641,"props":3074,"children":3076},{"id":3075},"file-reading-examples",[3077],{"type":998,"value":3078},"File Reading Examples",{"type":993,"tag":1648,"props":3080,"children":3081},{},[3082],{"type":993,"tag":1652,"props":3083,"children":3085},{"className":1654,"code":3084,"language":6,"meta":8,"style":8},"# Read with position tracking\nwith open('data.txt', 'w') as f:\n    f.write(\"Hello World!\")\n\nwith open('data.txt', 'r') as f:\n    print(f\"Position: {f.tell()}\")  # 0\n    first_5 = f.read(5)\n    print(f\"Read: {first_5}\")\n    print(f\"Position: {f.tell()}\")  # 5\n",[3086],{"type":993,"tag":1658,"props":3087,"children":3088},{"__ignoreMap":8},[3089,3097,3136,3152,3159,3198,3248,3274,3315],{"type":993,"tag":1662,"props":3090,"children":3091},{"class":1664,"line":12},[3092],{"type":993,"tag":1662,"props":3093,"children":3094},{"style":1668},[3095],{"type":998,"value":3096},"# Read with position tracking\n",{"type":993,"tag":1662,"props":3098,"children":3099},{"class":1664,"line":27},[3100,3104,3108,3112,3116,3120,3124,3128,3132],{"type":993,"tag":1662,"props":3101,"children":3102},{"style":1677},[3103],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3105,"children":3106},{"style":1683},[3107],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3109,"children":3110},{"style":1689},[3111],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3113,"children":3114},{"style":1695},[3115],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3117,"children":3118},{"style":1689},[3119],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3121,"children":3122},{"style":1695},[3123],{"type":998,"value":1124},{"type":993,"tag":1662,"props":3125,"children":3126},{"style":1689},[3127],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3129,"children":3130},{"style":1677},[3131],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3133,"children":3134},{"style":1689},[3135],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3137,"children":3138},{"class":1664,"line":36},[3139,3143,3148],{"type":993,"tag":1662,"props":3140,"children":3141},{"style":1689},[3142],{"type":998,"value":1730},{"type":993,"tag":1662,"props":3144,"children":3145},{"style":1695},[3146],{"type":998,"value":3147},"\"Hello World!\"",{"type":993,"tag":1662,"props":3149,"children":3150},{"style":1689},[3151],{"type":998,"value":1750},{"type":993,"tag":1662,"props":3153,"children":3154},{"class":1664,"line":45},[3155],{"type":993,"tag":1662,"props":3156,"children":3157},{"emptyLinePlaceholder":13},[3158],{"type":998,"value":1758},{"type":993,"tag":1662,"props":3160,"children":3161},{"class":1664,"line":54},[3162,3166,3170,3174,3178,3182,3186,3190,3194],{"type":993,"tag":1662,"props":3163,"children":3164},{"style":1677},[3165],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3167,"children":3168},{"style":1683},[3169],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3171,"children":3172},{"style":1689},[3173],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3175,"children":3176},{"style":1695},[3177],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3179,"children":3180},{"style":1689},[3181],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3183,"children":3184},{"style":1695},[3185],{"type":998,"value":1081},{"type":993,"tag":1662,"props":3187,"children":3188},{"style":1689},[3189],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3191,"children":3192},{"style":1677},[3193],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3195,"children":3196},{"style":1689},[3197],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3199,"children":3200},{"class":1664,"line":63},[3201,3205,3209,3214,3219,3224,3228,3233,3238,3243],{"type":993,"tag":1662,"props":3202,"children":3203},{"style":1683},[3204],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3206,"children":3207},{"style":1689},[3208],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3210,"children":3211},{"style":1677},[3212],{"type":998,"value":3213},"f",{"type":993,"tag":1662,"props":3215,"children":3216},{"style":1695},[3217],{"type":998,"value":3218},"\"Position: ",{"type":993,"tag":1662,"props":3220,"children":3221},{"style":1683},[3222],{"type":998,"value":3223},"{",{"type":993,"tag":1662,"props":3225,"children":3226},{"style":1689},[3227],{"type":998,"value":2786},{"type":993,"tag":1662,"props":3229,"children":3230},{"style":1683},[3231],{"type":998,"value":3232},"}",{"type":993,"tag":1662,"props":3234,"children":3235},{"style":1695},[3236],{"type":998,"value":3237},"\"",{"type":993,"tag":1662,"props":3239,"children":3240},{"style":1689},[3241],{"type":998,"value":3242},")  ",{"type":993,"tag":1662,"props":3244,"children":3245},{"style":1668},[3246],{"type":998,"value":3247},"# 0\n",{"type":993,"tag":1662,"props":3249,"children":3250},{"class":1664,"line":72},[3251,3256,3260,3265,3270],{"type":993,"tag":1662,"props":3252,"children":3253},{"style":1689},[3254],{"type":998,"value":3255},"    first_5 ",{"type":993,"tag":1662,"props":3257,"children":3258},{"style":1677},[3259],{"type":998,"value":1810},{"type":993,"tag":1662,"props":3261,"children":3262},{"style":1689},[3263],{"type":998,"value":3264}," f.read(",{"type":993,"tag":1662,"props":3266,"children":3267},{"style":1683},[3268],{"type":998,"value":3269},"5",{"type":993,"tag":1662,"props":3271,"children":3272},{"style":1689},[3273],{"type":998,"value":1750},{"type":993,"tag":1662,"props":3275,"children":3276},{"class":1664,"line":81},[3277,3281,3285,3289,3294,3298,3303,3307,3311],{"type":993,"tag":1662,"props":3278,"children":3279},{"style":1683},[3280],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3282,"children":3283},{"style":1689},[3284],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3286,"children":3287},{"style":1677},[3288],{"type":998,"value":3213},{"type":993,"tag":1662,"props":3290,"children":3291},{"style":1695},[3292],{"type":998,"value":3293},"\"Read: ",{"type":993,"tag":1662,"props":3295,"children":3296},{"style":1683},[3297],{"type":998,"value":3223},{"type":993,"tag":1662,"props":3299,"children":3300},{"style":1689},[3301],{"type":998,"value":3302},"first_5",{"type":993,"tag":1662,"props":3304,"children":3305},{"style":1683},[3306],{"type":998,"value":3232},{"type":993,"tag":1662,"props":3308,"children":3309},{"style":1695},[3310],{"type":998,"value":3237},{"type":993,"tag":1662,"props":3312,"children":3313},{"style":1689},[3314],{"type":998,"value":1750},{"type":993,"tag":1662,"props":3316,"children":3317},{"class":1664,"line":91},[3318,3322,3326,3330,3334,3338,3342,3346,3350,3354],{"type":993,"tag":1662,"props":3319,"children":3320},{"style":1683},[3321],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3323,"children":3324},{"style":1689},[3325],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3327,"children":3328},{"style":1677},[3329],{"type":998,"value":3213},{"type":993,"tag":1662,"props":3331,"children":3332},{"style":1695},[3333],{"type":998,"value":3218},{"type":993,"tag":1662,"props":3335,"children":3336},{"style":1683},[3337],{"type":998,"value":3223},{"type":993,"tag":1662,"props":3339,"children":3340},{"style":1689},[3341],{"type":998,"value":2786},{"type":993,"tag":1662,"props":3343,"children":3344},{"style":1683},[3345],{"type":998,"value":3232},{"type":993,"tag":1662,"props":3347,"children":3348},{"style":1695},[3349],{"type":998,"value":3237},{"type":993,"tag":1662,"props":3351,"children":3352},{"style":1689},[3353],{"type":998,"value":3242},{"type":993,"tag":1662,"props":3355,"children":3356},{"style":1668},[3357],{"type":998,"value":3358},"# 5\n",{"type":993,"tag":1652,"props":3360,"children":3362},{"className":1654,"code":3361,"language":6,"meta":8,"style":8},"# Read entire file\nwith open('data.txt', 'r') as f:\n    content = f.read()\n    print(content)\n\n# Read specific number of characters\nwith open('data.txt', 'r') as f:\n    chunk = f.read(100)  # Read first 100 characters\n    \n# Read line by line\nwith open('data.txt', 'r') as f:\n    for line in f:  # Most efficient way to iterate\n        print(line.strip())\n\n# Read all lines into list\nwith open('data.txt', 'r') as f:\n    lines = f.readlines()\n    for line in lines:\n        print(line.rstrip('\\n'))\n\n# Read with position tracking\nwith open('data.txt', 'r') as f:\n    print(f\"Position: {f.tell()}\")  # 0\n    first_10 = f.read(10)\n    print(f\"Position: {f.tell()}\")  # 10\n    f.seek(0)  # Back to beginning\n    print(f\"Position: {f.tell()}\")  # 0\n",[3363],{"type":993,"tag":1658,"props":3364,"children":3365},{"__ignoreMap":8},[3366,3374,3413,3428,3439,3446,3454,3493,3523,3531,3539,3578,3606,3619,3626,3634,3673,3690,3710,3740,3747,3754,3793,3836,3861,3905,3927],{"type":993,"tag":1662,"props":3367,"children":3368},{"class":1664,"line":12},[3369],{"type":993,"tag":1662,"props":3370,"children":3371},{"style":1668},[3372],{"type":998,"value":3373},"# Read entire file\n",{"type":993,"tag":1662,"props":3375,"children":3376},{"class":1664,"line":27},[3377,3381,3385,3389,3393,3397,3401,3405,3409],{"type":993,"tag":1662,"props":3378,"children":3379},{"style":1677},[3380],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3382,"children":3383},{"style":1683},[3384],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3386,"children":3387},{"style":1689},[3388],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3390,"children":3391},{"style":1695},[3392],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3394,"children":3395},{"style":1689},[3396],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3398,"children":3399},{"style":1695},[3400],{"type":998,"value":1081},{"type":993,"tag":1662,"props":3402,"children":3403},{"style":1689},[3404],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3406,"children":3407},{"style":1677},[3408],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3410,"children":3411},{"style":1689},[3412],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3414,"children":3415},{"class":1664,"line":36},[3416,3420,3424],{"type":993,"tag":1662,"props":3417,"children":3418},{"style":1689},[3419],{"type":998,"value":1805},{"type":993,"tag":1662,"props":3421,"children":3422},{"style":1677},[3423],{"type":998,"value":1810},{"type":993,"tag":1662,"props":3425,"children":3426},{"style":1689},[3427],{"type":998,"value":1815},{"type":993,"tag":1662,"props":3429,"children":3430},{"class":1664,"line":45},[3431,3435],{"type":993,"tag":1662,"props":3432,"children":3433},{"style":1683},[3434],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3436,"children":3437},{"style":1689},[3438],{"type":998,"value":1828},{"type":993,"tag":1662,"props":3440,"children":3441},{"class":1664,"line":54},[3442],{"type":993,"tag":1662,"props":3443,"children":3444},{"emptyLinePlaceholder":13},[3445],{"type":998,"value":1758},{"type":993,"tag":1662,"props":3447,"children":3448},{"class":1664,"line":63},[3449],{"type":993,"tag":1662,"props":3450,"children":3451},{"style":1668},[3452],{"type":998,"value":3453},"# Read specific number of characters\n",{"type":993,"tag":1662,"props":3455,"children":3456},{"class":1664,"line":72},[3457,3461,3465,3469,3473,3477,3481,3485,3489],{"type":993,"tag":1662,"props":3458,"children":3459},{"style":1677},[3460],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3462,"children":3463},{"style":1683},[3464],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3466,"children":3467},{"style":1689},[3468],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3470,"children":3471},{"style":1695},[3472],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3474,"children":3475},{"style":1689},[3476],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3478,"children":3479},{"style":1695},[3480],{"type":998,"value":1081},{"type":993,"tag":1662,"props":3482,"children":3483},{"style":1689},[3484],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3486,"children":3487},{"style":1677},[3488],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3490,"children":3491},{"style":1689},[3492],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3494,"children":3495},{"class":1664,"line":81},[3496,3501,3505,3509,3514,3518],{"type":993,"tag":1662,"props":3497,"children":3498},{"style":1689},[3499],{"type":998,"value":3500},"    chunk ",{"type":993,"tag":1662,"props":3502,"children":3503},{"style":1677},[3504],{"type":998,"value":1810},{"type":993,"tag":1662,"props":3506,"children":3507},{"style":1689},[3508],{"type":998,"value":3264},{"type":993,"tag":1662,"props":3510,"children":3511},{"style":1683},[3512],{"type":998,"value":3513},"100",{"type":993,"tag":1662,"props":3515,"children":3516},{"style":1689},[3517],{"type":998,"value":3242},{"type":993,"tag":1662,"props":3519,"children":3520},{"style":1668},[3521],{"type":998,"value":3522},"# Read first 100 characters\n",{"type":993,"tag":1662,"props":3524,"children":3525},{"class":1664,"line":91},[3526],{"type":993,"tag":1662,"props":3527,"children":3528},{"style":1689},[3529],{"type":998,"value":3530},"    \n",{"type":993,"tag":1662,"props":3532,"children":3533},{"class":1664,"line":100},[3534],{"type":993,"tag":1662,"props":3535,"children":3536},{"style":1668},[3537],{"type":998,"value":3538},"# Read line by line\n",{"type":993,"tag":1662,"props":3540,"children":3541},{"class":1664,"line":109},[3542,3546,3550,3554,3558,3562,3566,3570,3574],{"type":993,"tag":1662,"props":3543,"children":3544},{"style":1677},[3545],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3547,"children":3548},{"style":1683},[3549],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3551,"children":3552},{"style":1689},[3553],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3555,"children":3556},{"style":1695},[3557],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3559,"children":3560},{"style":1689},[3561],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3563,"children":3564},{"style":1695},[3565],{"type":998,"value":1081},{"type":993,"tag":1662,"props":3567,"children":3568},{"style":1689},[3569],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3571,"children":3572},{"style":1677},[3573],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3575,"children":3576},{"style":1689},[3577],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3579,"children":3580},{"class":1664,"line":118},[3581,3586,3591,3596,3601],{"type":993,"tag":1662,"props":3582,"children":3583},{"style":1677},[3584],{"type":998,"value":3585},"    for",{"type":993,"tag":1662,"props":3587,"children":3588},{"style":1689},[3589],{"type":998,"value":3590}," line ",{"type":993,"tag":1662,"props":3592,"children":3593},{"style":1677},[3594],{"type":998,"value":3595},"in",{"type":993,"tag":1662,"props":3597,"children":3598},{"style":1689},[3599],{"type":998,"value":3600}," f:  ",{"type":993,"tag":1662,"props":3602,"children":3603},{"style":1668},[3604],{"type":998,"value":3605},"# Most efficient way to iterate\n",{"type":993,"tag":1662,"props":3607,"children":3608},{"class":1664,"line":127},[3609,3614],{"type":993,"tag":1662,"props":3610,"children":3611},{"style":1683},[3612],{"type":998,"value":3613},"        print",{"type":993,"tag":1662,"props":3615,"children":3616},{"style":1689},[3617],{"type":998,"value":3618},"(line.strip())\n",{"type":993,"tag":1662,"props":3620,"children":3621},{"class":1664,"line":136},[3622],{"type":993,"tag":1662,"props":3623,"children":3624},{"emptyLinePlaceholder":13},[3625],{"type":998,"value":1758},{"type":993,"tag":1662,"props":3627,"children":3628},{"class":1664,"line":146},[3629],{"type":993,"tag":1662,"props":3630,"children":3631},{"style":1668},[3632],{"type":998,"value":3633},"# Read all lines into list\n",{"type":993,"tag":1662,"props":3635,"children":3636},{"class":1664,"line":155},[3637,3641,3645,3649,3653,3657,3661,3665,3669],{"type":993,"tag":1662,"props":3638,"children":3639},{"style":1677},[3640],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3642,"children":3643},{"style":1683},[3644],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3646,"children":3647},{"style":1689},[3648],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3650,"children":3651},{"style":1695},[3652],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3654,"children":3655},{"style":1689},[3656],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3658,"children":3659},{"style":1695},[3660],{"type":998,"value":1081},{"type":993,"tag":1662,"props":3662,"children":3663},{"style":1689},[3664],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3666,"children":3667},{"style":1677},[3668],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3670,"children":3671},{"style":1689},[3672],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3674,"children":3675},{"class":1664,"line":164},[3676,3681,3685],{"type":993,"tag":1662,"props":3677,"children":3678},{"style":1689},[3679],{"type":998,"value":3680},"    lines ",{"type":993,"tag":1662,"props":3682,"children":3683},{"style":1677},[3684],{"type":998,"value":1810},{"type":993,"tag":1662,"props":3686,"children":3687},{"style":1689},[3688],{"type":998,"value":3689}," f.readlines()\n",{"type":993,"tag":1662,"props":3691,"children":3692},{"class":1664,"line":173},[3693,3697,3701,3705],{"type":993,"tag":1662,"props":3694,"children":3695},{"style":1677},[3696],{"type":998,"value":3585},{"type":993,"tag":1662,"props":3698,"children":3699},{"style":1689},[3700],{"type":998,"value":3590},{"type":993,"tag":1662,"props":3702,"children":3703},{"style":1677},[3704],{"type":998,"value":3595},{"type":993,"tag":1662,"props":3706,"children":3707},{"style":1689},[3708],{"type":998,"value":3709}," lines:\n",{"type":993,"tag":1662,"props":3711,"children":3712},{"class":1664,"line":182},[3713,3717,3722,3727,3731,3735],{"type":993,"tag":1662,"props":3714,"children":3715},{"style":1683},[3716],{"type":998,"value":3613},{"type":993,"tag":1662,"props":3718,"children":3719},{"style":1689},[3720],{"type":998,"value":3721},"(line.rstrip(",{"type":993,"tag":1662,"props":3723,"children":3724},{"style":1695},[3725],{"type":998,"value":3726},"'",{"type":993,"tag":1662,"props":3728,"children":3729},{"style":1683},[3730],{"type":998,"value":1740},{"type":993,"tag":1662,"props":3732,"children":3733},{"style":1695},[3734],{"type":998,"value":3726},{"type":993,"tag":1662,"props":3736,"children":3737},{"style":1689},[3738],{"type":998,"value":3739},"))\n",{"type":993,"tag":1662,"props":3741,"children":3742},{"class":1664,"line":191},[3743],{"type":993,"tag":1662,"props":3744,"children":3745},{"emptyLinePlaceholder":13},[3746],{"type":998,"value":1758},{"type":993,"tag":1662,"props":3748,"children":3749},{"class":1664,"line":201},[3750],{"type":993,"tag":1662,"props":3751,"children":3752},{"style":1668},[3753],{"type":998,"value":3096},{"type":993,"tag":1662,"props":3755,"children":3756},{"class":1664,"line":210},[3757,3761,3765,3769,3773,3777,3781,3785,3789],{"type":993,"tag":1662,"props":3758,"children":3759},{"style":1677},[3760],{"type":998,"value":1680},{"type":993,"tag":1662,"props":3762,"children":3763},{"style":1683},[3764],{"type":998,"value":1686},{"type":993,"tag":1662,"props":3766,"children":3767},{"style":1689},[3768],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3770,"children":3771},{"style":1695},[3772],{"type":998,"value":1698},{"type":993,"tag":1662,"props":3774,"children":3775},{"style":1689},[3776],{"type":998,"value":1703},{"type":993,"tag":1662,"props":3778,"children":3779},{"style":1695},[3780],{"type":998,"value":1081},{"type":993,"tag":1662,"props":3782,"children":3783},{"style":1689},[3784],{"type":998,"value":1712},{"type":993,"tag":1662,"props":3786,"children":3787},{"style":1677},[3788],{"type":998,"value":1717},{"type":993,"tag":1662,"props":3790,"children":3791},{"style":1689},[3792],{"type":998,"value":1722},{"type":993,"tag":1662,"props":3794,"children":3795},{"class":1664,"line":219},[3796,3800,3804,3808,3812,3816,3820,3824,3828,3832],{"type":993,"tag":1662,"props":3797,"children":3798},{"style":1683},[3799],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3801,"children":3802},{"style":1689},[3803],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3805,"children":3806},{"style":1677},[3807],{"type":998,"value":3213},{"type":993,"tag":1662,"props":3809,"children":3810},{"style":1695},[3811],{"type":998,"value":3218},{"type":993,"tag":1662,"props":3813,"children":3814},{"style":1683},[3815],{"type":998,"value":3223},{"type":993,"tag":1662,"props":3817,"children":3818},{"style":1689},[3819],{"type":998,"value":2786},{"type":993,"tag":1662,"props":3821,"children":3822},{"style":1683},[3823],{"type":998,"value":3232},{"type":993,"tag":1662,"props":3825,"children":3826},{"style":1695},[3827],{"type":998,"value":3237},{"type":993,"tag":1662,"props":3829,"children":3830},{"style":1689},[3831],{"type":998,"value":3242},{"type":993,"tag":1662,"props":3833,"children":3834},{"style":1668},[3835],{"type":998,"value":3247},{"type":993,"tag":1662,"props":3837,"children":3838},{"class":1664,"line":228},[3839,3844,3848,3852,3857],{"type":993,"tag":1662,"props":3840,"children":3841},{"style":1689},[3842],{"type":998,"value":3843},"    first_10 ",{"type":993,"tag":1662,"props":3845,"children":3846},{"style":1677},[3847],{"type":998,"value":1810},{"type":993,"tag":1662,"props":3849,"children":3850},{"style":1689},[3851],{"type":998,"value":3264},{"type":993,"tag":1662,"props":3853,"children":3854},{"style":1683},[3855],{"type":998,"value":3856},"10",{"type":993,"tag":1662,"props":3858,"children":3859},{"style":1689},[3860],{"type":998,"value":1750},{"type":993,"tag":1662,"props":3862,"children":3863},{"class":1664,"line":238},[3864,3868,3872,3876,3880,3884,3888,3892,3896,3900],{"type":993,"tag":1662,"props":3865,"children":3866},{"style":1683},[3867],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3869,"children":3870},{"style":1689},[3871],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3873,"children":3874},{"style":1677},[3875],{"type":998,"value":3213},{"type":993,"tag":1662,"props":3877,"children":3878},{"style":1695},[3879],{"type":998,"value":3218},{"type":993,"tag":1662,"props":3881,"children":3882},{"style":1683},[3883],{"type":998,"value":3223},{"type":993,"tag":1662,"props":3885,"children":3886},{"style":1689},[3887],{"type":998,"value":2786},{"type":993,"tag":1662,"props":3889,"children":3890},{"style":1683},[3891],{"type":998,"value":3232},{"type":993,"tag":1662,"props":3893,"children":3894},{"style":1695},[3895],{"type":998,"value":3237},{"type":993,"tag":1662,"props":3897,"children":3898},{"style":1689},[3899],{"type":998,"value":3242},{"type":993,"tag":1662,"props":3901,"children":3902},{"style":1668},[3903],{"type":998,"value":3904},"# 10\n",{"type":993,"tag":1662,"props":3906,"children":3907},{"class":1664,"line":247},[3908,3913,3918,3922],{"type":993,"tag":1662,"props":3909,"children":3910},{"style":1689},[3911],{"type":998,"value":3912},"    f.seek(",{"type":993,"tag":1662,"props":3914,"children":3915},{"style":1683},[3916],{"type":998,"value":3917},"0",{"type":993,"tag":1662,"props":3919,"children":3920},{"style":1689},[3921],{"type":998,"value":3242},{"type":993,"tag":1662,"props":3923,"children":3924},{"style":1668},[3925],{"type":998,"value":3926},"# Back to beginning\n",{"type":993,"tag":1662,"props":3928,"children":3929},{"class":1664,"line":256},[3930,3934,3938,3942,3946,3950,3954,3958,3962,3966],{"type":993,"tag":1662,"props":3931,"children":3932},{"style":1683},[3933],{"type":998,"value":1823},{"type":993,"tag":1662,"props":3935,"children":3936},{"style":1689},[3937],{"type":998,"value":1692},{"type":993,"tag":1662,"props":3939,"children":3940},{"style":1677},[3941],{"type":998,"value":3213},{"type":993,"tag":1662,"props":3943,"children":3944},{"style":1695},[3945],{"type":998,"value":3218},{"type":993,"tag":1662,"props":3947,"children":3948},{"style":1683},[3949],{"type":998,"value":3223},{"type":993,"tag":1662,"props":3951,"children":3952},{"style":1689},[3953],{"type":998,"value":2786},{"type":993,"tag":1662,"props":3955,"children":3956},{"style":1683},[3957],{"type":998,"value":3232},{"type":993,"tag":1662,"props":3959,"children":3960},{"style":1695},[3961],{"type":998,"value":3237},{"type":993,"tag":1662,"props":3963,"children":3964},{"style":1689},[3965],{"type":998,"value":3242},{"type":993,"tag":1662,"props":3967,"children":3968},{"style":1668},[3969],{"type":998,"value":3247},{"type":993,"tag":1006,"props":3971,"children":3973},{"id":3972},"file-writing-patterns",[3974],{"type":998,"value":3975},"File Writing Patterns",{"type":993,"tag":1641,"props":3977,"children":3979},{"id":3978},"basic-writing",[3980],{"type":998,"value":3981},"Basic Writing",{"type":993,"tag":1652,"props":3983,"children":3985},{"className":1654,"code":3984,"language":6,"meta":8,"style":8},"# Write string to file\nwith open('output.txt', 'w') as f:\n    f.write(\"Hello World\\n\")\n    f.write(\"Second line\\n\")\n\n# Write multiple lines\nlines = [\"Line 1\\n\", \"Line 2\\n\", \"Line 3\\n\"]\nwith open('output.txt', 'w') as f:\n    f.writelines(lines)\n\n# Write with formatting\ndata = {\"name\": \"Alice\", \"age\": 25}\nwith open('output.txt', 'w') as f:\n    f.write(f\"Name: {data['name']}\\n\")\n    f.write(f\"Age: {data['age']}\\n\")\n",[3986],{"type":993,"tag":1658,"props":3987,"children":3988},{"__ignoreMap":8},[3989,3997,4037,4060,4084,4091,4099,4168,4207,4215,4222,4230,4285,4324,4372],{"type":993,"tag":1662,"props":3990,"children":3991},{"class":1664,"line":12},[3992],{"type":993,"tag":1662,"props":3993,"children":3994},{"style":1668},[3995],{"type":998,"value":3996},"# Write string to file\n",{"type":993,"tag":1662,"props":3998,"children":3999},{"class":1664,"line":27},[4000,4004,4008,4012,4017,4021,4025,4029,4033],{"type":993,"tag":1662,"props":4001,"children":4002},{"style":1677},[4003],{"type":998,"value":1680},{"type":993,"tag":1662,"props":4005,"children":4006},{"style":1683},[4007],{"type":998,"value":1686},{"type":993,"tag":1662,"props":4009,"children":4010},{"style":1689},[4011],{"type":998,"value":1692},{"type":993,"tag":1662,"props":4013,"children":4014},{"style":1695},[4015],{"type":998,"value":4016},"'output.txt'",{"type":993,"tag":1662,"props":4018,"children":4019},{"style":1689},[4020],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4022,"children":4023},{"style":1695},[4024],{"type":998,"value":1124},{"type":993,"tag":1662,"props":4026,"children":4027},{"style":1689},[4028],{"type":998,"value":1712},{"type":993,"tag":1662,"props":4030,"children":4031},{"style":1677},[4032],{"type":998,"value":1717},{"type":993,"tag":1662,"props":4034,"children":4035},{"style":1689},[4036],{"type":998,"value":1722},{"type":993,"tag":1662,"props":4038,"children":4039},{"class":1664,"line":36},[4040,4044,4048,4052,4056],{"type":993,"tag":1662,"props":4041,"children":4042},{"style":1689},[4043],{"type":998,"value":1730},{"type":993,"tag":1662,"props":4045,"children":4046},{"style":1695},[4047],{"type":998,"value":1735},{"type":993,"tag":1662,"props":4049,"children":4050},{"style":1683},[4051],{"type":998,"value":1740},{"type":993,"tag":1662,"props":4053,"children":4054},{"style":1695},[4055],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4057,"children":4058},{"style":1689},[4059],{"type":998,"value":1750},{"type":993,"tag":1662,"props":4061,"children":4062},{"class":1664,"line":45},[4063,4067,4072,4076,4080],{"type":993,"tag":1662,"props":4064,"children":4065},{"style":1689},[4066],{"type":998,"value":1730},{"type":993,"tag":1662,"props":4068,"children":4069},{"style":1695},[4070],{"type":998,"value":4071},"\"Second line",{"type":993,"tag":1662,"props":4073,"children":4074},{"style":1683},[4075],{"type":998,"value":1740},{"type":993,"tag":1662,"props":4077,"children":4078},{"style":1695},[4079],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4081,"children":4082},{"style":1689},[4083],{"type":998,"value":1750},{"type":993,"tag":1662,"props":4085,"children":4086},{"class":1664,"line":54},[4087],{"type":993,"tag":1662,"props":4088,"children":4089},{"emptyLinePlaceholder":13},[4090],{"type":998,"value":1758},{"type":993,"tag":1662,"props":4092,"children":4093},{"class":1664,"line":63},[4094],{"type":993,"tag":1662,"props":4095,"children":4096},{"style":1668},[4097],{"type":998,"value":4098},"# Write multiple lines\n",{"type":993,"tag":1662,"props":4100,"children":4101},{"class":1664,"line":72},[4102,4107,4111,4116,4121,4125,4129,4133,4138,4142,4146,4150,4155,4159,4163],{"type":993,"tag":1662,"props":4103,"children":4104},{"style":1689},[4105],{"type":998,"value":4106},"lines ",{"type":993,"tag":1662,"props":4108,"children":4109},{"style":1677},[4110],{"type":998,"value":1810},{"type":993,"tag":1662,"props":4112,"children":4113},{"style":1689},[4114],{"type":998,"value":4115}," [",{"type":993,"tag":1662,"props":4117,"children":4118},{"style":1695},[4119],{"type":998,"value":4120},"\"Line 1",{"type":993,"tag":1662,"props":4122,"children":4123},{"style":1683},[4124],{"type":998,"value":1740},{"type":993,"tag":1662,"props":4126,"children":4127},{"style":1695},[4128],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4130,"children":4131},{"style":1689},[4132],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4134,"children":4135},{"style":1695},[4136],{"type":998,"value":4137},"\"Line 2",{"type":993,"tag":1662,"props":4139,"children":4140},{"style":1683},[4141],{"type":998,"value":1740},{"type":993,"tag":1662,"props":4143,"children":4144},{"style":1695},[4145],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4147,"children":4148},{"style":1689},[4149],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4151,"children":4152},{"style":1695},[4153],{"type":998,"value":4154},"\"Line 3",{"type":993,"tag":1662,"props":4156,"children":4157},{"style":1683},[4158],{"type":998,"value":1740},{"type":993,"tag":1662,"props":4160,"children":4161},{"style":1695},[4162],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4164,"children":4165},{"style":1689},[4166],{"type":998,"value":4167},"]\n",{"type":993,"tag":1662,"props":4169,"children":4170},{"class":1664,"line":81},[4171,4175,4179,4183,4187,4191,4195,4199,4203],{"type":993,"tag":1662,"props":4172,"children":4173},{"style":1677},[4174],{"type":998,"value":1680},{"type":993,"tag":1662,"props":4176,"children":4177},{"style":1683},[4178],{"type":998,"value":1686},{"type":993,"tag":1662,"props":4180,"children":4181},{"style":1689},[4182],{"type":998,"value":1692},{"type":993,"tag":1662,"props":4184,"children":4185},{"style":1695},[4186],{"type":998,"value":4016},{"type":993,"tag":1662,"props":4188,"children":4189},{"style":1689},[4190],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4192,"children":4193},{"style":1695},[4194],{"type":998,"value":1124},{"type":993,"tag":1662,"props":4196,"children":4197},{"style":1689},[4198],{"type":998,"value":1712},{"type":993,"tag":1662,"props":4200,"children":4201},{"style":1677},[4202],{"type":998,"value":1717},{"type":993,"tag":1662,"props":4204,"children":4205},{"style":1689},[4206],{"type":998,"value":1722},{"type":993,"tag":1662,"props":4208,"children":4209},{"class":1664,"line":91},[4210],{"type":993,"tag":1662,"props":4211,"children":4212},{"style":1689},[4213],{"type":998,"value":4214},"    f.writelines(lines)\n",{"type":993,"tag":1662,"props":4216,"children":4217},{"class":1664,"line":100},[4218],{"type":993,"tag":1662,"props":4219,"children":4220},{"emptyLinePlaceholder":13},[4221],{"type":998,"value":1758},{"type":993,"tag":1662,"props":4223,"children":4224},{"class":1664,"line":109},[4225],{"type":993,"tag":1662,"props":4226,"children":4227},{"style":1668},[4228],{"type":998,"value":4229},"# Write with formatting\n",{"type":993,"tag":1662,"props":4231,"children":4232},{"class":1664,"line":118},[4233,4238,4242,4247,4252,4257,4262,4266,4271,4275,4280],{"type":993,"tag":1662,"props":4234,"children":4235},{"style":1689},[4236],{"type":998,"value":4237},"data ",{"type":993,"tag":1662,"props":4239,"children":4240},{"style":1677},[4241],{"type":998,"value":1810},{"type":993,"tag":1662,"props":4243,"children":4244},{"style":1689},[4245],{"type":998,"value":4246}," {",{"type":993,"tag":1662,"props":4248,"children":4249},{"style":1695},[4250],{"type":998,"value":4251},"\"name\"",{"type":993,"tag":1662,"props":4253,"children":4254},{"style":1689},[4255],{"type":998,"value":4256},": ",{"type":993,"tag":1662,"props":4258,"children":4259},{"style":1695},[4260],{"type":998,"value":4261},"\"Alice\"",{"type":993,"tag":1662,"props":4263,"children":4264},{"style":1689},[4265],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4267,"children":4268},{"style":1695},[4269],{"type":998,"value":4270},"\"age\"",{"type":993,"tag":1662,"props":4272,"children":4273},{"style":1689},[4274],{"type":998,"value":4256},{"type":993,"tag":1662,"props":4276,"children":4277},{"style":1683},[4278],{"type":998,"value":4279},"25",{"type":993,"tag":1662,"props":4281,"children":4282},{"style":1689},[4283],{"type":998,"value":4284},"}\n",{"type":993,"tag":1662,"props":4286,"children":4287},{"class":1664,"line":127},[4288,4292,4296,4300,4304,4308,4312,4316,4320],{"type":993,"tag":1662,"props":4289,"children":4290},{"style":1677},[4291],{"type":998,"value":1680},{"type":993,"tag":1662,"props":4293,"children":4294},{"style":1683},[4295],{"type":998,"value":1686},{"type":993,"tag":1662,"props":4297,"children":4298},{"style":1689},[4299],{"type":998,"value":1692},{"type":993,"tag":1662,"props":4301,"children":4302},{"style":1695},[4303],{"type":998,"value":4016},{"type":993,"tag":1662,"props":4305,"children":4306},{"style":1689},[4307],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4309,"children":4310},{"style":1695},[4311],{"type":998,"value":1124},{"type":993,"tag":1662,"props":4313,"children":4314},{"style":1689},[4315],{"type":998,"value":1712},{"type":993,"tag":1662,"props":4317,"children":4318},{"style":1677},[4319],{"type":998,"value":1717},{"type":993,"tag":1662,"props":4321,"children":4322},{"style":1689},[4323],{"type":998,"value":1722},{"type":993,"tag":1662,"props":4325,"children":4326},{"class":1664,"line":136},[4327,4331,4335,4340,4344,4349,4354,4359,4364,4368],{"type":993,"tag":1662,"props":4328,"children":4329},{"style":1689},[4330],{"type":998,"value":1730},{"type":993,"tag":1662,"props":4332,"children":4333},{"style":1677},[4334],{"type":998,"value":3213},{"type":993,"tag":1662,"props":4336,"children":4337},{"style":1695},[4338],{"type":998,"value":4339},"\"Name: ",{"type":993,"tag":1662,"props":4341,"children":4342},{"style":1683},[4343],{"type":998,"value":3223},{"type":993,"tag":1662,"props":4345,"children":4346},{"style":1689},[4347],{"type":998,"value":4348},"data[",{"type":993,"tag":1662,"props":4350,"children":4351},{"style":1695},[4352],{"type":998,"value":4353},"'name'",{"type":993,"tag":1662,"props":4355,"children":4356},{"style":1689},[4357],{"type":998,"value":4358},"]",{"type":993,"tag":1662,"props":4360,"children":4361},{"style":1683},[4362],{"type":998,"value":4363},"}\\n",{"type":993,"tag":1662,"props":4365,"children":4366},{"style":1695},[4367],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4369,"children":4370},{"style":1689},[4371],{"type":998,"value":1750},{"type":993,"tag":1662,"props":4373,"children":4374},{"class":1664,"line":146},[4375,4379,4383,4388,4392,4396,4401,4405,4409,4413],{"type":993,"tag":1662,"props":4376,"children":4377},{"style":1689},[4378],{"type":998,"value":1730},{"type":993,"tag":1662,"props":4380,"children":4381},{"style":1677},[4382],{"type":998,"value":3213},{"type":993,"tag":1662,"props":4384,"children":4385},{"style":1695},[4386],{"type":998,"value":4387},"\"Age: ",{"type":993,"tag":1662,"props":4389,"children":4390},{"style":1683},[4391],{"type":998,"value":3223},{"type":993,"tag":1662,"props":4393,"children":4394},{"style":1689},[4395],{"type":998,"value":4348},{"type":993,"tag":1662,"props":4397,"children":4398},{"style":1695},[4399],{"type":998,"value":4400},"'age'",{"type":993,"tag":1662,"props":4402,"children":4403},{"style":1689},[4404],{"type":998,"value":4358},{"type":993,"tag":1662,"props":4406,"children":4407},{"style":1683},[4408],{"type":998,"value":4363},{"type":993,"tag":1662,"props":4410,"children":4411},{"style":1695},[4412],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4414,"children":4415},{"style":1689},[4416],{"type":998,"value":1750},{"type":993,"tag":1641,"props":4418,"children":4420},{"id":4419},"append-mode",[4421],{"type":998,"value":4422},"Append Mode",{"type":993,"tag":1652,"props":4424,"children":4426},{"className":1654,"code":4425,"language":6,"meta":8,"style":8},"# Append to existing file\nwith open('log.txt', 'a') as f:\n    f.write(f\"[{datetime.now()}] New log entry\\n\")\n\n# Append with data preservation\ndef log_message(message, filename='app.log'):\n    with open(filename, 'a', encoding='utf-8') as f:\n        timestamp = datetime.now().isoformat()\n        f.write(f\"[{timestamp}] {message}\\n\")\n\nlog_message(\"Application started\")\nlog_message(\"User login successful\")\n",[4427],{"type":993,"tag":1658,"props":4428,"children":4429},{"__ignoreMap":8},[4430,4438,4478,4524,4531,4539,4572,4623,4640,4694,4701,4718],{"type":993,"tag":1662,"props":4431,"children":4432},{"class":1664,"line":12},[4433],{"type":993,"tag":1662,"props":4434,"children":4435},{"style":1668},[4436],{"type":998,"value":4437},"# Append to existing file\n",{"type":993,"tag":1662,"props":4439,"children":4440},{"class":1664,"line":27},[4441,4445,4449,4453,4458,4462,4466,4470,4474],{"type":993,"tag":1662,"props":4442,"children":4443},{"style":1677},[4444],{"type":998,"value":1680},{"type":993,"tag":1662,"props":4446,"children":4447},{"style":1683},[4448],{"type":998,"value":1686},{"type":993,"tag":1662,"props":4450,"children":4451},{"style":1689},[4452],{"type":998,"value":1692},{"type":993,"tag":1662,"props":4454,"children":4455},{"style":1695},[4456],{"type":998,"value":4457},"'log.txt'",{"type":993,"tag":1662,"props":4459,"children":4460},{"style":1689},[4461],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4463,"children":4464},{"style":1695},[4465],{"type":998,"value":1164},{"type":993,"tag":1662,"props":4467,"children":4468},{"style":1689},[4469],{"type":998,"value":1712},{"type":993,"tag":1662,"props":4471,"children":4472},{"style":1677},[4473],{"type":998,"value":1717},{"type":993,"tag":1662,"props":4475,"children":4476},{"style":1689},[4477],{"type":998,"value":1722},{"type":993,"tag":1662,"props":4479,"children":4480},{"class":1664,"line":36},[4481,4485,4489,4494,4498,4503,4507,4512,4516,4520],{"type":993,"tag":1662,"props":4482,"children":4483},{"style":1689},[4484],{"type":998,"value":1730},{"type":993,"tag":1662,"props":4486,"children":4487},{"style":1677},[4488],{"type":998,"value":3213},{"type":993,"tag":1662,"props":4490,"children":4491},{"style":1695},[4492],{"type":998,"value":4493},"\"[",{"type":993,"tag":1662,"props":4495,"children":4496},{"style":1683},[4497],{"type":998,"value":3223},{"type":993,"tag":1662,"props":4499,"children":4500},{"style":1689},[4501],{"type":998,"value":4502},"datetime.now()",{"type":993,"tag":1662,"props":4504,"children":4505},{"style":1683},[4506],{"type":998,"value":3232},{"type":993,"tag":1662,"props":4508,"children":4509},{"style":1695},[4510],{"type":998,"value":4511},"] New log entry",{"type":993,"tag":1662,"props":4513,"children":4514},{"style":1683},[4515],{"type":998,"value":1740},{"type":993,"tag":1662,"props":4517,"children":4518},{"style":1695},[4519],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4521,"children":4522},{"style":1689},[4523],{"type":998,"value":1750},{"type":993,"tag":1662,"props":4525,"children":4526},{"class":1664,"line":45},[4527],{"type":993,"tag":1662,"props":4528,"children":4529},{"emptyLinePlaceholder":13},[4530],{"type":998,"value":1758},{"type":993,"tag":1662,"props":4532,"children":4533},{"class":1664,"line":54},[4534],{"type":993,"tag":1662,"props":4535,"children":4536},{"style":1668},[4537],{"type":998,"value":4538},"# Append with data preservation\n",{"type":993,"tag":1662,"props":4540,"children":4541},{"class":1664,"line":63},[4542,4547,4553,4558,4562,4567],{"type":993,"tag":1662,"props":4543,"children":4544},{"style":1677},[4545],{"type":998,"value":4546},"def",{"type":993,"tag":1662,"props":4548,"children":4550},{"style":4549},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[4551],{"type":998,"value":4552}," log_message",{"type":993,"tag":1662,"props":4554,"children":4555},{"style":1689},[4556],{"type":998,"value":4557},"(message, filename",{"type":993,"tag":1662,"props":4559,"children":4560},{"style":1677},[4561],{"type":998,"value":1810},{"type":993,"tag":1662,"props":4563,"children":4564},{"style":1695},[4565],{"type":998,"value":4566},"'app.log'",{"type":993,"tag":1662,"props":4568,"children":4569},{"style":1689},[4570],{"type":998,"value":4571},"):\n",{"type":993,"tag":1662,"props":4573,"children":4574},{"class":1664,"line":72},[4575,4579,4583,4588,4592,4596,4602,4606,4611,4615,4619],{"type":993,"tag":1662,"props":4576,"children":4577},{"style":1677},[4578],{"type":998,"value":2302},{"type":993,"tag":1662,"props":4580,"children":4581},{"style":1683},[4582],{"type":998,"value":1686},{"type":993,"tag":1662,"props":4584,"children":4585},{"style":1689},[4586],{"type":998,"value":4587},"(filename, ",{"type":993,"tag":1662,"props":4589,"children":4590},{"style":1695},[4591],{"type":998,"value":1164},{"type":993,"tag":1662,"props":4593,"children":4594},{"style":1689},[4595],{"type":998,"value":1703},{"type":993,"tag":1662,"props":4597,"children":4599},{"style":4598},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[4600],{"type":998,"value":4601},"encoding",{"type":993,"tag":1662,"props":4603,"children":4604},{"style":1677},[4605],{"type":998,"value":1810},{"type":993,"tag":1662,"props":4607,"children":4608},{"style":1695},[4609],{"type":998,"value":4610},"'utf-8'",{"type":993,"tag":1662,"props":4612,"children":4613},{"style":1689},[4614],{"type":998,"value":1712},{"type":993,"tag":1662,"props":4616,"children":4617},{"style":1677},[4618],{"type":998,"value":1717},{"type":993,"tag":1662,"props":4620,"children":4621},{"style":1689},[4622],{"type":998,"value":1722},{"type":993,"tag":1662,"props":4624,"children":4625},{"class":1664,"line":81},[4626,4631,4635],{"type":993,"tag":1662,"props":4627,"children":4628},{"style":1689},[4629],{"type":998,"value":4630},"        timestamp ",{"type":993,"tag":1662,"props":4632,"children":4633},{"style":1677},[4634],{"type":998,"value":1810},{"type":993,"tag":1662,"props":4636,"children":4637},{"style":1689},[4638],{"type":998,"value":4639}," datetime.now().isoformat()\n",{"type":993,"tag":1662,"props":4641,"children":4642},{"class":1664,"line":91},[4643,4647,4651,4655,4659,4664,4668,4673,4677,4682,4686,4690],{"type":993,"tag":1662,"props":4644,"children":4645},{"style":1689},[4646],{"type":998,"value":2349},{"type":993,"tag":1662,"props":4648,"children":4649},{"style":1677},[4650],{"type":998,"value":3213},{"type":993,"tag":1662,"props":4652,"children":4653},{"style":1695},[4654],{"type":998,"value":4493},{"type":993,"tag":1662,"props":4656,"children":4657},{"style":1683},[4658],{"type":998,"value":3223},{"type":993,"tag":1662,"props":4660,"children":4661},{"style":1689},[4662],{"type":998,"value":4663},"timestamp",{"type":993,"tag":1662,"props":4665,"children":4666},{"style":1683},[4667],{"type":998,"value":3232},{"type":993,"tag":1662,"props":4669,"children":4670},{"style":1695},[4671],{"type":998,"value":4672},"] ",{"type":993,"tag":1662,"props":4674,"children":4675},{"style":1683},[4676],{"type":998,"value":3223},{"type":993,"tag":1662,"props":4678,"children":4679},{"style":1689},[4680],{"type":998,"value":4681},"message",{"type":993,"tag":1662,"props":4683,"children":4684},{"style":1683},[4685],{"type":998,"value":4363},{"type":993,"tag":1662,"props":4687,"children":4688},{"style":1695},[4689],{"type":998,"value":3237},{"type":993,"tag":1662,"props":4691,"children":4692},{"style":1689},[4693],{"type":998,"value":1750},{"type":993,"tag":1662,"props":4695,"children":4696},{"class":1664,"line":100},[4697],{"type":993,"tag":1662,"props":4698,"children":4699},{"emptyLinePlaceholder":13},[4700],{"type":998,"value":1758},{"type":993,"tag":1662,"props":4702,"children":4703},{"class":1664,"line":109},[4704,4709,4714],{"type":993,"tag":1662,"props":4705,"children":4706},{"style":1689},[4707],{"type":998,"value":4708},"log_message(",{"type":993,"tag":1662,"props":4710,"children":4711},{"style":1695},[4712],{"type":998,"value":4713},"\"Application started\"",{"type":993,"tag":1662,"props":4715,"children":4716},{"style":1689},[4717],{"type":998,"value":1750},{"type":993,"tag":1662,"props":4719,"children":4720},{"class":1664,"line":118},[4721,4725,4730],{"type":993,"tag":1662,"props":4722,"children":4723},{"style":1689},[4724],{"type":998,"value":4708},{"type":993,"tag":1662,"props":4726,"children":4727},{"style":1695},[4728],{"type":998,"value":4729},"\"User login successful\"",{"type":993,"tag":1662,"props":4731,"children":4732},{"style":1689},[4733],{"type":998,"value":1750},{"type":993,"tag":1006,"props":4735,"children":4737},{"id":4736},"file-system-operations-os-module",[4738],{"type":998,"value":4739},"File System Operations (os module)",{"type":993,"tag":1641,"props":4741,"children":4743},{"id":4742},"path-operations",[4744],{"type":998,"value":4745},"Path Operations",{"type":993,"tag":1013,"props":4747,"children":4748},{},[4749,4776],{"type":993,"tag":1017,"props":4750,"children":4751},{},[4752],{"type":993,"tag":1021,"props":4753,"children":4754},{},[4755,4760,4764,4768,4772],{"type":993,"tag":1025,"props":4756,"children":4757},{},[4758],{"type":998,"value":4759},"Function",{"type":993,"tag":1025,"props":4761,"children":4762},{},[4763],{"type":998,"value":2426},{"type":993,"tag":1025,"props":4765,"children":4766},{},[4767],{"type":998,"value":2431},{"type":993,"tag":1025,"props":4769,"children":4770},{},[4771],{"type":998,"value":2436},{"type":993,"tag":1025,"props":4773,"children":4774},{},[4775],{"type":998,"value":1034},{"type":993,"tag":1066,"props":4777,"children":4778},{},[4779,4813,4847,4881,4915,4950,4985,5020,5054,5088,5122],{"type":993,"tag":1021,"props":4780,"children":4781},{},[4782,4790,4795,4804,4808],{"type":993,"tag":1073,"props":4783,"children":4784},{},[4785],{"type":993,"tag":1077,"props":4786,"children":4787},{},[4788],{"type":998,"value":4789},"os.path.exists()",{"type":993,"tag":1073,"props":4791,"children":4792},{},[4793],{"type":998,"value":4794},"Check if path exists",{"type":993,"tag":1073,"props":4796,"children":4797},{},[4798],{"type":993,"tag":1658,"props":4799,"children":4801},{"className":4800},[],[4802],{"type":998,"value":4803},"os.path.exists('file.txt')",{"type":993,"tag":1073,"props":4805,"children":4806},{},[4807],{"type":998,"value":2965},{"type":993,"tag":1073,"props":4809,"children":4810},{},[4811],{"type":998,"value":4812},"True if path exists",{"type":993,"tag":1021,"props":4814,"children":4815},{},[4816,4824,4829,4838,4842],{"type":993,"tag":1073,"props":4817,"children":4818},{},[4819],{"type":993,"tag":1077,"props":4820,"children":4821},{},[4822],{"type":998,"value":4823},"os.path.isfile()",{"type":993,"tag":1073,"props":4825,"children":4826},{},[4827],{"type":998,"value":4828},"Check if file",{"type":993,"tag":1073,"props":4830,"children":4831},{},[4832],{"type":993,"tag":1658,"props":4833,"children":4835},{"className":4834},[],[4836],{"type":998,"value":4837},"os.path.isfile('file.txt')",{"type":993,"tag":1073,"props":4839,"children":4840},{},[4841],{"type":998,"value":2965},{"type":993,"tag":1073,"props":4843,"children":4844},{},[4845],{"type":998,"value":4846},"True if path is a file",{"type":993,"tag":1021,"props":4848,"children":4849},{},[4850,4858,4863,4872,4876],{"type":993,"tag":1073,"props":4851,"children":4852},{},[4853],{"type":993,"tag":1077,"props":4854,"children":4855},{},[4856],{"type":998,"value":4857},"os.path.isdir()",{"type":993,"tag":1073,"props":4859,"children":4860},{},[4861],{"type":998,"value":4862},"Check if directory",{"type":993,"tag":1073,"props":4864,"children":4865},{},[4866],{"type":993,"tag":1658,"props":4867,"children":4869},{"className":4868},[],[4870],{"type":998,"value":4871},"os.path.isdir('folder')",{"type":993,"tag":1073,"props":4873,"children":4874},{},[4875],{"type":998,"value":2965},{"type":993,"tag":1073,"props":4877,"children":4878},{},[4879],{"type":998,"value":4880},"True if path is a directory",{"type":993,"tag":1021,"props":4882,"children":4883},{},[4884,4892,4897,4906,4910],{"type":993,"tag":1073,"props":4885,"children":4886},{},[4887],{"type":993,"tag":1077,"props":4888,"children":4889},{},[4890],{"type":998,"value":4891},"os.path.getsize()",{"type":993,"tag":1073,"props":4893,"children":4894},{},[4895],{"type":998,"value":4896},"Get file size",{"type":993,"tag":1073,"props":4898,"children":4899},{},[4900],{"type":993,"tag":1658,"props":4901,"children":4903},{"className":4902},[],[4904],{"type":998,"value":4905},"os.path.getsize('file.txt')",{"type":993,"tag":1073,"props":4907,"children":4908},{},[4909],{"type":998,"value":2649},{"type":993,"tag":1073,"props":4911,"children":4912},{},[4913],{"type":998,"value":4914},"File size in bytes",{"type":993,"tag":1021,"props":4916,"children":4917},{},[4918,4926,4931,4940,4945],{"type":993,"tag":1073,"props":4919,"children":4920},{},[4921],{"type":993,"tag":1077,"props":4922,"children":4923},{},[4924],{"type":998,"value":4925},"os.path.getmtime()",{"type":993,"tag":1073,"props":4927,"children":4928},{},[4929],{"type":998,"value":4930},"Get modification time",{"type":993,"tag":1073,"props":4932,"children":4933},{},[4934],{"type":993,"tag":1658,"props":4935,"children":4937},{"className":4936},[],[4938],{"type":998,"value":4939},"os.path.getmtime('file.txt')",{"type":993,"tag":1073,"props":4941,"children":4942},{},[4943],{"type":998,"value":4944},"float",{"type":993,"tag":1073,"props":4946,"children":4947},{},[4948],{"type":998,"value":4949},"Last modification timestamp",{"type":993,"tag":1021,"props":4951,"children":4952},{},[4953,4961,4966,4975,4980],{"type":993,"tag":1073,"props":4954,"children":4955},{},[4956],{"type":993,"tag":1077,"props":4957,"children":4958},{},[4959],{"type":998,"value":4960},"os.path.join()",{"type":993,"tag":1073,"props":4962,"children":4963},{},[4964],{"type":998,"value":4965},"Join path components",{"type":993,"tag":1073,"props":4967,"children":4968},{},[4969],{"type":993,"tag":1658,"props":4970,"children":4972},{"className":4971},[],[4973],{"type":998,"value":4974},"os.path.join('dir', 'file.txt')",{"type":993,"tag":1073,"props":4976,"children":4977},{},[4978],{"type":998,"value":4979},"str",{"type":993,"tag":1073,"props":4981,"children":4982},{},[4983],{"type":998,"value":4984},"Platform-appropriate path",{"type":993,"tag":1021,"props":4986,"children":4987},{},[4988,4996,5001,5010,5015],{"type":993,"tag":1073,"props":4989,"children":4990},{},[4991],{"type":993,"tag":1077,"props":4992,"children":4993},{},[4994],{"type":998,"value":4995},"os.path.split()",{"type":993,"tag":1073,"props":4997,"children":4998},{},[4999],{"type":998,"value":5000},"Split path",{"type":993,"tag":1073,"props":5002,"children":5003},{},[5004],{"type":993,"tag":1658,"props":5005,"children":5007},{"className":5006},[],[5008],{"type":998,"value":5009},"os.path.split('/dir/file.txt')",{"type":993,"tag":1073,"props":5011,"children":5012},{},[5013],{"type":998,"value":5014},"tuple",{"type":993,"tag":1073,"props":5016,"children":5017},{},[5018],{"type":998,"value":5019},"(directory, filename)",{"type":993,"tag":1021,"props":5021,"children":5022},{},[5023,5031,5036,5045,5049],{"type":993,"tag":1073,"props":5024,"children":5025},{},[5026],{"type":993,"tag":1077,"props":5027,"children":5028},{},[5029],{"type":998,"value":5030},"os.path.splitext()",{"type":993,"tag":1073,"props":5032,"children":5033},{},[5034],{"type":998,"value":5035},"Split extension",{"type":993,"tag":1073,"props":5037,"children":5038},{},[5039],{"type":993,"tag":1658,"props":5040,"children":5042},{"className":5041},[],[5043],{"type":998,"value":5044},"os.path.splitext('file.txt')",{"type":993,"tag":1073,"props":5046,"children":5047},{},[5048],{"type":998,"value":5014},{"type":993,"tag":1073,"props":5050,"children":5051},{},[5052],{"type":998,"value":5053},"(name, extension)",{"type":993,"tag":1021,"props":5055,"children":5056},{},[5057,5065,5070,5079,5083],{"type":993,"tag":1073,"props":5058,"children":5059},{},[5060],{"type":993,"tag":1077,"props":5061,"children":5062},{},[5063],{"type":998,"value":5064},"os.path.dirname()",{"type":993,"tag":1073,"props":5066,"children":5067},{},[5068],{"type":998,"value":5069},"Get directory name",{"type":993,"tag":1073,"props":5071,"children":5072},{},[5073],{"type":993,"tag":1658,"props":5074,"children":5076},{"className":5075},[],[5077],{"type":998,"value":5078},"os.path.dirname('/dir/file.txt')",{"type":993,"tag":1073,"props":5080,"children":5081},{},[5082],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5084,"children":5085},{},[5086],{"type":998,"value":5087},"Directory part of path",{"type":993,"tag":1021,"props":5089,"children":5090},{},[5091,5099,5104,5113,5117],{"type":993,"tag":1073,"props":5092,"children":5093},{},[5094],{"type":993,"tag":1077,"props":5095,"children":5096},{},[5097],{"type":998,"value":5098},"os.path.basename()",{"type":993,"tag":1073,"props":5100,"children":5101},{},[5102],{"type":998,"value":5103},"Get base name",{"type":993,"tag":1073,"props":5105,"children":5106},{},[5107],{"type":993,"tag":1658,"props":5108,"children":5110},{"className":5109},[],[5111],{"type":998,"value":5112},"os.path.basename('/dir/file.txt')",{"type":993,"tag":1073,"props":5114,"children":5115},{},[5116],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5118,"children":5119},{},[5120],{"type":998,"value":5121},"Filename part of path",{"type":993,"tag":1021,"props":5123,"children":5124},{},[5125,5133,5138,5147,5151],{"type":993,"tag":1073,"props":5126,"children":5127},{},[5128],{"type":993,"tag":1077,"props":5129,"children":5130},{},[5131],{"type":998,"value":5132},"os.path.abspath()",{"type":993,"tag":1073,"props":5134,"children":5135},{},[5136],{"type":998,"value":5137},"Get absolute path",{"type":993,"tag":1073,"props":5139,"children":5140},{},[5141],{"type":993,"tag":1658,"props":5142,"children":5144},{"className":5143},[],[5145],{"type":998,"value":5146},"os.path.abspath('file.txt')",{"type":993,"tag":1073,"props":5148,"children":5149},{},[5150],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5152,"children":5153},{},[5154],{"type":998,"value":5155},"Absolute path",{"type":993,"tag":1641,"props":5157,"children":5159},{"id":5158},"directory-operations",[5160],{"type":998,"value":5161},"Directory Operations",{"type":993,"tag":1013,"props":5163,"children":5164},{},[5165,5191],{"type":993,"tag":1017,"props":5166,"children":5167},{},[5168],{"type":993,"tag":1021,"props":5169,"children":5170},{},[5171,5175,5179,5183,5187],{"type":993,"tag":1025,"props":5172,"children":5173},{},[5174],{"type":998,"value":4759},{"type":993,"tag":1025,"props":5176,"children":5177},{},[5178],{"type":998,"value":2426},{"type":993,"tag":1025,"props":5180,"children":5181},{},[5182],{"type":998,"value":2431},{"type":993,"tag":1025,"props":5184,"children":5185},{},[5186],{"type":998,"value":2436},{"type":993,"tag":1025,"props":5188,"children":5189},{},[5190],{"type":998,"value":1034},{"type":993,"tag":1066,"props":5192,"children":5193},{},[5194,5228,5262,5296,5329,5363,5396],{"type":993,"tag":1021,"props":5195,"children":5196},{},[5197,5205,5210,5219,5223],{"type":993,"tag":1073,"props":5198,"children":5199},{},[5200],{"type":993,"tag":1077,"props":5201,"children":5202},{},[5203],{"type":998,"value":5204},"os.listdir()",{"type":993,"tag":1073,"props":5206,"children":5207},{},[5208],{"type":998,"value":5209},"List directory contents",{"type":993,"tag":1073,"props":5211,"children":5212},{},[5213],{"type":993,"tag":1658,"props":5214,"children":5216},{"className":5215},[],[5217],{"type":998,"value":5218},"os.listdir('.')",{"type":993,"tag":1073,"props":5220,"children":5221},{},[5222],{"type":998,"value":2576},{"type":993,"tag":1073,"props":5224,"children":5225},{},[5226],{"type":998,"value":5227},"List of files and directories",{"type":993,"tag":1021,"props":5229,"children":5230},{},[5231,5239,5244,5253,5257],{"type":993,"tag":1073,"props":5232,"children":5233},{},[5234],{"type":993,"tag":1077,"props":5235,"children":5236},{},[5237],{"type":998,"value":5238},"os.mkdir()",{"type":993,"tag":1073,"props":5240,"children":5241},{},[5242],{"type":998,"value":5243},"Create directory",{"type":993,"tag":1073,"props":5245,"children":5246},{},[5247],{"type":993,"tag":1658,"props":5248,"children":5250},{"className":5249},[],[5251],{"type":998,"value":5252},"os.mkdir('new_dir')",{"type":993,"tag":1073,"props":5254,"children":5255},{},[5256],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5258,"children":5259},{},[5260],{"type":998,"value":5261},"Create single directory",{"type":993,"tag":1021,"props":5263,"children":5264},{},[5265,5273,5278,5287,5291],{"type":993,"tag":1073,"props":5266,"children":5267},{},[5268],{"type":993,"tag":1077,"props":5269,"children":5270},{},[5271],{"type":998,"value":5272},"os.makedirs()",{"type":993,"tag":1073,"props":5274,"children":5275},{},[5276],{"type":998,"value":5277},"Create directory tree",{"type":993,"tag":1073,"props":5279,"children":5280},{},[5281],{"type":993,"tag":1658,"props":5282,"children":5284},{"className":5283},[],[5285],{"type":998,"value":5286},"os.makedirs('dir/subdir')",{"type":993,"tag":1073,"props":5288,"children":5289},{},[5290],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5292,"children":5293},{},[5294],{"type":998,"value":5295},"Create directory and parents",{"type":993,"tag":1021,"props":5297,"children":5298},{},[5299,5307,5312,5321,5325],{"type":993,"tag":1073,"props":5300,"children":5301},{},[5302],{"type":993,"tag":1077,"props":5303,"children":5304},{},[5305],{"type":998,"value":5306},"os.rmdir()",{"type":993,"tag":1073,"props":5308,"children":5309},{},[5310],{"type":998,"value":5311},"Remove empty directory",{"type":993,"tag":1073,"props":5313,"children":5314},{},[5315],{"type":993,"tag":1658,"props":5316,"children":5318},{"className":5317},[],[5319],{"type":998,"value":5320},"os.rmdir('empty_dir')",{"type":993,"tag":1073,"props":5322,"children":5323},{},[5324],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5326,"children":5327},{},[5328],{"type":998,"value":5311},{"type":993,"tag":1021,"props":5330,"children":5331},{},[5332,5340,5345,5354,5358],{"type":993,"tag":1073,"props":5333,"children":5334},{},[5335],{"type":993,"tag":1077,"props":5336,"children":5337},{},[5338],{"type":998,"value":5339},"os.removedirs()",{"type":993,"tag":1073,"props":5341,"children":5342},{},[5343],{"type":998,"value":5344},"Remove directory tree",{"type":993,"tag":1073,"props":5346,"children":5347},{},[5348],{"type":993,"tag":1658,"props":5349,"children":5351},{"className":5350},[],[5352],{"type":998,"value":5353},"os.removedirs('dir/subdir')",{"type":993,"tag":1073,"props":5355,"children":5356},{},[5357],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5359,"children":5360},{},[5361],{"type":998,"value":5362},"Remove empty directories",{"type":993,"tag":1021,"props":5364,"children":5365},{},[5366,5374,5379,5387,5391],{"type":993,"tag":1073,"props":5367,"children":5368},{},[5369],{"type":993,"tag":1077,"props":5370,"children":5371},{},[5372],{"type":998,"value":5373},"os.getcwd()",{"type":993,"tag":1073,"props":5375,"children":5376},{},[5377],{"type":998,"value":5378},"Get current directory",{"type":993,"tag":1073,"props":5380,"children":5381},{},[5382],{"type":993,"tag":1658,"props":5383,"children":5385},{"className":5384},[],[5386],{"type":998,"value":5373},{"type":993,"tag":1073,"props":5388,"children":5389},{},[5390],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5392,"children":5393},{},[5394],{"type":998,"value":5395},"Current working directory",{"type":993,"tag":1021,"props":5397,"children":5398},{},[5399,5407,5412,5421,5425],{"type":993,"tag":1073,"props":5400,"children":5401},{},[5402],{"type":993,"tag":1077,"props":5403,"children":5404},{},[5405],{"type":998,"value":5406},"os.chdir()",{"type":993,"tag":1073,"props":5408,"children":5409},{},[5410],{"type":998,"value":5411},"Change directory",{"type":993,"tag":1073,"props":5413,"children":5414},{},[5415],{"type":993,"tag":1658,"props":5416,"children":5418},{"className":5417},[],[5419],{"type":998,"value":5420},"os.chdir('/path/to/dir')",{"type":993,"tag":1073,"props":5422,"children":5423},{},[5424],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5426,"children":5427},{},[5428],{"type":998,"value":5429},"Change working directory",{"type":993,"tag":1641,"props":5431,"children":5432},{"id":811},[5433],{"type":998,"value":809},{"type":993,"tag":1013,"props":5435,"children":5436},{},[5437,5463],{"type":993,"tag":1017,"props":5438,"children":5439},{},[5440],{"type":993,"tag":1021,"props":5441,"children":5442},{},[5443,5447,5451,5455,5459],{"type":993,"tag":1025,"props":5444,"children":5445},{},[5446],{"type":998,"value":4759},{"type":993,"tag":1025,"props":5448,"children":5449},{},[5450],{"type":998,"value":2426},{"type":993,"tag":1025,"props":5452,"children":5453},{},[5454],{"type":998,"value":2431},{"type":993,"tag":1025,"props":5456,"children":5457},{},[5458],{"type":998,"value":2436},{"type":993,"tag":1025,"props":5460,"children":5461},{},[5462],{"type":998,"value":1034},{"type":993,"tag":1066,"props":5464,"children":5465},{},[5466,5500,5534],{"type":993,"tag":1021,"props":5467,"children":5468},{},[5469,5477,5482,5491,5495],{"type":993,"tag":1073,"props":5470,"children":5471},{},[5472],{"type":993,"tag":1077,"props":5473,"children":5474},{},[5475],{"type":998,"value":5476},"os.remove()",{"type":993,"tag":1073,"props":5478,"children":5479},{},[5480],{"type":998,"value":5481},"Delete file",{"type":993,"tag":1073,"props":5483,"children":5484},{},[5485],{"type":993,"tag":1658,"props":5486,"children":5488},{"className":5487},[],[5489],{"type":998,"value":5490},"os.remove('file.txt')",{"type":993,"tag":1073,"props":5492,"children":5493},{},[5494],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5496,"children":5497},{},[5498],{"type":998,"value":5499},"Delete a file",{"type":993,"tag":1021,"props":5501,"children":5502},{},[5503,5511,5516,5525,5529],{"type":993,"tag":1073,"props":5504,"children":5505},{},[5506],{"type":993,"tag":1077,"props":5507,"children":5508},{},[5509],{"type":998,"value":5510},"os.rename()",{"type":993,"tag":1073,"props":5512,"children":5513},{},[5514],{"type":998,"value":5515},"Rename file/directory",{"type":993,"tag":1073,"props":5517,"children":5518},{},[5519],{"type":993,"tag":1658,"props":5520,"children":5522},{"className":5521},[],[5523],{"type":998,"value":5524},"os.rename('old.txt', 'new.txt')",{"type":993,"tag":1073,"props":5526,"children":5527},{},[5528],{"type":998,"value":2684},{"type":993,"tag":1073,"props":5530,"children":5531},{},[5532],{"type":998,"value":5533},"Rename file or directory",{"type":993,"tag":1021,"props":5535,"children":5536},{},[5537,5545,5550,5559,5564],{"type":993,"tag":1073,"props":5538,"children":5539},{},[5540],{"type":993,"tag":1077,"props":5541,"children":5542},{},[5543],{"type":998,"value":5544},"os.stat()",{"type":993,"tag":1073,"props":5546,"children":5547},{},[5548],{"type":998,"value":5549},"Get file statistics",{"type":993,"tag":1073,"props":5551,"children":5552},{},[5553],{"type":993,"tag":1658,"props":5554,"children":5556},{"className":5555},[],[5557],{"type":998,"value":5558},"os.stat('file.txt')",{"type":993,"tag":1073,"props":5560,"children":5561},{},[5562],{"type":998,"value":5563},"os.stat_result",{"type":993,"tag":1073,"props":5565,"children":5566},{},[5567],{"type":998,"value":5568},"Detailed file information",{"type":993,"tag":1006,"props":5570,"children":5572},{"id":5571},"modern-path-handling-pathlib",[5573],{"type":998,"value":5574},"Modern Path Handling (pathlib)",{"type":993,"tag":1641,"props":5576,"children":5578},{"id":5577},"path-creation-and-properties",[5579],{"type":998,"value":5580},"Path Creation and Properties",{"type":993,"tag":1013,"props":5582,"children":5583},{},[5584,5611],{"type":993,"tag":1017,"props":5585,"children":5586},{},[5587],{"type":993,"tag":1021,"props":5588,"children":5589},{},[5590,5595,5599,5603,5607],{"type":993,"tag":1025,"props":5591,"children":5592},{},[5593],{"type":998,"value":5594},"Method/Property",{"type":993,"tag":1025,"props":5596,"children":5597},{},[5598],{"type":998,"value":2426},{"type":993,"tag":1025,"props":5600,"children":5601},{},[5602],{"type":998,"value":2431},{"type":993,"tag":1025,"props":5604,"children":5605},{},[5606],{"type":998,"value":2436},{"type":993,"tag":1025,"props":5608,"children":5609},{},[5610],{"type":998,"value":1034},{"type":993,"tag":1066,"props":5612,"children":5613},{},[5614,5649,5681,5714,5747,5779,5811,5845,5878,5911,5945],{"type":993,"tag":1021,"props":5615,"children":5616},{},[5617,5625,5630,5639,5644],{"type":993,"tag":1073,"props":5618,"children":5619},{},[5620],{"type":993,"tag":1077,"props":5621,"children":5622},{},[5623],{"type":998,"value":5624},"Path()",{"type":993,"tag":1073,"props":5626,"children":5627},{},[5628],{"type":998,"value":5629},"Create path object",{"type":993,"tag":1073,"props":5631,"children":5632},{},[5633],{"type":993,"tag":1658,"props":5634,"children":5636},{"className":5635},[],[5637],{"type":998,"value":5638},"Path('file.txt')",{"type":993,"tag":1073,"props":5640,"children":5641},{},[5642],{"type":998,"value":5643},"Path",{"type":993,"tag":1073,"props":5645,"children":5646},{},[5647],{"type":998,"value":5648},"Create Path object",{"type":993,"tag":1021,"props":5650,"children":5651},{},[5652,5660,5665,5673,5677],{"type":993,"tag":1073,"props":5653,"children":5654},{},[5655],{"type":993,"tag":1077,"props":5656,"children":5657},{},[5658],{"type":998,"value":5659},"Path.cwd()",{"type":993,"tag":1073,"props":5661,"children":5662},{},[5663],{"type":998,"value":5664},"Current directory",{"type":993,"tag":1073,"props":5666,"children":5667},{},[5668],{"type":993,"tag":1658,"props":5669,"children":5671},{"className":5670},[],[5672],{"type":998,"value":5659},{"type":993,"tag":1073,"props":5674,"children":5675},{},[5676],{"type":998,"value":5643},{"type":993,"tag":1073,"props":5678,"children":5679},{},[5680],{"type":998,"value":5395},{"type":993,"tag":1021,"props":5682,"children":5683},{},[5684,5692,5697,5705,5709],{"type":993,"tag":1073,"props":5685,"children":5686},{},[5687],{"type":993,"tag":1077,"props":5688,"children":5689},{},[5690],{"type":998,"value":5691},"Path.home()",{"type":993,"tag":1073,"props":5693,"children":5694},{},[5695],{"type":998,"value":5696},"Home directory",{"type":993,"tag":1073,"props":5698,"children":5699},{},[5700],{"type":993,"tag":1658,"props":5701,"children":5703},{"className":5702},[],[5704],{"type":998,"value":5691},{"type":993,"tag":1073,"props":5706,"children":5707},{},[5708],{"type":998,"value":5643},{"type":993,"tag":1073,"props":5710,"children":5711},{},[5712],{"type":998,"value":5713},"User home directory",{"type":993,"tag":1021,"props":5715,"children":5716},{},[5717,5725,5730,5739,5743],{"type":993,"tag":1073,"props":5718,"children":5719},{},[5720],{"type":993,"tag":1077,"props":5721,"children":5722},{},[5723],{"type":998,"value":5724},"exists()",{"type":993,"tag":1073,"props":5726,"children":5727},{},[5728],{"type":998,"value":5729},"Check existence",{"type":993,"tag":1073,"props":5731,"children":5732},{},[5733],{"type":993,"tag":1658,"props":5734,"children":5736},{"className":5735},[],[5737],{"type":998,"value":5738},"path.exists()",{"type":993,"tag":1073,"props":5740,"children":5741},{},[5742],{"type":998,"value":2965},{"type":993,"tag":1073,"props":5744,"children":5745},{},[5746],{"type":998,"value":4812},{"type":993,"tag":1021,"props":5748,"children":5749},{},[5750,5758,5762,5771,5775],{"type":993,"tag":1073,"props":5751,"children":5752},{},[5753],{"type":993,"tag":1077,"props":5754,"children":5755},{},[5756],{"type":998,"value":5757},"is_file()",{"type":993,"tag":1073,"props":5759,"children":5760},{},[5761],{"type":998,"value":4828},{"type":993,"tag":1073,"props":5763,"children":5764},{},[5765],{"type":993,"tag":1658,"props":5766,"children":5768},{"className":5767},[],[5769],{"type":998,"value":5770},"path.is_file()",{"type":993,"tag":1073,"props":5772,"children":5773},{},[5774],{"type":998,"value":2965},{"type":993,"tag":1073,"props":5776,"children":5777},{},[5778],{"type":998,"value":4846},{"type":993,"tag":1021,"props":5780,"children":5781},{},[5782,5790,5794,5803,5807],{"type":993,"tag":1073,"props":5783,"children":5784},{},[5785],{"type":993,"tag":1077,"props":5786,"children":5787},{},[5788],{"type":998,"value":5789},"is_dir()",{"type":993,"tag":1073,"props":5791,"children":5792},{},[5793],{"type":998,"value":4862},{"type":993,"tag":1073,"props":5795,"children":5796},{},[5797],{"type":993,"tag":1658,"props":5798,"children":5800},{"className":5799},[],[5801],{"type":998,"value":5802},"path.is_dir()",{"type":993,"tag":1073,"props":5804,"children":5805},{},[5806],{"type":998,"value":2965},{"type":993,"tag":1073,"props":5808,"children":5809},{},[5810],{"type":998,"value":4880},{"type":993,"tag":1021,"props":5812,"children":5813},{},[5814,5822,5827,5836,5840],{"type":993,"tag":1073,"props":5815,"children":5816},{},[5817],{"type":993,"tag":1077,"props":5818,"children":5819},{},[5820],{"type":998,"value":5821},"stat()",{"type":993,"tag":1073,"props":5823,"children":5824},{},[5825],{"type":998,"value":5826},"Get file stats",{"type":993,"tag":1073,"props":5828,"children":5829},{},[5830],{"type":993,"tag":1658,"props":5831,"children":5833},{"className":5832},[],[5834],{"type":998,"value":5835},"path.stat()",{"type":993,"tag":1073,"props":5837,"children":5838},{},[5839],{"type":998,"value":5563},{"type":993,"tag":1073,"props":5841,"children":5842},{},[5843],{"type":998,"value":5844},"File statistics",{"type":993,"tag":1021,"props":5846,"children":5847},{},[5848,5856,5861,5870,5874],{"type":993,"tag":1073,"props":5849,"children":5850},{},[5851],{"type":993,"tag":1077,"props":5852,"children":5853},{},[5854],{"type":998,"value":5855},"suffix",{"type":993,"tag":1073,"props":5857,"children":5858},{},[5859],{"type":998,"value":5860},"File extension",{"type":993,"tag":1073,"props":5862,"children":5863},{},[5864],{"type":993,"tag":1658,"props":5865,"children":5867},{"className":5866},[],[5868],{"type":998,"value":5869},"path.suffix",{"type":993,"tag":1073,"props":5871,"children":5872},{},[5873],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5875,"children":5876},{},[5877],{"type":998,"value":5860},{"type":993,"tag":1021,"props":5879,"children":5880},{},[5881,5889,5894,5903,5907],{"type":993,"tag":1073,"props":5882,"children":5883},{},[5884],{"type":993,"tag":1077,"props":5885,"children":5886},{},[5887],{"type":998,"value":5888},"stem",{"type":993,"tag":1073,"props":5890,"children":5891},{},[5892],{"type":998,"value":5893},"Filename without extension",{"type":993,"tag":1073,"props":5895,"children":5896},{},[5897],{"type":993,"tag":1658,"props":5898,"children":5900},{"className":5899},[],[5901],{"type":998,"value":5902},"path.stem",{"type":993,"tag":1073,"props":5904,"children":5905},{},[5906],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5908,"children":5909},{},[5910],{"type":998,"value":5893},{"type":993,"tag":1021,"props":5912,"children":5913},{},[5914,5922,5927,5936,5940],{"type":993,"tag":1073,"props":5915,"children":5916},{},[5917],{"type":993,"tag":1077,"props":5918,"children":5919},{},[5920],{"type":998,"value":5921},"name",{"type":993,"tag":1073,"props":5923,"children":5924},{},[5925],{"type":998,"value":5926},"Full filename",{"type":993,"tag":1073,"props":5928,"children":5929},{},[5930],{"type":993,"tag":1658,"props":5931,"children":5933},{"className":5932},[],[5934],{"type":998,"value":5935},"path.name",{"type":993,"tag":1073,"props":5937,"children":5938},{},[5939],{"type":998,"value":4979},{"type":993,"tag":1073,"props":5941,"children":5942},{},[5943],{"type":998,"value":5944},"Complete filename",{"type":993,"tag":1021,"props":5946,"children":5947},{},[5948,5956,5961,5970,5974],{"type":993,"tag":1073,"props":5949,"children":5950},{},[5951],{"type":993,"tag":1077,"props":5952,"children":5953},{},[5954],{"type":998,"value":5955},"parent",{"type":993,"tag":1073,"props":5957,"children":5958},{},[5959],{"type":998,"value":5960},"Parent directory",{"type":993,"tag":1073,"props":5962,"children":5963},{},[5964],{"type":993,"tag":1658,"props":5965,"children":5967},{"className":5966},[],[5968],{"type":998,"value":5969},"path.parent",{"type":993,"tag":1073,"props":5971,"children":5972},{},[5973],{"type":998,"value":5643},{"type":993,"tag":1073,"props":5975,"children":5976},{},[5977],{"type":998,"value":5978},"Parent directory path",{"type":993,"tag":1641,"props":5980,"children":5982},{"id":5981},"path-operations-1",[5983],{"type":998,"value":4745},{"type":993,"tag":1013,"props":5985,"children":5986},{},[5987,6013],{"type":993,"tag":1017,"props":5988,"children":5989},{},[5990],{"type":993,"tag":1021,"props":5991,"children":5992},{},[5993,5997,6001,6005,6009],{"type":993,"tag":1025,"props":5994,"children":5995},{},[5996],{"type":998,"value":2421},{"type":993,"tag":1025,"props":5998,"children":5999},{},[6000],{"type":998,"value":2426},{"type":993,"tag":1025,"props":6002,"children":6003},{},[6004],{"type":998,"value":2431},{"type":993,"tag":1025,"props":6006,"children":6007},{},[6008],{"type":998,"value":2436},{"type":993,"tag":1025,"props":6010,"children":6011},{},[6012],{"type":998,"value":1034},{"type":993,"tag":1066,"props":6014,"children":6015},{},[6016,6049,6083,6116,6149],{"type":993,"tag":1021,"props":6017,"children":6018},{},[6019,6027,6032,6041,6045],{"type":993,"tag":1073,"props":6020,"children":6021},{},[6022],{"type":993,"tag":1077,"props":6023,"children":6024},{},[6025],{"type":998,"value":6026},"joinpath()",{"type":993,"tag":1073,"props":6028,"children":6029},{},[6030],{"type":998,"value":6031},"Join paths",{"type":993,"tag":1073,"props":6033,"children":6034},{},[6035],{"type":993,"tag":1658,"props":6036,"children":6038},{"className":6037},[],[6039],{"type":998,"value":6040},"path.joinpath('subdir', 'file.txt')",{"type":993,"tag":1073,"props":6042,"children":6043},{},[6044],{"type":998,"value":5643},{"type":993,"tag":1073,"props":6046,"children":6047},{},[6048],{"type":998,"value":4965},{"type":993,"tag":1021,"props":6050,"children":6051},{},[6052,6060,6065,6074,6078],{"type":993,"tag":1073,"props":6053,"children":6054},{},[6055],{"type":993,"tag":1077,"props":6056,"children":6057},{},[6058],{"type":998,"value":6059},"with_suffix()",{"type":993,"tag":1073,"props":6061,"children":6062},{},[6063],{"type":998,"value":6064},"Change extension",{"type":993,"tag":1073,"props":6066,"children":6067},{},[6068],{"type":993,"tag":1658,"props":6069,"children":6071},{"className":6070},[],[6072],{"type":998,"value":6073},"path.with_suffix('.bak')",{"type":993,"tag":1073,"props":6075,"children":6076},{},[6077],{"type":998,"value":5643},{"type":993,"tag":1073,"props":6079,"children":6080},{},[6081],{"type":998,"value":6082},"Change file extension",{"type":993,"tag":1021,"props":6084,"children":6085},{},[6086,6094,6099,6108,6112],{"type":993,"tag":1073,"props":6087,"children":6088},{},[6089],{"type":993,"tag":1077,"props":6090,"children":6091},{},[6092],{"type":998,"value":6093},"with_name()",{"type":993,"tag":1073,"props":6095,"children":6096},{},[6097],{"type":998,"value":6098},"Change filename",{"type":993,"tag":1073,"props":6100,"children":6101},{},[6102],{"type":993,"tag":1658,"props":6103,"children":6105},{"className":6104},[],[6106],{"type":998,"value":6107},"path.with_name('new.txt')",{"type":993,"tag":1073,"props":6109,"children":6110},{},[6111],{"type":998,"value":5643},{"type":993,"tag":1073,"props":6113,"children":6114},{},[6115],{"type":998,"value":6098},{"type":993,"tag":1021,"props":6117,"children":6118},{},[6119,6127,6132,6141,6145],{"type":993,"tag":1073,"props":6120,"children":6121},{},[6122],{"type":993,"tag":1077,"props":6123,"children":6124},{},[6125],{"type":998,"value":6126},"resolve()",{"type":993,"tag":1073,"props":6128,"children":6129},{},[6130],{"type":998,"value":6131},"Resolve absolute path",{"type":993,"tag":1073,"props":6133,"children":6134},{},[6135],{"type":993,"tag":1658,"props":6136,"children":6138},{"className":6137},[],[6139],{"type":998,"value":6140},"path.resolve()",{"type":993,"tag":1073,"props":6142,"children":6143},{},[6144],{"type":998,"value":5643},{"type":993,"tag":1073,"props":6146,"children":6147},{},[6148],{"type":998,"value":5155},{"type":993,"tag":1021,"props":6150,"children":6151},{},[6152,6160,6165,6174,6178],{"type":993,"tag":1073,"props":6153,"children":6154},{},[6155],{"type":993,"tag":1077,"props":6156,"children":6157},{},[6158],{"type":998,"value":6159},"relative_to()",{"type":993,"tag":1073,"props":6161,"children":6162},{},[6163],{"type":998,"value":6164},"Get relative path",{"type":993,"tag":1073,"props":6166,"children":6167},{},[6168],{"type":993,"tag":1658,"props":6169,"children":6171},{"className":6170},[],[6172],{"type":998,"value":6173},"path.relative_to(base)",{"type":993,"tag":1073,"props":6175,"children":6176},{},[6177],{"type":998,"value":5643},{"type":993,"tag":1073,"props":6179,"children":6180},{},[6181],{"type":998,"value":6182},"Path relative to base",{"type":993,"tag":1006,"props":6184,"children":6186},{"id":6185},"error-handling-in-file-operations",[6187],{"type":998,"value":6188},"Error Handling in File Operations",{"type":993,"tag":1641,"props":6190,"children":6192},{"id":6191},"common-file-exceptions",[6193],{"type":998,"value":6194},"Common File Exceptions",{"type":993,"tag":1013,"props":6196,"children":6197},{},[6198,6223],{"type":993,"tag":1017,"props":6199,"children":6200},{},[6201],{"type":993,"tag":1021,"props":6202,"children":6203},{},[6204,6209,6214,6218],{"type":993,"tag":1025,"props":6205,"children":6206},{},[6207],{"type":998,"value":6208},"Exception",{"type":993,"tag":1025,"props":6210,"children":6211},{},[6212],{"type":998,"value":6213},"Cause",{"type":993,"tag":1025,"props":6215,"children":6216},{},[6217],{"type":998,"value":2431},{"type":993,"tag":1025,"props":6219,"children":6220},{},[6221],{"type":998,"value":6222},"Solution",{"type":993,"tag":1066,"props":6224,"children":6225},{},[6226,6252,6278,6304,6330],{"type":993,"tag":1021,"props":6227,"children":6228},{},[6229,6237,6242,6247],{"type":993,"tag":1073,"props":6230,"children":6231},{},[6232],{"type":993,"tag":1077,"props":6233,"children":6234},{},[6235],{"type":998,"value":6236},"FileNotFoundError",{"type":993,"tag":1073,"props":6238,"children":6239},{},[6240],{"type":998,"value":6241},"File doesn't exist",{"type":993,"tag":1073,"props":6243,"children":6244},{},[6245],{"type":998,"value":6246},"Reading non-existent file",{"type":993,"tag":1073,"props":6248,"children":6249},{},[6250],{"type":998,"value":6251},"Check existence first",{"type":993,"tag":1021,"props":6253,"children":6254},{},[6255,6263,6268,6273],{"type":993,"tag":1073,"props":6256,"children":6257},{},[6258],{"type":993,"tag":1077,"props":6259,"children":6260},{},[6261],{"type":998,"value":6262},"PermissionError",{"type":993,"tag":1073,"props":6264,"children":6265},{},[6266],{"type":998,"value":6267},"Access denied",{"type":993,"tag":1073,"props":6269,"children":6270},{},[6271],{"type":998,"value":6272},"Writing to read-only file",{"type":993,"tag":1073,"props":6274,"children":6275},{},[6276],{"type":998,"value":6277},"Check permissions",{"type":993,"tag":1021,"props":6279,"children":6280},{},[6281,6289,6294,6299],{"type":993,"tag":1073,"props":6282,"children":6283},{},[6284],{"type":993,"tag":1077,"props":6285,"children":6286},{},[6287],{"type":998,"value":6288},"IsADirectoryError",{"type":993,"tag":1073,"props":6290,"children":6291},{},[6292],{"type":998,"value":6293},"Expected file, got directory",{"type":993,"tag":1073,"props":6295,"children":6296},{},[6297],{"type":998,"value":6298},"Opening directory as file",{"type":993,"tag":1073,"props":6300,"children":6301},{},[6302],{"type":998,"value":6303},"Check if it's a file",{"type":993,"tag":1021,"props":6305,"children":6306},{},[6307,6315,6320,6325],{"type":993,"tag":1073,"props":6308,"children":6309},{},[6310],{"type":993,"tag":1077,"props":6311,"children":6312},{},[6313],{"type":998,"value":6314},"FileExistsError",{"type":993,"tag":1073,"props":6316,"children":6317},{},[6318],{"type":998,"value":6319},"File already exists",{"type":993,"tag":1073,"props":6321,"children":6322},{},[6323],{"type":998,"value":6324},"Creating existing file with 'x' mode",{"type":993,"tag":1073,"props":6326,"children":6327},{},[6328],{"type":998,"value":6329},"Use different mode or check existence",{"type":993,"tag":1021,"props":6331,"children":6332},{},[6333,6341,6346,6351],{"type":993,"tag":1073,"props":6334,"children":6335},{},[6336],{"type":993,"tag":1077,"props":6337,"children":6338},{},[6339],{"type":998,"value":6340},"OSError",{"type":993,"tag":1073,"props":6342,"children":6343},{},[6344],{"type":998,"value":6345},"General OS error",{"type":993,"tag":1073,"props":6347,"children":6348},{},[6349],{"type":998,"value":6350},"Disk full, invalid path",{"type":993,"tag":1073,"props":6352,"children":6353},{},[6354],{"type":998,"value":6355},"Handle specific OS conditions",{"type":993,"tag":1006,"props":6357,"children":6359},{"id":6358},"file-processing-patterns",[6360],{"type":998,"value":6361},"File Processing Patterns",{"type":993,"tag":1641,"props":6363,"children":6365},{"id":6364},"large-file-processing",[6366],{"type":998,"value":6367},"Large File Processing",{"type":993,"tag":1652,"props":6369,"children":6371},{"className":1654,"code":6370,"language":6,"meta":8,"style":8},"# Process large files efficiently\ndef process_large_file(filename, chunk_size=8192):\n    \"\"\"Process large file in chunks to avoid memory issues\"\"\"\n    try:\n        with open(filename, 'r') as f:\n            while True:\n                chunk = f.read(chunk_size)\n                if not chunk:\n                    break\n                \n                # Process chunk\n                process_chunk(chunk)\n                \n    except Exception as e:\n        print(f\"Error processing large file: {e}\")\n\ndef process_chunk(chunk):\n    # Your processing logic here\n    pass\n\n# Line-by-line processing for text files\ndef process_text_file_lines(filename):\n    \"\"\"Efficiently process text file line by line\"\"\"\n    try:\n        with open(filename, 'r') as f:\n            for line_number, line in enumerate(f, 1):\n                # Process each line\n                processed_line = line.strip().upper()\n                print(f\"Line {line_number}: {processed_line}\")\n    except Exception as e:\n        print(f\"Error processing file lines: {e}\")\n",[6372],{"type":993,"tag":1658,"props":6373,"children":6374},{"__ignoreMap":8},[6375,6383,6413,6421,6433,6465,6482,6499,6517,6525,6533,6541,6549,6556,6579,6620,6627,6644,6652,6660,6667,6675,6692,6700,6711,6742,6778,6786,6803,6862,6881],{"type":993,"tag":1662,"props":6376,"children":6377},{"class":1664,"line":12},[6378],{"type":993,"tag":1662,"props":6379,"children":6380},{"style":1668},[6381],{"type":998,"value":6382},"# Process large files efficiently\n",{"type":993,"tag":1662,"props":6384,"children":6385},{"class":1664,"line":27},[6386,6390,6395,6400,6404,6409],{"type":993,"tag":1662,"props":6387,"children":6388},{"style":1677},[6389],{"type":998,"value":4546},{"type":993,"tag":1662,"props":6391,"children":6392},{"style":4549},[6393],{"type":998,"value":6394}," process_large_file",{"type":993,"tag":1662,"props":6396,"children":6397},{"style":1689},[6398],{"type":998,"value":6399},"(filename, chunk_size",{"type":993,"tag":1662,"props":6401,"children":6402},{"style":1677},[6403],{"type":998,"value":1810},{"type":993,"tag":1662,"props":6405,"children":6406},{"style":1683},[6407],{"type":998,"value":6408},"8192",{"type":993,"tag":1662,"props":6410,"children":6411},{"style":1689},[6412],{"type":998,"value":4571},{"type":993,"tag":1662,"props":6414,"children":6415},{"class":1664,"line":36},[6416],{"type":993,"tag":1662,"props":6417,"children":6418},{"style":1695},[6419],{"type":998,"value":6420},"    \"\"\"Process large file in chunks to avoid memory issues\"\"\"\n",{"type":993,"tag":1662,"props":6422,"children":6423},{"class":1664,"line":45},[6424,6429],{"type":993,"tag":1662,"props":6425,"children":6426},{"style":1677},[6427],{"type":998,"value":6428},"    try",{"type":993,"tag":1662,"props":6430,"children":6431},{"style":1689},[6432],{"type":998,"value":2294},{"type":993,"tag":1662,"props":6434,"children":6435},{"class":1664,"line":54},[6436,6441,6445,6449,6453,6457,6461],{"type":993,"tag":1662,"props":6437,"children":6438},{"style":1677},[6439],{"type":998,"value":6440},"        with",{"type":993,"tag":1662,"props":6442,"children":6443},{"style":1683},[6444],{"type":998,"value":1686},{"type":993,"tag":1662,"props":6446,"children":6447},{"style":1689},[6448],{"type":998,"value":4587},{"type":993,"tag":1662,"props":6450,"children":6451},{"style":1695},[6452],{"type":998,"value":1081},{"type":993,"tag":1662,"props":6454,"children":6455},{"style":1689},[6456],{"type":998,"value":1712},{"type":993,"tag":1662,"props":6458,"children":6459},{"style":1677},[6460],{"type":998,"value":1717},{"type":993,"tag":1662,"props":6462,"children":6463},{"style":1689},[6464],{"type":998,"value":1722},{"type":993,"tag":1662,"props":6466,"children":6467},{"class":1664,"line":63},[6468,6473,6478],{"type":993,"tag":1662,"props":6469,"children":6470},{"style":1677},[6471],{"type":998,"value":6472},"            while",{"type":993,"tag":1662,"props":6474,"children":6475},{"style":1683},[6476],{"type":998,"value":6477}," True",{"type":993,"tag":1662,"props":6479,"children":6480},{"style":1689},[6481],{"type":998,"value":2294},{"type":993,"tag":1662,"props":6483,"children":6484},{"class":1664,"line":72},[6485,6490,6494],{"type":993,"tag":1662,"props":6486,"children":6487},{"style":1689},[6488],{"type":998,"value":6489},"                chunk ",{"type":993,"tag":1662,"props":6491,"children":6492},{"style":1677},[6493],{"type":998,"value":1810},{"type":993,"tag":1662,"props":6495,"children":6496},{"style":1689},[6497],{"type":998,"value":6498}," f.read(chunk_size)\n",{"type":993,"tag":1662,"props":6500,"children":6501},{"class":1664,"line":81},[6502,6507,6512],{"type":993,"tag":1662,"props":6503,"children":6504},{"style":1677},[6505],{"type":998,"value":6506},"                if",{"type":993,"tag":1662,"props":6508,"children":6509},{"style":1677},[6510],{"type":998,"value":6511}," not",{"type":993,"tag":1662,"props":6513,"children":6514},{"style":1689},[6515],{"type":998,"value":6516}," chunk:\n",{"type":993,"tag":1662,"props":6518,"children":6519},{"class":1664,"line":91},[6520],{"type":993,"tag":1662,"props":6521,"children":6522},{"style":1677},[6523],{"type":998,"value":6524},"                    break\n",{"type":993,"tag":1662,"props":6526,"children":6527},{"class":1664,"line":100},[6528],{"type":993,"tag":1662,"props":6529,"children":6530},{"style":1689},[6531],{"type":998,"value":6532},"                \n",{"type":993,"tag":1662,"props":6534,"children":6535},{"class":1664,"line":109},[6536],{"type":993,"tag":1662,"props":6537,"children":6538},{"style":1668},[6539],{"type":998,"value":6540},"                # Process chunk\n",{"type":993,"tag":1662,"props":6542,"children":6543},{"class":1664,"line":118},[6544],{"type":993,"tag":1662,"props":6545,"children":6546},{"style":1689},[6547],{"type":998,"value":6548},"                process_chunk(chunk)\n",{"type":993,"tag":1662,"props":6550,"children":6551},{"class":1664,"line":127},[6552],{"type":993,"tag":1662,"props":6553,"children":6554},{"style":1689},[6555],{"type":998,"value":6532},{"type":993,"tag":1662,"props":6557,"children":6558},{"class":1664,"line":136},[6559,6564,6569,6574],{"type":993,"tag":1662,"props":6560,"children":6561},{"style":1677},[6562],{"type":998,"value":6563},"    except",{"type":993,"tag":1662,"props":6565,"children":6566},{"style":1683},[6567],{"type":998,"value":6568}," Exception",{"type":993,"tag":1662,"props":6570,"children":6571},{"style":1677},[6572],{"type":998,"value":6573}," as",{"type":993,"tag":1662,"props":6575,"children":6576},{"style":1689},[6577],{"type":998,"value":6578}," e:\n",{"type":993,"tag":1662,"props":6580,"children":6581},{"class":1664,"line":146},[6582,6586,6590,6594,6599,6603,6608,6612,6616],{"type":993,"tag":1662,"props":6583,"children":6584},{"style":1683},[6585],{"type":998,"value":3613},{"type":993,"tag":1662,"props":6587,"children":6588},{"style":1689},[6589],{"type":998,"value":1692},{"type":993,"tag":1662,"props":6591,"children":6592},{"style":1677},[6593],{"type":998,"value":3213},{"type":993,"tag":1662,"props":6595,"children":6596},{"style":1695},[6597],{"type":998,"value":6598},"\"Error processing large file: ",{"type":993,"tag":1662,"props":6600,"children":6601},{"style":1683},[6602],{"type":998,"value":3223},{"type":993,"tag":1662,"props":6604,"children":6605},{"style":1689},[6606],{"type":998,"value":6607},"e",{"type":993,"tag":1662,"props":6609,"children":6610},{"style":1683},[6611],{"type":998,"value":3232},{"type":993,"tag":1662,"props":6613,"children":6614},{"style":1695},[6615],{"type":998,"value":3237},{"type":993,"tag":1662,"props":6617,"children":6618},{"style":1689},[6619],{"type":998,"value":1750},{"type":993,"tag":1662,"props":6621,"children":6622},{"class":1664,"line":155},[6623],{"type":993,"tag":1662,"props":6624,"children":6625},{"emptyLinePlaceholder":13},[6626],{"type":998,"value":1758},{"type":993,"tag":1662,"props":6628,"children":6629},{"class":1664,"line":164},[6630,6634,6639],{"type":993,"tag":1662,"props":6631,"children":6632},{"style":1677},[6633],{"type":998,"value":4546},{"type":993,"tag":1662,"props":6635,"children":6636},{"style":4549},[6637],{"type":998,"value":6638}," process_chunk",{"type":993,"tag":1662,"props":6640,"children":6641},{"style":1689},[6642],{"type":998,"value":6643},"(chunk):\n",{"type":993,"tag":1662,"props":6645,"children":6646},{"class":1664,"line":173},[6647],{"type":993,"tag":1662,"props":6648,"children":6649},{"style":1668},[6650],{"type":998,"value":6651},"    # Your processing logic here\n",{"type":993,"tag":1662,"props":6653,"children":6654},{"class":1664,"line":182},[6655],{"type":993,"tag":1662,"props":6656,"children":6657},{"style":1677},[6658],{"type":998,"value":6659},"    pass\n",{"type":993,"tag":1662,"props":6661,"children":6662},{"class":1664,"line":191},[6663],{"type":993,"tag":1662,"props":6664,"children":6665},{"emptyLinePlaceholder":13},[6666],{"type":998,"value":1758},{"type":993,"tag":1662,"props":6668,"children":6669},{"class":1664,"line":201},[6670],{"type":993,"tag":1662,"props":6671,"children":6672},{"style":1668},[6673],{"type":998,"value":6674},"# Line-by-line processing for text files\n",{"type":993,"tag":1662,"props":6676,"children":6677},{"class":1664,"line":210},[6678,6682,6687],{"type":993,"tag":1662,"props":6679,"children":6680},{"style":1677},[6681],{"type":998,"value":4546},{"type":993,"tag":1662,"props":6683,"children":6684},{"style":4549},[6685],{"type":998,"value":6686}," process_text_file_lines",{"type":993,"tag":1662,"props":6688,"children":6689},{"style":1689},[6690],{"type":998,"value":6691},"(filename):\n",{"type":993,"tag":1662,"props":6693,"children":6694},{"class":1664,"line":219},[6695],{"type":993,"tag":1662,"props":6696,"children":6697},{"style":1695},[6698],{"type":998,"value":6699},"    \"\"\"Efficiently process text file line by line\"\"\"\n",{"type":993,"tag":1662,"props":6701,"children":6702},{"class":1664,"line":228},[6703,6707],{"type":993,"tag":1662,"props":6704,"children":6705},{"style":1677},[6706],{"type":998,"value":6428},{"type":993,"tag":1662,"props":6708,"children":6709},{"style":1689},[6710],{"type":998,"value":2294},{"type":993,"tag":1662,"props":6712,"children":6713},{"class":1664,"line":238},[6714,6718,6722,6726,6730,6734,6738],{"type":993,"tag":1662,"props":6715,"children":6716},{"style":1677},[6717],{"type":998,"value":6440},{"type":993,"tag":1662,"props":6719,"children":6720},{"style":1683},[6721],{"type":998,"value":1686},{"type":993,"tag":1662,"props":6723,"children":6724},{"style":1689},[6725],{"type":998,"value":4587},{"type":993,"tag":1662,"props":6727,"children":6728},{"style":1695},[6729],{"type":998,"value":1081},{"type":993,"tag":1662,"props":6731,"children":6732},{"style":1689},[6733],{"type":998,"value":1712},{"type":993,"tag":1662,"props":6735,"children":6736},{"style":1677},[6737],{"type":998,"value":1717},{"type":993,"tag":1662,"props":6739,"children":6740},{"style":1689},[6741],{"type":998,"value":1722},{"type":993,"tag":1662,"props":6743,"children":6744},{"class":1664,"line":247},[6745,6750,6755,6759,6764,6769,6774],{"type":993,"tag":1662,"props":6746,"children":6747},{"style":1677},[6748],{"type":998,"value":6749},"            for",{"type":993,"tag":1662,"props":6751,"children":6752},{"style":1689},[6753],{"type":998,"value":6754}," line_number, line ",{"type":993,"tag":1662,"props":6756,"children":6757},{"style":1677},[6758],{"type":998,"value":3595},{"type":993,"tag":1662,"props":6760,"children":6761},{"style":1683},[6762],{"type":998,"value":6763}," enumerate",{"type":993,"tag":1662,"props":6765,"children":6766},{"style":1689},[6767],{"type":998,"value":6768},"(f, ",{"type":993,"tag":1662,"props":6770,"children":6771},{"style":1683},[6772],{"type":998,"value":6773},"1",{"type":993,"tag":1662,"props":6775,"children":6776},{"style":1689},[6777],{"type":998,"value":4571},{"type":993,"tag":1662,"props":6779,"children":6780},{"class":1664,"line":256},[6781],{"type":993,"tag":1662,"props":6782,"children":6783},{"style":1668},[6784],{"type":998,"value":6785},"                # Process each line\n",{"type":993,"tag":1662,"props":6787,"children":6788},{"class":1664,"line":265},[6789,6794,6798],{"type":993,"tag":1662,"props":6790,"children":6791},{"style":1689},[6792],{"type":998,"value":6793},"                processed_line ",{"type":993,"tag":1662,"props":6795,"children":6796},{"style":1677},[6797],{"type":998,"value":1810},{"type":993,"tag":1662,"props":6799,"children":6800},{"style":1689},[6801],{"type":998,"value":6802}," line.strip().upper()\n",{"type":993,"tag":1662,"props":6804,"children":6805},{"class":1664,"line":274},[6806,6811,6815,6819,6824,6828,6833,6837,6841,6845,6850,6854,6858],{"type":993,"tag":1662,"props":6807,"children":6808},{"style":1683},[6809],{"type":998,"value":6810},"                print",{"type":993,"tag":1662,"props":6812,"children":6813},{"style":1689},[6814],{"type":998,"value":1692},{"type":993,"tag":1662,"props":6816,"children":6817},{"style":1677},[6818],{"type":998,"value":3213},{"type":993,"tag":1662,"props":6820,"children":6821},{"style":1695},[6822],{"type":998,"value":6823},"\"Line ",{"type":993,"tag":1662,"props":6825,"children":6826},{"style":1683},[6827],{"type":998,"value":3223},{"type":993,"tag":1662,"props":6829,"children":6830},{"style":1689},[6831],{"type":998,"value":6832},"line_number",{"type":993,"tag":1662,"props":6834,"children":6835},{"style":1683},[6836],{"type":998,"value":3232},{"type":993,"tag":1662,"props":6838,"children":6839},{"style":1695},[6840],{"type":998,"value":4256},{"type":993,"tag":1662,"props":6842,"children":6843},{"style":1683},[6844],{"type":998,"value":3223},{"type":993,"tag":1662,"props":6846,"children":6847},{"style":1689},[6848],{"type":998,"value":6849},"processed_line",{"type":993,"tag":1662,"props":6851,"children":6852},{"style":1683},[6853],{"type":998,"value":3232},{"type":993,"tag":1662,"props":6855,"children":6856},{"style":1695},[6857],{"type":998,"value":3237},{"type":993,"tag":1662,"props":6859,"children":6860},{"style":1689},[6861],{"type":998,"value":1750},{"type":993,"tag":1662,"props":6863,"children":6864},{"class":1664,"line":284},[6865,6869,6873,6877],{"type":993,"tag":1662,"props":6866,"children":6867},{"style":1677},[6868],{"type":998,"value":6563},{"type":993,"tag":1662,"props":6870,"children":6871},{"style":1683},[6872],{"type":998,"value":6568},{"type":993,"tag":1662,"props":6874,"children":6875},{"style":1677},[6876],{"type":998,"value":6573},{"type":993,"tag":1662,"props":6878,"children":6879},{"style":1689},[6880],{"type":998,"value":6578},{"type":993,"tag":1662,"props":6882,"children":6883},{"class":1664,"line":293},[6884,6888,6892,6896,6901,6905,6909,6913,6917],{"type":993,"tag":1662,"props":6885,"children":6886},{"style":1683},[6887],{"type":998,"value":3613},{"type":993,"tag":1662,"props":6889,"children":6890},{"style":1689},[6891],{"type":998,"value":1692},{"type":993,"tag":1662,"props":6893,"children":6894},{"style":1677},[6895],{"type":998,"value":3213},{"type":993,"tag":1662,"props":6897,"children":6898},{"style":1695},[6899],{"type":998,"value":6900},"\"Error processing file lines: ",{"type":993,"tag":1662,"props":6902,"children":6903},{"style":1683},[6904],{"type":998,"value":3223},{"type":993,"tag":1662,"props":6906,"children":6907},{"style":1689},[6908],{"type":998,"value":6607},{"type":993,"tag":1662,"props":6910,"children":6911},{"style":1683},[6912],{"type":998,"value":3232},{"type":993,"tag":1662,"props":6914,"children":6915},{"style":1695},[6916],{"type":998,"value":3237},{"type":993,"tag":1662,"props":6918,"children":6919},{"style":1689},[6920],{"type":998,"value":1750},{"type":993,"tag":1641,"props":6922,"children":6924},{"id":6923},"file-backup-and-versioning",[6925],{"type":998,"value":6926},"File Backup and Versioning",{"type":993,"tag":1652,"props":6928,"children":6930},{"className":1654,"code":6929,"language":6,"meta":8,"style":8},"import shutil\nfrom datetime import datetime\n\ndef create_backup(filename):\n    \"\"\"Create timestamped backup of file\"\"\"\n    if not os.path.exists(filename):\n        return None\n    \n    timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')\n    name, ext = os.path.splitext(filename)\n    backup_name = f\"{name}_backup_{timestamp}{ext}\"\n    \n    try:\n        shutil.copy2(filename, backup_name)\n        return backup_name\n    except Exception as e:\n        print(f\"Backup failed: {e}\")\n        return None\n\ndef safe_file_write(filename, content):\n    \"\"\"Write file with backup\"\"\"\n    backup = None\n    if os.path.exists(filename):\n        backup = create_backup(filename)\n    \n    try:\n        with open(filename, 'w') as f:\n            f.write(content)\n        print(f\"File written successfully: {filename}\")\n        return True\n    except Exception as e:\n        print(f\"Write failed: {e}\")\n        if backup:\n            print(f\"Backup available: {backup}\")\n        return False\n",[6931],{"type":993,"tag":1658,"props":6932,"children":6933},{"__ignoreMap":8},[6934,6947,6969,6976,6992,7000,7017,7030,7037,7073,7090,7155,7162,7173,7181,7193,7212,7252,7263,7270,7287,7295,7311,7322,7339,7346,7357,7388,7396,7437,7449,7468,7508,7521,7563],{"type":993,"tag":1662,"props":6935,"children":6936},{"class":1664,"line":12},[6937,6942],{"type":993,"tag":1662,"props":6938,"children":6939},{"style":1677},[6940],{"type":998,"value":6941},"import",{"type":993,"tag":1662,"props":6943,"children":6944},{"style":1689},[6945],{"type":998,"value":6946}," shutil\n",{"type":993,"tag":1662,"props":6948,"children":6949},{"class":1664,"line":27},[6950,6955,6960,6964],{"type":993,"tag":1662,"props":6951,"children":6952},{"style":1677},[6953],{"type":998,"value":6954},"from",{"type":993,"tag":1662,"props":6956,"children":6957},{"style":1689},[6958],{"type":998,"value":6959}," datetime ",{"type":993,"tag":1662,"props":6961,"children":6962},{"style":1677},[6963],{"type":998,"value":6941},{"type":993,"tag":1662,"props":6965,"children":6966},{"style":1689},[6967],{"type":998,"value":6968}," datetime\n",{"type":993,"tag":1662,"props":6970,"children":6971},{"class":1664,"line":36},[6972],{"type":993,"tag":1662,"props":6973,"children":6974},{"emptyLinePlaceholder":13},[6975],{"type":998,"value":1758},{"type":993,"tag":1662,"props":6977,"children":6978},{"class":1664,"line":45},[6979,6983,6988],{"type":993,"tag":1662,"props":6980,"children":6981},{"style":1677},[6982],{"type":998,"value":4546},{"type":993,"tag":1662,"props":6984,"children":6985},{"style":4549},[6986],{"type":998,"value":6987}," create_backup",{"type":993,"tag":1662,"props":6989,"children":6990},{"style":1689},[6991],{"type":998,"value":6691},{"type":993,"tag":1662,"props":6993,"children":6994},{"class":1664,"line":54},[6995],{"type":993,"tag":1662,"props":6996,"children":6997},{"style":1695},[6998],{"type":998,"value":6999},"    \"\"\"Create timestamped backup of file\"\"\"\n",{"type":993,"tag":1662,"props":7001,"children":7002},{"class":1664,"line":63},[7003,7008,7012],{"type":993,"tag":1662,"props":7004,"children":7005},{"style":1677},[7006],{"type":998,"value":7007},"    if",{"type":993,"tag":1662,"props":7009,"children":7010},{"style":1677},[7011],{"type":998,"value":6511},{"type":993,"tag":1662,"props":7013,"children":7014},{"style":1689},[7015],{"type":998,"value":7016}," os.path.exists(filename):\n",{"type":993,"tag":1662,"props":7018,"children":7019},{"class":1664,"line":72},[7020,7025],{"type":993,"tag":1662,"props":7021,"children":7022},{"style":1677},[7023],{"type":998,"value":7024},"        return",{"type":993,"tag":1662,"props":7026,"children":7027},{"style":1683},[7028],{"type":998,"value":7029}," None\n",{"type":993,"tag":1662,"props":7031,"children":7032},{"class":1664,"line":81},[7033],{"type":993,"tag":1662,"props":7034,"children":7035},{"style":1689},[7036],{"type":998,"value":3530},{"type":993,"tag":1662,"props":7038,"children":7039},{"class":1664,"line":91},[7040,7045,7049,7054,7059,7064,7069],{"type":993,"tag":1662,"props":7041,"children":7042},{"style":1689},[7043],{"type":998,"value":7044},"    timestamp ",{"type":993,"tag":1662,"props":7046,"children":7047},{"style":1677},[7048],{"type":998,"value":1810},{"type":993,"tag":1662,"props":7050,"children":7051},{"style":1689},[7052],{"type":998,"value":7053}," datetime.now().strftime(",{"type":993,"tag":1662,"props":7055,"children":7056},{"style":1695},[7057],{"type":998,"value":7058},"'%Y%m",{"type":993,"tag":1662,"props":7060,"children":7061},{"style":1683},[7062],{"type":998,"value":7063},"%d",{"type":993,"tag":1662,"props":7065,"children":7066},{"style":1695},[7067],{"type":998,"value":7068},"_%H%M%S'",{"type":993,"tag":1662,"props":7070,"children":7071},{"style":1689},[7072],{"type":998,"value":1750},{"type":993,"tag":1662,"props":7074,"children":7075},{"class":1664,"line":100},[7076,7081,7085],{"type":993,"tag":1662,"props":7077,"children":7078},{"style":1689},[7079],{"type":998,"value":7080},"    name, ext ",{"type":993,"tag":1662,"props":7082,"children":7083},{"style":1677},[7084],{"type":998,"value":1810},{"type":993,"tag":1662,"props":7086,"children":7087},{"style":1689},[7088],{"type":998,"value":7089}," os.path.splitext(filename)\n",{"type":993,"tag":1662,"props":7091,"children":7092},{"class":1664,"line":109},[7093,7098,7102,7107,7111,7115,7119,7123,7128,7132,7136,7141,7146,7150],{"type":993,"tag":1662,"props":7094,"children":7095},{"style":1689},[7096],{"type":998,"value":7097},"    backup_name ",{"type":993,"tag":1662,"props":7099,"children":7100},{"style":1677},[7101],{"type":998,"value":1810},{"type":993,"tag":1662,"props":7103,"children":7104},{"style":1677},[7105],{"type":998,"value":7106}," f",{"type":993,"tag":1662,"props":7108,"children":7109},{"style":1695},[7110],{"type":998,"value":3237},{"type":993,"tag":1662,"props":7112,"children":7113},{"style":1683},[7114],{"type":998,"value":3223},{"type":993,"tag":1662,"props":7116,"children":7117},{"style":1689},[7118],{"type":998,"value":5921},{"type":993,"tag":1662,"props":7120,"children":7121},{"style":1683},[7122],{"type":998,"value":3232},{"type":993,"tag":1662,"props":7124,"children":7125},{"style":1695},[7126],{"type":998,"value":7127},"_backup_",{"type":993,"tag":1662,"props":7129,"children":7130},{"style":1683},[7131],{"type":998,"value":3223},{"type":993,"tag":1662,"props":7133,"children":7134},{"style":1689},[7135],{"type":998,"value":4663},{"type":993,"tag":1662,"props":7137,"children":7138},{"style":1683},[7139],{"type":998,"value":7140},"}{",{"type":993,"tag":1662,"props":7142,"children":7143},{"style":1689},[7144],{"type":998,"value":7145},"ext",{"type":993,"tag":1662,"props":7147,"children":7148},{"style":1683},[7149],{"type":998,"value":3232},{"type":993,"tag":1662,"props":7151,"children":7152},{"style":1695},[7153],{"type":998,"value":7154},"\"\n",{"type":993,"tag":1662,"props":7156,"children":7157},{"class":1664,"line":118},[7158],{"type":993,"tag":1662,"props":7159,"children":7160},{"style":1689},[7161],{"type":998,"value":3530},{"type":993,"tag":1662,"props":7163,"children":7164},{"class":1664,"line":127},[7165,7169],{"type":993,"tag":1662,"props":7166,"children":7167},{"style":1677},[7168],{"type":998,"value":6428},{"type":993,"tag":1662,"props":7170,"children":7171},{"style":1689},[7172],{"type":998,"value":2294},{"type":993,"tag":1662,"props":7174,"children":7175},{"class":1664,"line":136},[7176],{"type":993,"tag":1662,"props":7177,"children":7178},{"style":1689},[7179],{"type":998,"value":7180},"        shutil.copy2(filename, backup_name)\n",{"type":993,"tag":1662,"props":7182,"children":7183},{"class":1664,"line":146},[7184,7188],{"type":993,"tag":1662,"props":7185,"children":7186},{"style":1677},[7187],{"type":998,"value":7024},{"type":993,"tag":1662,"props":7189,"children":7190},{"style":1689},[7191],{"type":998,"value":7192}," backup_name\n",{"type":993,"tag":1662,"props":7194,"children":7195},{"class":1664,"line":155},[7196,7200,7204,7208],{"type":993,"tag":1662,"props":7197,"children":7198},{"style":1677},[7199],{"type":998,"value":6563},{"type":993,"tag":1662,"props":7201,"children":7202},{"style":1683},[7203],{"type":998,"value":6568},{"type":993,"tag":1662,"props":7205,"children":7206},{"style":1677},[7207],{"type":998,"value":6573},{"type":993,"tag":1662,"props":7209,"children":7210},{"style":1689},[7211],{"type":998,"value":6578},{"type":993,"tag":1662,"props":7213,"children":7214},{"class":1664,"line":164},[7215,7219,7223,7227,7232,7236,7240,7244,7248],{"type":993,"tag":1662,"props":7216,"children":7217},{"style":1683},[7218],{"type":998,"value":3613},{"type":993,"tag":1662,"props":7220,"children":7221},{"style":1689},[7222],{"type":998,"value":1692},{"type":993,"tag":1662,"props":7224,"children":7225},{"style":1677},[7226],{"type":998,"value":3213},{"type":993,"tag":1662,"props":7228,"children":7229},{"style":1695},[7230],{"type":998,"value":7231},"\"Backup failed: ",{"type":993,"tag":1662,"props":7233,"children":7234},{"style":1683},[7235],{"type":998,"value":3223},{"type":993,"tag":1662,"props":7237,"children":7238},{"style":1689},[7239],{"type":998,"value":6607},{"type":993,"tag":1662,"props":7241,"children":7242},{"style":1683},[7243],{"type":998,"value":3232},{"type":993,"tag":1662,"props":7245,"children":7246},{"style":1695},[7247],{"type":998,"value":3237},{"type":993,"tag":1662,"props":7249,"children":7250},{"style":1689},[7251],{"type":998,"value":1750},{"type":993,"tag":1662,"props":7253,"children":7254},{"class":1664,"line":173},[7255,7259],{"type":993,"tag":1662,"props":7256,"children":7257},{"style":1677},[7258],{"type":998,"value":7024},{"type":993,"tag":1662,"props":7260,"children":7261},{"style":1683},[7262],{"type":998,"value":7029},{"type":993,"tag":1662,"props":7264,"children":7265},{"class":1664,"line":182},[7266],{"type":993,"tag":1662,"props":7267,"children":7268},{"emptyLinePlaceholder":13},[7269],{"type":998,"value":1758},{"type":993,"tag":1662,"props":7271,"children":7272},{"class":1664,"line":191},[7273,7277,7282],{"type":993,"tag":1662,"props":7274,"children":7275},{"style":1677},[7276],{"type":998,"value":4546},{"type":993,"tag":1662,"props":7278,"children":7279},{"style":4549},[7280],{"type":998,"value":7281}," safe_file_write",{"type":993,"tag":1662,"props":7283,"children":7284},{"style":1689},[7285],{"type":998,"value":7286},"(filename, content):\n",{"type":993,"tag":1662,"props":7288,"children":7289},{"class":1664,"line":201},[7290],{"type":993,"tag":1662,"props":7291,"children":7292},{"style":1695},[7293],{"type":998,"value":7294},"    \"\"\"Write file with backup\"\"\"\n",{"type":993,"tag":1662,"props":7296,"children":7297},{"class":1664,"line":210},[7298,7303,7307],{"type":993,"tag":1662,"props":7299,"children":7300},{"style":1689},[7301],{"type":998,"value":7302},"    backup ",{"type":993,"tag":1662,"props":7304,"children":7305},{"style":1677},[7306],{"type":998,"value":1810},{"type":993,"tag":1662,"props":7308,"children":7309},{"style":1683},[7310],{"type":998,"value":7029},{"type":993,"tag":1662,"props":7312,"children":7313},{"class":1664,"line":219},[7314,7318],{"type":993,"tag":1662,"props":7315,"children":7316},{"style":1677},[7317],{"type":998,"value":7007},{"type":993,"tag":1662,"props":7319,"children":7320},{"style":1689},[7321],{"type":998,"value":7016},{"type":993,"tag":1662,"props":7323,"children":7324},{"class":1664,"line":228},[7325,7330,7334],{"type":993,"tag":1662,"props":7326,"children":7327},{"style":1689},[7328],{"type":998,"value":7329},"        backup ",{"type":993,"tag":1662,"props":7331,"children":7332},{"style":1677},[7333],{"type":998,"value":1810},{"type":993,"tag":1662,"props":7335,"children":7336},{"style":1689},[7337],{"type":998,"value":7338}," create_backup(filename)\n",{"type":993,"tag":1662,"props":7340,"children":7341},{"class":1664,"line":238},[7342],{"type":993,"tag":1662,"props":7343,"children":7344},{"style":1689},[7345],{"type":998,"value":3530},{"type":993,"tag":1662,"props":7347,"children":7348},{"class":1664,"line":247},[7349,7353],{"type":993,"tag":1662,"props":7350,"children":7351},{"style":1677},[7352],{"type":998,"value":6428},{"type":993,"tag":1662,"props":7354,"children":7355},{"style":1689},[7356],{"type":998,"value":2294},{"type":993,"tag":1662,"props":7358,"children":7359},{"class":1664,"line":256},[7360,7364,7368,7372,7376,7380,7384],{"type":993,"tag":1662,"props":7361,"children":7362},{"style":1677},[7363],{"type":998,"value":6440},{"type":993,"tag":1662,"props":7365,"children":7366},{"style":1683},[7367],{"type":998,"value":1686},{"type":993,"tag":1662,"props":7369,"children":7370},{"style":1689},[7371],{"type":998,"value":4587},{"type":993,"tag":1662,"props":7373,"children":7374},{"style":1695},[7375],{"type":998,"value":1124},{"type":993,"tag":1662,"props":7377,"children":7378},{"style":1689},[7379],{"type":998,"value":1712},{"type":993,"tag":1662,"props":7381,"children":7382},{"style":1677},[7383],{"type":998,"value":1717},{"type":993,"tag":1662,"props":7385,"children":7386},{"style":1689},[7387],{"type":998,"value":1722},{"type":993,"tag":1662,"props":7389,"children":7390},{"class":1664,"line":265},[7391],{"type":993,"tag":1662,"props":7392,"children":7393},{"style":1689},[7394],{"type":998,"value":7395},"            f.write(content)\n",{"type":993,"tag":1662,"props":7397,"children":7398},{"class":1664,"line":274},[7399,7403,7407,7411,7416,7420,7425,7429,7433],{"type":993,"tag":1662,"props":7400,"children":7401},{"style":1683},[7402],{"type":998,"value":3613},{"type":993,"tag":1662,"props":7404,"children":7405},{"style":1689},[7406],{"type":998,"value":1692},{"type":993,"tag":1662,"props":7408,"children":7409},{"style":1677},[7410],{"type":998,"value":3213},{"type":993,"tag":1662,"props":7412,"children":7413},{"style":1695},[7414],{"type":998,"value":7415},"\"File written successfully: ",{"type":993,"tag":1662,"props":7417,"children":7418},{"style":1683},[7419],{"type":998,"value":3223},{"type":993,"tag":1662,"props":7421,"children":7422},{"style":1689},[7423],{"type":998,"value":7424},"filename",{"type":993,"tag":1662,"props":7426,"children":7427},{"style":1683},[7428],{"type":998,"value":3232},{"type":993,"tag":1662,"props":7430,"children":7431},{"style":1695},[7432],{"type":998,"value":3237},{"type":993,"tag":1662,"props":7434,"children":7435},{"style":1689},[7436],{"type":998,"value":1750},{"type":993,"tag":1662,"props":7438,"children":7439},{"class":1664,"line":284},[7440,7444],{"type":993,"tag":1662,"props":7441,"children":7442},{"style":1677},[7443],{"type":998,"value":7024},{"type":993,"tag":1662,"props":7445,"children":7446},{"style":1683},[7447],{"type":998,"value":7448}," True\n",{"type":993,"tag":1662,"props":7450,"children":7451},{"class":1664,"line":293},[7452,7456,7460,7464],{"type":993,"tag":1662,"props":7453,"children":7454},{"style":1677},[7455],{"type":998,"value":6563},{"type":993,"tag":1662,"props":7457,"children":7458},{"style":1683},[7459],{"type":998,"value":6568},{"type":993,"tag":1662,"props":7461,"children":7462},{"style":1677},[7463],{"type":998,"value":6573},{"type":993,"tag":1662,"props":7465,"children":7466},{"style":1689},[7467],{"type":998,"value":6578},{"type":993,"tag":1662,"props":7469,"children":7470},{"class":1664,"line":302},[7471,7475,7479,7483,7488,7492,7496,7500,7504],{"type":993,"tag":1662,"props":7472,"children":7473},{"style":1683},[7474],{"type":998,"value":3613},{"type":993,"tag":1662,"props":7476,"children":7477},{"style":1689},[7478],{"type":998,"value":1692},{"type":993,"tag":1662,"props":7480,"children":7481},{"style":1677},[7482],{"type":998,"value":3213},{"type":993,"tag":1662,"props":7484,"children":7485},{"style":1695},[7486],{"type":998,"value":7487},"\"Write failed: ",{"type":993,"tag":1662,"props":7489,"children":7490},{"style":1683},[7491],{"type":998,"value":3223},{"type":993,"tag":1662,"props":7493,"children":7494},{"style":1689},[7495],{"type":998,"value":6607},{"type":993,"tag":1662,"props":7497,"children":7498},{"style":1683},[7499],{"type":998,"value":3232},{"type":993,"tag":1662,"props":7501,"children":7502},{"style":1695},[7503],{"type":998,"value":3237},{"type":993,"tag":1662,"props":7505,"children":7506},{"style":1689},[7507],{"type":998,"value":1750},{"type":993,"tag":1662,"props":7509,"children":7510},{"class":1664,"line":311},[7511,7516],{"type":993,"tag":1662,"props":7512,"children":7513},{"style":1677},[7514],{"type":998,"value":7515},"        if",{"type":993,"tag":1662,"props":7517,"children":7518},{"style":1689},[7519],{"type":998,"value":7520}," backup:\n",{"type":993,"tag":1662,"props":7522,"children":7523},{"class":1664,"line":320},[7524,7529,7533,7537,7542,7546,7551,7555,7559],{"type":993,"tag":1662,"props":7525,"children":7526},{"style":1683},[7527],{"type":998,"value":7528},"            print",{"type":993,"tag":1662,"props":7530,"children":7531},{"style":1689},[7532],{"type":998,"value":1692},{"type":993,"tag":1662,"props":7534,"children":7535},{"style":1677},[7536],{"type":998,"value":3213},{"type":993,"tag":1662,"props":7538,"children":7539},{"style":1695},[7540],{"type":998,"value":7541},"\"Backup available: ",{"type":993,"tag":1662,"props":7543,"children":7544},{"style":1683},[7545],{"type":998,"value":3223},{"type":993,"tag":1662,"props":7547,"children":7548},{"style":1689},[7549],{"type":998,"value":7550},"backup",{"type":993,"tag":1662,"props":7552,"children":7553},{"style":1683},[7554],{"type":998,"value":3232},{"type":993,"tag":1662,"props":7556,"children":7557},{"style":1695},[7558],{"type":998,"value":3237},{"type":993,"tag":1662,"props":7560,"children":7561},{"style":1689},[7562],{"type":998,"value":1750},{"type":993,"tag":1662,"props":7564,"children":7565},{"class":1664,"line":329},[7566,7570],{"type":993,"tag":1662,"props":7567,"children":7568},{"style":1677},[7569],{"type":998,"value":7024},{"type":993,"tag":1662,"props":7571,"children":7572},{"style":1683},[7573],{"type":998,"value":7574}," False\n",{"type":993,"tag":1006,"props":7576,"children":7578},{"id":7577},"best-practices",[7579],{"type":998,"value":7580},"Best Practices",{"type":993,"tag":7582,"props":7583,"children":7584},"ul",{},[7585,7603,7613,7623,7633,7643,7653,7663,7673],{"type":993,"tag":7586,"props":7587,"children":7588},"li",{},[7589,7594,7596,7601],{"type":993,"tag":1077,"props":7590,"children":7591},{},[7592],{"type":998,"value":7593},"Always use context managers",{"type":998,"value":7595},": Use ",{"type":993,"tag":1658,"props":7597,"children":7599},{"className":7598},[],[7600],{"type":998,"value":1680},{"type":998,"value":7602}," statement for automatic file closing",{"type":993,"tag":7586,"props":7604,"children":7605},{},[7606,7611],{"type":993,"tag":1077,"props":7607,"children":7608},{},[7609],{"type":998,"value":7610},"Handle exceptions appropriately",{"type":998,"value":7612},": Anticipate and handle file-related errors",{"type":993,"tag":7586,"props":7614,"children":7615},{},[7616,7621],{"type":993,"tag":1077,"props":7617,"children":7618},{},[7619],{"type":998,"value":7620},"Choose correct file modes",{"type":998,"value":7622},": Understand the differences between text and binary modes",{"type":993,"tag":7586,"props":7624,"children":7625},{},[7626,7631],{"type":993,"tag":1077,"props":7627,"children":7628},{},[7629],{"type":998,"value":7630},"Use pathlib for path operations",{"type":998,"value":7632},": More modern and cross-platform than os.path",{"type":993,"tag":7586,"props":7634,"children":7635},{},[7636,7641],{"type":993,"tag":1077,"props":7637,"children":7638},{},[7639],{"type":998,"value":7640},"Process large files efficiently",{"type":998,"value":7642},": Read in chunks to avoid memory issues",{"type":993,"tag":7586,"props":7644,"children":7645},{},[7646,7651],{"type":993,"tag":1077,"props":7647,"children":7648},{},[7649],{"type":998,"value":7650},"Validate file paths",{"type":998,"value":7652},": Check existence and permissions before operations",{"type":993,"tag":7586,"props":7654,"children":7655},{},[7656,7661],{"type":993,"tag":1077,"props":7657,"children":7658},{},[7659],{"type":998,"value":7660},"Use appropriate encodings",{"type":998,"value":7662},": Specify encoding explicitly for text files",{"type":993,"tag":7586,"props":7664,"children":7665},{},[7666,7671],{"type":993,"tag":1077,"props":7667,"children":7668},{},[7669],{"type":998,"value":7670},"Close files properly",{"type":998,"value":7672},": Even with context managers, be aware of resource management",{"type":993,"tag":7586,"props":7674,"children":7675},{},[7676,7681],{"type":993,"tag":1077,"props":7677,"children":7678},{},[7679],{"type":998,"value":7680},"Consider atomic operations",{"type":998,"value":7682},": Use temporary files for critical data operations",{"type":993,"tag":7684,"props":7685,"children":7686},"style",{},[7687],{"type":998,"value":7688},"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":7690},[7691,7694,7701,7705,7710,7714,7717,7721],{"id":1008,"depth":27,"text":1011,"children":7692},[7693],{"id":1643,"depth":36,"text":1646},{"id":2398,"depth":27,"text":2401,"children":7695},[7696,7697,7698,7699,7700],{"id":2404,"depth":36,"text":2407},{"id":2584,"depth":36,"text":2587},{"id":2726,"depth":36,"text":2729},{"id":2866,"depth":36,"text":2869},{"id":3075,"depth":36,"text":3078},{"id":3972,"depth":27,"text":3975,"children":7702},[7703,7704],{"id":3978,"depth":36,"text":3981},{"id":4419,"depth":36,"text":4422},{"id":4736,"depth":27,"text":4739,"children":7706},[7707,7708,7709],{"id":4742,"depth":36,"text":4745},{"id":5158,"depth":36,"text":5161},{"id":811,"depth":36,"text":809},{"id":5571,"depth":27,"text":5574,"children":7711},[7712,7713],{"id":5577,"depth":36,"text":5580},{"id":5981,"depth":36,"text":4745},{"id":6185,"depth":27,"text":6188,"children":7715},[7716],{"id":6191,"depth":36,"text":6194},{"id":6358,"depth":27,"text":6361,"children":7718},[7719,7720],{"id":6364,"depth":36,"text":6367},{"id":6923,"depth":36,"text":6926},{"id":7577,"depth":27,"text":7580},1782373730994]