[{"data":1,"prerenderedAt":9580},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/writing-files":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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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,"expanded":13},"/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",[835],{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"body":989,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},{"type":990,"children":991,"toc":9565},"root",[992,1001,1007,1012,1959,1966,1971,2260,2267,2272,3464,3470,3475,4924,4930,4935,5834,5840,5845,6022,6028,6904,6910,6915,8408,8414,8419,9212,9218,9223,9508,9513,9518,9524,9529,9536,9542,9547,9559],{"type":993,"tag":994,"props":995,"children":997},"element","h1",{"id":996},"️-writing-files",[998],{"type":999,"value":1000},"text","✍️ Writing Files",{"type":993,"tag":1002,"props":1003,"children":1004},"p",{},[1005],{"type":999,"value":1006},"Writing files in Python is like giving your program the ability to save important information for later use. Whether you're creating a shopping list, saving game scores, or generating reports, file writing lets your program remember things between runs.",{"type":993,"tag":1002,"props":1008,"children":1009},{},[1010],{"type":999,"value":1011},"Think of file writing as your program's way to create digital notes - it can save data, create documents, and share information with other programs or users.",{"type":993,"tag":1013,"props":1014,"children":1015},"code-try",{},[1016],{"type":993,"tag":1017,"props":1018,"children":1021},"pre",{"className":1019,"code":1020,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# 🎯 File Writing Demo\n\n# Method 1: Create a simple text file\nprint(\"📝 Creating a simple file:\")\nwith open(\"my_notes.txt\", \"w\") as file:\n    file.write(\"Welcome to Python file writing!\\n\")\n    file.write(\"This is my first saved note.\\n\")\n    file.write(\"File writing is very useful!\")\n\n# Read it back to verify\nwith open(\"my_notes.txt\", \"r\") as file:\n    content = file.read()\n    print(\"📄 File content:\")\n    print(content)\n\n# Method 2: Append more content\nprint(\"\\n➕ Adding more content:\")\nwith open(\"my_notes.txt\", \"a\") as file:\n    file.write(\"\\n\\nThis line was added later.\")\n    file.write(\"\\nAppending keeps existing content safe!\")\n\n# Read the updated file\nwith open(\"my_notes.txt\", \"r\") as file:\n    updated_content = file.read()\n    print(\"📄 Updated content:\")\n    print(updated_content)\n\n# Method 3: Writing different data types\nprint(\"\\n💾 Saving user data:\")\nuser_info = {\"name\": \"Alice\", \"age\": 25, \"city\": \"New York\"}\n\nwith open(\"user_info.txt\", \"w\") as file:\n    file.write(f\"User Information\\n\")\n    file.write(f\"Name: {user_info['name']}\\n\")\n    file.write(f\"Age: {user_info['age']}\\n\")\n    file.write(f\"City: {user_info['city']}\\n\")\n\nprint(\"✅ User data saved successfully!\")\n",[1022],{"type":993,"tag":1023,"props":1024,"children":1025},"code",{"__ignoreMap":8},[1026,1037,1045,1053,1079,1133,1165,1193,1213,1220,1228,1272,1294,1315,1327,1334,1342,1370,1414,1443,1471,1478,1486,1529,1549,1569,1581,1588,1596,1624,1697,1704,1748,1781,1834,1883,1932,1939],{"type":993,"tag":1027,"props":1028,"children":1030},"span",{"class":1029,"line":12},"line",[1031],{"type":993,"tag":1027,"props":1032,"children":1034},{"style":1033},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1035],{"type":999,"value":1036},"# 🎯 File Writing Demo\n",{"type":993,"tag":1027,"props":1038,"children":1039},{"class":1029,"line":27},[1040],{"type":993,"tag":1027,"props":1041,"children":1042},{"emptyLinePlaceholder":13},[1043],{"type":999,"value":1044},"\n",{"type":993,"tag":1027,"props":1046,"children":1047},{"class":1029,"line":36},[1048],{"type":993,"tag":1027,"props":1049,"children":1050},{"style":1033},[1051],{"type":999,"value":1052},"# Method 1: Create a simple text file\n",{"type":993,"tag":1027,"props":1054,"children":1055},{"class":1029,"line":45},[1056,1062,1068,1074],{"type":993,"tag":1027,"props":1057,"children":1059},{"style":1058},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1060],{"type":999,"value":1061},"print",{"type":993,"tag":1027,"props":1063,"children":1065},{"style":1064},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1066],{"type":999,"value":1067},"(",{"type":993,"tag":1027,"props":1069,"children":1071},{"style":1070},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1072],{"type":999,"value":1073},"\"📝 Creating a simple file:\"",{"type":993,"tag":1027,"props":1075,"children":1076},{"style":1064},[1077],{"type":999,"value":1078},")\n",{"type":993,"tag":1027,"props":1080,"children":1081},{"class":1029,"line":54},[1082,1088,1093,1097,1102,1107,1112,1117,1122,1128],{"type":993,"tag":1027,"props":1083,"children":1085},{"style":1084},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1086],{"type":999,"value":1087},"with",{"type":993,"tag":1027,"props":1089,"children":1090},{"style":1058},[1091],{"type":999,"value":1092}," open",{"type":993,"tag":1027,"props":1094,"children":1095},{"style":1064},[1096],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1098,"children":1099},{"style":1070},[1100],{"type":999,"value":1101},"\"my_notes.txt\"",{"type":993,"tag":1027,"props":1103,"children":1104},{"style":1064},[1105],{"type":999,"value":1106},", ",{"type":993,"tag":1027,"props":1108,"children":1109},{"style":1070},[1110],{"type":999,"value":1111},"\"w\"",{"type":993,"tag":1027,"props":1113,"children":1114},{"style":1064},[1115],{"type":999,"value":1116},") ",{"type":993,"tag":1027,"props":1118,"children":1119},{"style":1084},[1120],{"type":999,"value":1121},"as",{"type":993,"tag":1027,"props":1123,"children":1125},{"style":1124},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1126],{"type":999,"value":1127}," file",{"type":993,"tag":1027,"props":1129,"children":1130},{"style":1064},[1131],{"type":999,"value":1132},":\n",{"type":993,"tag":1027,"props":1134,"children":1135},{"class":1029,"line":63},[1136,1141,1146,1151,1156,1161],{"type":993,"tag":1027,"props":1137,"children":1138},{"style":1124},[1139],{"type":999,"value":1140},"    file",{"type":993,"tag":1027,"props":1142,"children":1143},{"style":1064},[1144],{"type":999,"value":1145},".write(",{"type":993,"tag":1027,"props":1147,"children":1148},{"style":1070},[1149],{"type":999,"value":1150},"\"Welcome to Python file writing!",{"type":993,"tag":1027,"props":1152,"children":1153},{"style":1058},[1154],{"type":999,"value":1155},"\\n",{"type":993,"tag":1027,"props":1157,"children":1158},{"style":1070},[1159],{"type":999,"value":1160},"\"",{"type":993,"tag":1027,"props":1162,"children":1163},{"style":1064},[1164],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1166,"children":1167},{"class":1029,"line":72},[1168,1172,1176,1181,1185,1189],{"type":993,"tag":1027,"props":1169,"children":1170},{"style":1124},[1171],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1173,"children":1174},{"style":1064},[1175],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1177,"children":1178},{"style":1070},[1179],{"type":999,"value":1180},"\"This is my first saved note.",{"type":993,"tag":1027,"props":1182,"children":1183},{"style":1058},[1184],{"type":999,"value":1155},{"type":993,"tag":1027,"props":1186,"children":1187},{"style":1070},[1188],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1190,"children":1191},{"style":1064},[1192],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1194,"children":1195},{"class":1029,"line":81},[1196,1200,1204,1209],{"type":993,"tag":1027,"props":1197,"children":1198},{"style":1124},[1199],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1201,"children":1202},{"style":1064},[1203],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1205,"children":1206},{"style":1070},[1207],{"type":999,"value":1208},"\"File writing is very useful!\"",{"type":993,"tag":1027,"props":1210,"children":1211},{"style":1064},[1212],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1214,"children":1215},{"class":1029,"line":91},[1216],{"type":993,"tag":1027,"props":1217,"children":1218},{"emptyLinePlaceholder":13},[1219],{"type":999,"value":1044},{"type":993,"tag":1027,"props":1221,"children":1222},{"class":1029,"line":100},[1223],{"type":993,"tag":1027,"props":1224,"children":1225},{"style":1033},[1226],{"type":999,"value":1227},"# Read it back to verify\n",{"type":993,"tag":1027,"props":1229,"children":1230},{"class":1029,"line":109},[1231,1235,1239,1243,1247,1251,1256,1260,1264,1268],{"type":993,"tag":1027,"props":1232,"children":1233},{"style":1084},[1234],{"type":999,"value":1087},{"type":993,"tag":1027,"props":1236,"children":1237},{"style":1058},[1238],{"type":999,"value":1092},{"type":993,"tag":1027,"props":1240,"children":1241},{"style":1064},[1242],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1244,"children":1245},{"style":1070},[1246],{"type":999,"value":1101},{"type":993,"tag":1027,"props":1248,"children":1249},{"style":1064},[1250],{"type":999,"value":1106},{"type":993,"tag":1027,"props":1252,"children":1253},{"style":1070},[1254],{"type":999,"value":1255},"\"r\"",{"type":993,"tag":1027,"props":1257,"children":1258},{"style":1064},[1259],{"type":999,"value":1116},{"type":993,"tag":1027,"props":1261,"children":1262},{"style":1084},[1263],{"type":999,"value":1121},{"type":993,"tag":1027,"props":1265,"children":1266},{"style":1124},[1267],{"type":999,"value":1127},{"type":993,"tag":1027,"props":1269,"children":1270},{"style":1064},[1271],{"type":999,"value":1132},{"type":993,"tag":1027,"props":1273,"children":1274},{"class":1029,"line":118},[1275,1280,1285,1289],{"type":993,"tag":1027,"props":1276,"children":1277},{"style":1064},[1278],{"type":999,"value":1279},"    content ",{"type":993,"tag":1027,"props":1281,"children":1282},{"style":1084},[1283],{"type":999,"value":1284},"=",{"type":993,"tag":1027,"props":1286,"children":1287},{"style":1124},[1288],{"type":999,"value":1127},{"type":993,"tag":1027,"props":1290,"children":1291},{"style":1064},[1292],{"type":999,"value":1293},".read()\n",{"type":993,"tag":1027,"props":1295,"children":1296},{"class":1029,"line":127},[1297,1302,1306,1311],{"type":993,"tag":1027,"props":1298,"children":1299},{"style":1058},[1300],{"type":999,"value":1301},"    print",{"type":993,"tag":1027,"props":1303,"children":1304},{"style":1064},[1305],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1307,"children":1308},{"style":1070},[1309],{"type":999,"value":1310},"\"📄 File content:\"",{"type":993,"tag":1027,"props":1312,"children":1313},{"style":1064},[1314],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1316,"children":1317},{"class":1029,"line":136},[1318,1322],{"type":993,"tag":1027,"props":1319,"children":1320},{"style":1058},[1321],{"type":999,"value":1301},{"type":993,"tag":1027,"props":1323,"children":1324},{"style":1064},[1325],{"type":999,"value":1326},"(content)\n",{"type":993,"tag":1027,"props":1328,"children":1329},{"class":1029,"line":146},[1330],{"type":993,"tag":1027,"props":1331,"children":1332},{"emptyLinePlaceholder":13},[1333],{"type":999,"value":1044},{"type":993,"tag":1027,"props":1335,"children":1336},{"class":1029,"line":155},[1337],{"type":993,"tag":1027,"props":1338,"children":1339},{"style":1033},[1340],{"type":999,"value":1341},"# Method 2: Append more content\n",{"type":993,"tag":1027,"props":1343,"children":1344},{"class":1029,"line":164},[1345,1349,1353,1357,1361,1366],{"type":993,"tag":1027,"props":1346,"children":1347},{"style":1058},[1348],{"type":999,"value":1061},{"type":993,"tag":1027,"props":1350,"children":1351},{"style":1064},[1352],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1354,"children":1355},{"style":1070},[1356],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1358,"children":1359},{"style":1058},[1360],{"type":999,"value":1155},{"type":993,"tag":1027,"props":1362,"children":1363},{"style":1070},[1364],{"type":999,"value":1365},"➕ Adding more content:\"",{"type":993,"tag":1027,"props":1367,"children":1368},{"style":1064},[1369],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1371,"children":1372},{"class":1029,"line":173},[1373,1377,1381,1385,1389,1393,1398,1402,1406,1410],{"type":993,"tag":1027,"props":1374,"children":1375},{"style":1084},[1376],{"type":999,"value":1087},{"type":993,"tag":1027,"props":1378,"children":1379},{"style":1058},[1380],{"type":999,"value":1092},{"type":993,"tag":1027,"props":1382,"children":1383},{"style":1064},[1384],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1386,"children":1387},{"style":1070},[1388],{"type":999,"value":1101},{"type":993,"tag":1027,"props":1390,"children":1391},{"style":1064},[1392],{"type":999,"value":1106},{"type":993,"tag":1027,"props":1394,"children":1395},{"style":1070},[1396],{"type":999,"value":1397},"\"a\"",{"type":993,"tag":1027,"props":1399,"children":1400},{"style":1064},[1401],{"type":999,"value":1116},{"type":993,"tag":1027,"props":1403,"children":1404},{"style":1084},[1405],{"type":999,"value":1121},{"type":993,"tag":1027,"props":1407,"children":1408},{"style":1124},[1409],{"type":999,"value":1127},{"type":993,"tag":1027,"props":1411,"children":1412},{"style":1064},[1413],{"type":999,"value":1132},{"type":993,"tag":1027,"props":1415,"children":1416},{"class":1029,"line":182},[1417,1421,1425,1429,1434,1439],{"type":993,"tag":1027,"props":1418,"children":1419},{"style":1124},[1420],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1422,"children":1423},{"style":1064},[1424],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1426,"children":1427},{"style":1070},[1428],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1430,"children":1431},{"style":1058},[1432],{"type":999,"value":1433},"\\n\\n",{"type":993,"tag":1027,"props":1435,"children":1436},{"style":1070},[1437],{"type":999,"value":1438},"This line was added later.\"",{"type":993,"tag":1027,"props":1440,"children":1441},{"style":1064},[1442],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1444,"children":1445},{"class":1029,"line":191},[1446,1450,1454,1458,1462,1467],{"type":993,"tag":1027,"props":1447,"children":1448},{"style":1124},[1449],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1451,"children":1452},{"style":1064},[1453],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1455,"children":1456},{"style":1070},[1457],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1459,"children":1460},{"style":1058},[1461],{"type":999,"value":1155},{"type":993,"tag":1027,"props":1463,"children":1464},{"style":1070},[1465],{"type":999,"value":1466},"Appending keeps existing content safe!\"",{"type":993,"tag":1027,"props":1468,"children":1469},{"style":1064},[1470],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1472,"children":1473},{"class":1029,"line":201},[1474],{"type":993,"tag":1027,"props":1475,"children":1476},{"emptyLinePlaceholder":13},[1477],{"type":999,"value":1044},{"type":993,"tag":1027,"props":1479,"children":1480},{"class":1029,"line":210},[1481],{"type":993,"tag":1027,"props":1482,"children":1483},{"style":1033},[1484],{"type":999,"value":1485},"# Read the updated file\n",{"type":993,"tag":1027,"props":1487,"children":1488},{"class":1029,"line":219},[1489,1493,1497,1501,1505,1509,1513,1517,1521,1525],{"type":993,"tag":1027,"props":1490,"children":1491},{"style":1084},[1492],{"type":999,"value":1087},{"type":993,"tag":1027,"props":1494,"children":1495},{"style":1058},[1496],{"type":999,"value":1092},{"type":993,"tag":1027,"props":1498,"children":1499},{"style":1064},[1500],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1502,"children":1503},{"style":1070},[1504],{"type":999,"value":1101},{"type":993,"tag":1027,"props":1506,"children":1507},{"style":1064},[1508],{"type":999,"value":1106},{"type":993,"tag":1027,"props":1510,"children":1511},{"style":1070},[1512],{"type":999,"value":1255},{"type":993,"tag":1027,"props":1514,"children":1515},{"style":1064},[1516],{"type":999,"value":1116},{"type":993,"tag":1027,"props":1518,"children":1519},{"style":1084},[1520],{"type":999,"value":1121},{"type":993,"tag":1027,"props":1522,"children":1523},{"style":1124},[1524],{"type":999,"value":1127},{"type":993,"tag":1027,"props":1526,"children":1527},{"style":1064},[1528],{"type":999,"value":1132},{"type":993,"tag":1027,"props":1530,"children":1531},{"class":1029,"line":228},[1532,1537,1541,1545],{"type":993,"tag":1027,"props":1533,"children":1534},{"style":1064},[1535],{"type":999,"value":1536},"    updated_content ",{"type":993,"tag":1027,"props":1538,"children":1539},{"style":1084},[1540],{"type":999,"value":1284},{"type":993,"tag":1027,"props":1542,"children":1543},{"style":1124},[1544],{"type":999,"value":1127},{"type":993,"tag":1027,"props":1546,"children":1547},{"style":1064},[1548],{"type":999,"value":1293},{"type":993,"tag":1027,"props":1550,"children":1551},{"class":1029,"line":238},[1552,1556,1560,1565],{"type":993,"tag":1027,"props":1553,"children":1554},{"style":1058},[1555],{"type":999,"value":1301},{"type":993,"tag":1027,"props":1557,"children":1558},{"style":1064},[1559],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1561,"children":1562},{"style":1070},[1563],{"type":999,"value":1564},"\"📄 Updated content:\"",{"type":993,"tag":1027,"props":1566,"children":1567},{"style":1064},[1568],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1570,"children":1571},{"class":1029,"line":247},[1572,1576],{"type":993,"tag":1027,"props":1573,"children":1574},{"style":1058},[1575],{"type":999,"value":1301},{"type":993,"tag":1027,"props":1577,"children":1578},{"style":1064},[1579],{"type":999,"value":1580},"(updated_content)\n",{"type":993,"tag":1027,"props":1582,"children":1583},{"class":1029,"line":256},[1584],{"type":993,"tag":1027,"props":1585,"children":1586},{"emptyLinePlaceholder":13},[1587],{"type":999,"value":1044},{"type":993,"tag":1027,"props":1589,"children":1590},{"class":1029,"line":265},[1591],{"type":993,"tag":1027,"props":1592,"children":1593},{"style":1033},[1594],{"type":999,"value":1595},"# Method 3: Writing different data types\n",{"type":993,"tag":1027,"props":1597,"children":1598},{"class":1029,"line":274},[1599,1603,1607,1611,1615,1620],{"type":993,"tag":1027,"props":1600,"children":1601},{"style":1058},[1602],{"type":999,"value":1061},{"type":993,"tag":1027,"props":1604,"children":1605},{"style":1064},[1606],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1608,"children":1609},{"style":1070},[1610],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1612,"children":1613},{"style":1058},[1614],{"type":999,"value":1155},{"type":993,"tag":1027,"props":1616,"children":1617},{"style":1070},[1618],{"type":999,"value":1619},"💾 Saving user data:\"",{"type":993,"tag":1027,"props":1621,"children":1622},{"style":1064},[1623],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1625,"children":1626},{"class":1029,"line":284},[1627,1632,1636,1641,1646,1651,1656,1660,1665,1669,1674,1678,1683,1687,1692],{"type":993,"tag":1027,"props":1628,"children":1629},{"style":1064},[1630],{"type":999,"value":1631},"user_info ",{"type":993,"tag":1027,"props":1633,"children":1634},{"style":1084},[1635],{"type":999,"value":1284},{"type":993,"tag":1027,"props":1637,"children":1638},{"style":1064},[1639],{"type":999,"value":1640}," {",{"type":993,"tag":1027,"props":1642,"children":1643},{"style":1070},[1644],{"type":999,"value":1645},"\"name\"",{"type":993,"tag":1027,"props":1647,"children":1648},{"style":1064},[1649],{"type":999,"value":1650},": ",{"type":993,"tag":1027,"props":1652,"children":1653},{"style":1070},[1654],{"type":999,"value":1655},"\"Alice\"",{"type":993,"tag":1027,"props":1657,"children":1658},{"style":1064},[1659],{"type":999,"value":1106},{"type":993,"tag":1027,"props":1661,"children":1662},{"style":1070},[1663],{"type":999,"value":1664},"\"age\"",{"type":993,"tag":1027,"props":1666,"children":1667},{"style":1064},[1668],{"type":999,"value":1650},{"type":993,"tag":1027,"props":1670,"children":1671},{"style":1058},[1672],{"type":999,"value":1673},"25",{"type":993,"tag":1027,"props":1675,"children":1676},{"style":1064},[1677],{"type":999,"value":1106},{"type":993,"tag":1027,"props":1679,"children":1680},{"style":1070},[1681],{"type":999,"value":1682},"\"city\"",{"type":993,"tag":1027,"props":1684,"children":1685},{"style":1064},[1686],{"type":999,"value":1650},{"type":993,"tag":1027,"props":1688,"children":1689},{"style":1070},[1690],{"type":999,"value":1691},"\"New York\"",{"type":993,"tag":1027,"props":1693,"children":1694},{"style":1064},[1695],{"type":999,"value":1696},"}\n",{"type":993,"tag":1027,"props":1698,"children":1699},{"class":1029,"line":293},[1700],{"type":993,"tag":1027,"props":1701,"children":1702},{"emptyLinePlaceholder":13},[1703],{"type":999,"value":1044},{"type":993,"tag":1027,"props":1705,"children":1706},{"class":1029,"line":302},[1707,1711,1715,1719,1724,1728,1732,1736,1740,1744],{"type":993,"tag":1027,"props":1708,"children":1709},{"style":1084},[1710],{"type":999,"value":1087},{"type":993,"tag":1027,"props":1712,"children":1713},{"style":1058},[1714],{"type":999,"value":1092},{"type":993,"tag":1027,"props":1716,"children":1717},{"style":1064},[1718],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1720,"children":1721},{"style":1070},[1722],{"type":999,"value":1723},"\"user_info.txt\"",{"type":993,"tag":1027,"props":1725,"children":1726},{"style":1064},[1727],{"type":999,"value":1106},{"type":993,"tag":1027,"props":1729,"children":1730},{"style":1070},[1731],{"type":999,"value":1111},{"type":993,"tag":1027,"props":1733,"children":1734},{"style":1064},[1735],{"type":999,"value":1116},{"type":993,"tag":1027,"props":1737,"children":1738},{"style":1084},[1739],{"type":999,"value":1121},{"type":993,"tag":1027,"props":1741,"children":1742},{"style":1124},[1743],{"type":999,"value":1127},{"type":993,"tag":1027,"props":1745,"children":1746},{"style":1064},[1747],{"type":999,"value":1132},{"type":993,"tag":1027,"props":1749,"children":1750},{"class":1029,"line":311},[1751,1755,1759,1764,1769,1773,1777],{"type":993,"tag":1027,"props":1752,"children":1753},{"style":1124},[1754],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1756,"children":1757},{"style":1064},[1758],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1760,"children":1761},{"style":1084},[1762],{"type":999,"value":1763},"f",{"type":993,"tag":1027,"props":1765,"children":1766},{"style":1070},[1767],{"type":999,"value":1768},"\"User Information",{"type":993,"tag":1027,"props":1770,"children":1771},{"style":1058},[1772],{"type":999,"value":1155},{"type":993,"tag":1027,"props":1774,"children":1775},{"style":1070},[1776],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1778,"children":1779},{"style":1064},[1780],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1782,"children":1783},{"class":1029,"line":320},[1784,1788,1792,1796,1801,1806,1811,1816,1821,1826,1830],{"type":993,"tag":1027,"props":1785,"children":1786},{"style":1124},[1787],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1789,"children":1790},{"style":1064},[1791],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1793,"children":1794},{"style":1084},[1795],{"type":999,"value":1763},{"type":993,"tag":1027,"props":1797,"children":1798},{"style":1070},[1799],{"type":999,"value":1800},"\"Name: ",{"type":993,"tag":1027,"props":1802,"children":1803},{"style":1058},[1804],{"type":999,"value":1805},"{",{"type":993,"tag":1027,"props":1807,"children":1808},{"style":1064},[1809],{"type":999,"value":1810},"user_info[",{"type":993,"tag":1027,"props":1812,"children":1813},{"style":1070},[1814],{"type":999,"value":1815},"'name'",{"type":993,"tag":1027,"props":1817,"children":1818},{"style":1064},[1819],{"type":999,"value":1820},"]",{"type":993,"tag":1027,"props":1822,"children":1823},{"style":1058},[1824],{"type":999,"value":1825},"}\\n",{"type":993,"tag":1027,"props":1827,"children":1828},{"style":1070},[1829],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1831,"children":1832},{"style":1064},[1833],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1835,"children":1836},{"class":1029,"line":329},[1837,1841,1845,1849,1854,1858,1862,1867,1871,1875,1879],{"type":993,"tag":1027,"props":1838,"children":1839},{"style":1124},[1840],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1842,"children":1843},{"style":1064},[1844],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1846,"children":1847},{"style":1084},[1848],{"type":999,"value":1763},{"type":993,"tag":1027,"props":1850,"children":1851},{"style":1070},[1852],{"type":999,"value":1853},"\"Age: ",{"type":993,"tag":1027,"props":1855,"children":1856},{"style":1058},[1857],{"type":999,"value":1805},{"type":993,"tag":1027,"props":1859,"children":1860},{"style":1064},[1861],{"type":999,"value":1810},{"type":993,"tag":1027,"props":1863,"children":1864},{"style":1070},[1865],{"type":999,"value":1866},"'age'",{"type":993,"tag":1027,"props":1868,"children":1869},{"style":1064},[1870],{"type":999,"value":1820},{"type":993,"tag":1027,"props":1872,"children":1873},{"style":1058},[1874],{"type":999,"value":1825},{"type":993,"tag":1027,"props":1876,"children":1877},{"style":1070},[1878],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1880,"children":1881},{"style":1064},[1882],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1884,"children":1885},{"class":1029,"line":338},[1886,1890,1894,1898,1903,1907,1911,1916,1920,1924,1928],{"type":993,"tag":1027,"props":1887,"children":1888},{"style":1124},[1889],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1891,"children":1892},{"style":1064},[1893],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1895,"children":1896},{"style":1084},[1897],{"type":999,"value":1763},{"type":993,"tag":1027,"props":1899,"children":1900},{"style":1070},[1901],{"type":999,"value":1902},"\"City: ",{"type":993,"tag":1027,"props":1904,"children":1905},{"style":1058},[1906],{"type":999,"value":1805},{"type":993,"tag":1027,"props":1908,"children":1909},{"style":1064},[1910],{"type":999,"value":1810},{"type":993,"tag":1027,"props":1912,"children":1913},{"style":1070},[1914],{"type":999,"value":1915},"'city'",{"type":993,"tag":1027,"props":1917,"children":1918},{"style":1064},[1919],{"type":999,"value":1820},{"type":993,"tag":1027,"props":1921,"children":1922},{"style":1058},[1923],{"type":999,"value":1825},{"type":993,"tag":1027,"props":1925,"children":1926},{"style":1070},[1927],{"type":999,"value":1160},{"type":993,"tag":1027,"props":1929,"children":1930},{"style":1064},[1931],{"type":999,"value":1078},{"type":993,"tag":1027,"props":1933,"children":1934},{"class":1029,"line":347},[1935],{"type":993,"tag":1027,"props":1936,"children":1937},{"emptyLinePlaceholder":13},[1938],{"type":999,"value":1044},{"type":993,"tag":1027,"props":1940,"children":1941},{"class":1029,"line":356},[1942,1946,1950,1955],{"type":993,"tag":1027,"props":1943,"children":1944},{"style":1058},[1945],{"type":999,"value":1061},{"type":993,"tag":1027,"props":1947,"children":1948},{"style":1064},[1949],{"type":999,"value":1067},{"type":993,"tag":1027,"props":1951,"children":1952},{"style":1070},[1953],{"type":999,"value":1954},"\"✅ User data saved successfully!\"",{"type":993,"tag":1027,"props":1956,"children":1957},{"style":1064},[1958],{"type":999,"value":1078},{"type":993,"tag":1960,"props":1961,"children":1963},"h2",{"id":1962},"understanding-file-writing-modes",[1964],{"type":999,"value":1965},"🎯 Understanding File Writing Modes",{"type":993,"tag":1002,"props":1967,"children":1968},{},[1969],{"type":999,"value":1970},"Different file modes determine how Python handles existing content when writing files.",{"type":993,"tag":1972,"props":1973,"children":1977},"info-box",{"emoji":1974,"title":1975,"type":1976},"📝","File Writing Modes","info",[1978,1987,1995,2046,2054,2098,2106,2139,2147,2209,2217],{"type":993,"tag":1002,"props":1979,"children":1980},{},[1981],{"type":993,"tag":1982,"props":1983,"children":1984},"strong",{},[1985],{"type":999,"value":1986},"Writing Modes:",{"type":993,"tag":1002,"props":1988,"children":1989},{},[1990],{"type":993,"tag":1982,"props":1991,"children":1992},{},[1993],{"type":999,"value":1994},"✍️ Write Mode ('w'):",{"type":993,"tag":1996,"props":1997,"children":1998},"ul",{},[1999,2010,2020,2030],{"type":993,"tag":2000,"props":2001,"children":2002},"li",{},[2003,2008],{"type":993,"tag":1982,"props":2004,"children":2005},{},[2006],{"type":999,"value":2007},"Behavior:",{"type":999,"value":2009}," Creates new file or completely overwrites existing file",{"type":993,"tag":2000,"props":2011,"children":2012},{},[2013,2018],{"type":993,"tag":1982,"props":2014,"children":2015},{},[2016],{"type":999,"value":2017},"Use case:",{"type":999,"value":2019}," Creating new files, replacing all content",{"type":993,"tag":2000,"props":2021,"children":2022},{},[2023,2028],{"type":993,"tag":1982,"props":2024,"children":2025},{},[2026],{"type":999,"value":2027},"Safety:",{"type":999,"value":2029}," ⚠️ Destroys existing content if file exists",{"type":993,"tag":2000,"props":2031,"children":2032},{},[2033,2038,2040],{"type":993,"tag":1982,"props":2034,"children":2035},{},[2036],{"type":999,"value":2037},"Example:",{"type":999,"value":2039}," ",{"type":993,"tag":1023,"props":2041,"children":2043},{"className":2042},[],[2044],{"type":999,"value":2045},"open(\"file.txt\", \"w\")",{"type":993,"tag":1002,"props":2047,"children":2048},{},[2049],{"type":993,"tag":1982,"props":2050,"children":2051},{},[2052],{"type":999,"value":2053},"➕ Append Mode ('a'):",{"type":993,"tag":1996,"props":2055,"children":2056},{},[2057,2066,2075,2084],{"type":993,"tag":2000,"props":2058,"children":2059},{},[2060,2064],{"type":993,"tag":1982,"props":2061,"children":2062},{},[2063],{"type":999,"value":2007},{"type":999,"value":2065}," Adds content to end of existing file",{"type":993,"tag":2000,"props":2067,"children":2068},{},[2069,2073],{"type":993,"tag":1982,"props":2070,"children":2071},{},[2072],{"type":999,"value":2017},{"type":999,"value":2074}," Adding to log files, updating records",{"type":993,"tag":2000,"props":2076,"children":2077},{},[2078,2082],{"type":993,"tag":1982,"props":2079,"children":2080},{},[2081],{"type":999,"value":2027},{"type":999,"value":2083}," ✅ Preserves existing content",{"type":993,"tag":2000,"props":2085,"children":2086},{},[2087,2091,2092],{"type":993,"tag":1982,"props":2088,"children":2089},{},[2090],{"type":999,"value":2037},{"type":999,"value":2039},{"type":993,"tag":1023,"props":2093,"children":2095},{"className":2094},[],[2096],{"type":999,"value":2097},"open(\"file.txt\", \"a\")",{"type":993,"tag":1002,"props":2099,"children":2100},{},[2101],{"type":993,"tag":1982,"props":2102,"children":2103},{},[2104],{"type":999,"value":2105},"🔄 Read/Write Modes:",{"type":993,"tag":1996,"props":2107,"children":2108},{},[2109,2119,2129],{"type":993,"tag":2000,"props":2110,"children":2111},{},[2112,2117],{"type":993,"tag":1982,"props":2113,"children":2114},{},[2115],{"type":999,"value":2116},"'w+'",{"type":999,"value":2118}," - Read and write (overwrites existing)",{"type":993,"tag":2000,"props":2120,"children":2121},{},[2122,2127],{"type":993,"tag":1982,"props":2123,"children":2124},{},[2125],{"type":999,"value":2126},"'a+'",{"type":999,"value":2128}," - Read and append (preserves existing)",{"type":993,"tag":2000,"props":2130,"children":2131},{},[2132,2137],{"type":993,"tag":1982,"props":2133,"children":2134},{},[2135],{"type":999,"value":2136},"'r+'",{"type":999,"value":2138}," - Read and write (file must exist)",{"type":993,"tag":1002,"props":2140,"children":2141},{},[2142],{"type":993,"tag":1982,"props":2143,"children":2144},{},[2145],{"type":999,"value":2146},"💡 Best Practices:",{"type":993,"tag":1996,"props":2148,"children":2149},{},[2150,2161,2173,2185,2197],{"type":993,"tag":2000,"props":2151,"children":2152},{},[2153,2155,2159],{"type":999,"value":2154},"Always use ",{"type":993,"tag":1982,"props":2156,"children":2157},{},[2158],{"type":999,"value":1087},{"type":999,"value":2160}," statements for automatic file closing",{"type":993,"tag":2000,"props":2162,"children":2163},{},[2164,2166,2171],{"type":999,"value":2165},"Create ",{"type":993,"tag":1982,"props":2167,"children":2168},{},[2169],{"type":999,"value":2170},"backups",{"type":999,"value":2172}," before overwriting important files",{"type":993,"tag":2000,"props":2174,"children":2175},{},[2176,2178,2183],{"type":999,"value":2177},"Handle ",{"type":993,"tag":1982,"props":2179,"children":2180},{},[2181],{"type":999,"value":2182},"errors",{"type":999,"value":2184}," with try/except blocks",{"type":993,"tag":2000,"props":2186,"children":2187},{},[2188,2190,2195],{"type":999,"value":2189},"Choose the ",{"type":993,"tag":1982,"props":2191,"children":2192},{},[2193],{"type":999,"value":2194},"right mode",{"type":999,"value":2196}," for your specific task",{"type":993,"tag":2000,"props":2198,"children":2199},{},[2200,2202,2207],{"type":999,"value":2201},"Specify ",{"type":993,"tag":1982,"props":2203,"children":2204},{},[2205],{"type":999,"value":2206},"encoding=\"utf-8\"",{"type":999,"value":2208}," for text files",{"type":993,"tag":1002,"props":2210,"children":2211},{},[2212],{"type":993,"tag":1982,"props":2213,"children":2214},{},[2215],{"type":999,"value":2216},"Common Use Cases:",{"type":993,"tag":1996,"props":2218,"children":2219},{},[2220,2230,2240,2250],{"type":993,"tag":2000,"props":2221,"children":2222},{},[2223,2228],{"type":993,"tag":1982,"props":2224,"children":2225},{},[2226],{"type":999,"value":2227},"Config files:",{"type":999,"value":2229}," Store application settings",{"type":993,"tag":2000,"props":2231,"children":2232},{},[2233,2238],{"type":993,"tag":1982,"props":2234,"children":2235},{},[2236],{"type":999,"value":2237},"Log files:",{"type":999,"value":2239}," Record program activities",{"type":993,"tag":2000,"props":2241,"children":2242},{},[2243,2248],{"type":993,"tag":1982,"props":2244,"children":2245},{},[2246],{"type":999,"value":2247},"Reports:",{"type":999,"value":2249}," Generate formatted output",{"type":993,"tag":2000,"props":2251,"children":2252},{},[2253,2258],{"type":993,"tag":1982,"props":2254,"children":2255},{},[2256],{"type":999,"value":2257},"User data:",{"type":999,"value":2259}," Save preferences and information",{"type":993,"tag":2261,"props":2262,"children":2264},"h3",{"id":2263},"basic-file-creation",[2265],{"type":999,"value":2266},"📄 Basic File Creation",{"type":993,"tag":1002,"props":2268,"children":2269},{},[2270],{"type":999,"value":2271},"Creating new files is the foundation of file writing - here's how to do it safely and effectively.",{"type":993,"tag":1013,"props":2273,"children":2274},{},[2275],{"type":993,"tag":1017,"props":2276,"children":2278},{"className":1019,"code":2277,"language":6,"meta":8,"style":8},"from datetime import datetime\n\n# 📝 Simple File Creation Examples\n\ndef create_basic_files():\n    print(\"📄 Creating different types of files:\")\n    \n    # 1. Simple log file\n    current_time = datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")\n    log_entry = f\"[{current_time}] Application started\\n\"\n    \n    with open(\"app.log\", \"w\") as file:\n        file.write(log_entry)\n        file.write(\"System initialization complete\\n\")\n        file.write(\"Ready to process requests\\n\")\n    \n    print(\"   ✅ Log file created\")\n    \n    # 2. Configuration file\n    config_data = \"\"\"# My App Settings\napp_name = My Python App\nversion = 1.0\ndebug = false\nmax_users = 100\n\"\"\"\n    \n    with open(\"settings.conf\", \"w\") as file:\n        file.write(config_data)\n    \n    print(\"   ⚙️ Configuration file created\")\n    \n    # 3. User data file\n    users = [\n        {\"name\": \"Alice\", \"email\": \"alice@example.com\", \"role\": \"admin\"},\n        {\"name\": \"Bob\", \"email\": \"bob@example.com\", \"role\": \"user\"}\n    ]\n    \n    with open(\"users.txt\", \"w\") as file:\n        file.write(\"User Database\\n\")\n        file.write(\"=\" * 20 + \"\\n\")\n        \n        for user in users:\n            line = f\"{user['name']} ({user['email']}) - {user['role']}\\n\"\n            file.write(line)\n    \n    print(\"   👥 User data file created\")\n    \n    # Verify files were created\n    import os\n    files = [\"app.log\", \"settings.conf\", \"users.txt\"]\n    \n    print(\"\\n📋 Verification:\")\n    for filename in files:\n        if os.path.exists(filename):\n            size = os.path.getsize(filename)\n            print(f\"   ✅ {filename} ({size} bytes)\")\n\ncreate_basic_files()\n",[2279],{"type":993,"tag":1023,"props":2280,"children":2281},{"__ignoreMap":8},[2282,2305,2312,2320,2327,2346,2366,2374,2382,2418,2468,2475,2520,2533,2561,2589,2596,2616,2623,2631,2648,2656,2664,2672,2680,2688,2695,2739,2751,2758,2778,2785,2793,2810,2871,2929,2937,2944,2988,3016,3064,3072,3095,3192,3205,3212,3232,3239,3247,3260,3302,3309,3337,3359,3372,3389,3449,3456],{"type":993,"tag":1027,"props":2283,"children":2284},{"class":1029,"line":12},[2285,2290,2295,2300],{"type":993,"tag":1027,"props":2286,"children":2287},{"style":1084},[2288],{"type":999,"value":2289},"from",{"type":993,"tag":1027,"props":2291,"children":2292},{"style":1064},[2293],{"type":999,"value":2294}," datetime ",{"type":993,"tag":1027,"props":2296,"children":2297},{"style":1084},[2298],{"type":999,"value":2299},"import",{"type":993,"tag":1027,"props":2301,"children":2302},{"style":1064},[2303],{"type":999,"value":2304}," datetime\n",{"type":993,"tag":1027,"props":2306,"children":2307},{"class":1029,"line":27},[2308],{"type":993,"tag":1027,"props":2309,"children":2310},{"emptyLinePlaceholder":13},[2311],{"type":999,"value":1044},{"type":993,"tag":1027,"props":2313,"children":2314},{"class":1029,"line":36},[2315],{"type":993,"tag":1027,"props":2316,"children":2317},{"style":1033},[2318],{"type":999,"value":2319},"# 📝 Simple File Creation Examples\n",{"type":993,"tag":1027,"props":2321,"children":2322},{"class":1029,"line":45},[2323],{"type":993,"tag":1027,"props":2324,"children":2325},{"emptyLinePlaceholder":13},[2326],{"type":999,"value":1044},{"type":993,"tag":1027,"props":2328,"children":2329},{"class":1029,"line":54},[2330,2335,2341],{"type":993,"tag":1027,"props":2331,"children":2332},{"style":1084},[2333],{"type":999,"value":2334},"def",{"type":993,"tag":1027,"props":2336,"children":2338},{"style":2337},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2339],{"type":999,"value":2340}," create_basic_files",{"type":993,"tag":1027,"props":2342,"children":2343},{"style":1064},[2344],{"type":999,"value":2345},"():\n",{"type":993,"tag":1027,"props":2347,"children":2348},{"class":1029,"line":63},[2349,2353,2357,2362],{"type":993,"tag":1027,"props":2350,"children":2351},{"style":1058},[2352],{"type":999,"value":1301},{"type":993,"tag":1027,"props":2354,"children":2355},{"style":1064},[2356],{"type":999,"value":1067},{"type":993,"tag":1027,"props":2358,"children":2359},{"style":1070},[2360],{"type":999,"value":2361},"\"📄 Creating different types of files:\"",{"type":993,"tag":1027,"props":2363,"children":2364},{"style":1064},[2365],{"type":999,"value":1078},{"type":993,"tag":1027,"props":2367,"children":2368},{"class":1029,"line":72},[2369],{"type":993,"tag":1027,"props":2370,"children":2371},{"style":1064},[2372],{"type":999,"value":2373},"    \n",{"type":993,"tag":1027,"props":2375,"children":2376},{"class":1029,"line":81},[2377],{"type":993,"tag":1027,"props":2378,"children":2379},{"style":1033},[2380],{"type":999,"value":2381},"    # 1. Simple log file\n",{"type":993,"tag":1027,"props":2383,"children":2384},{"class":1029,"line":91},[2385,2390,2394,2399,2404,2409,2414],{"type":993,"tag":1027,"props":2386,"children":2387},{"style":1064},[2388],{"type":999,"value":2389},"    current_time ",{"type":993,"tag":1027,"props":2391,"children":2392},{"style":1084},[2393],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2395,"children":2396},{"style":1064},[2397],{"type":999,"value":2398}," datetime.now().strftime(",{"type":993,"tag":1027,"props":2400,"children":2401},{"style":1070},[2402],{"type":999,"value":2403},"\"%Y-%m-",{"type":993,"tag":1027,"props":2405,"children":2406},{"style":1058},[2407],{"type":999,"value":2408},"%d",{"type":993,"tag":1027,"props":2410,"children":2411},{"style":1070},[2412],{"type":999,"value":2413}," %H:%M:%S\"",{"type":993,"tag":1027,"props":2415,"children":2416},{"style":1064},[2417],{"type":999,"value":1078},{"type":993,"tag":1027,"props":2419,"children":2420},{"class":1029,"line":100},[2421,2426,2430,2435,2440,2444,2449,2454,2459,2463],{"type":993,"tag":1027,"props":2422,"children":2423},{"style":1064},[2424],{"type":999,"value":2425},"    log_entry ",{"type":993,"tag":1027,"props":2427,"children":2428},{"style":1084},[2429],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2431,"children":2432},{"style":1084},[2433],{"type":999,"value":2434}," f",{"type":993,"tag":1027,"props":2436,"children":2437},{"style":1070},[2438],{"type":999,"value":2439},"\"[",{"type":993,"tag":1027,"props":2441,"children":2442},{"style":1058},[2443],{"type":999,"value":1805},{"type":993,"tag":1027,"props":2445,"children":2446},{"style":1064},[2447],{"type":999,"value":2448},"current_time",{"type":993,"tag":1027,"props":2450,"children":2451},{"style":1058},[2452],{"type":999,"value":2453},"}",{"type":993,"tag":1027,"props":2455,"children":2456},{"style":1070},[2457],{"type":999,"value":2458},"] Application started",{"type":993,"tag":1027,"props":2460,"children":2461},{"style":1058},[2462],{"type":999,"value":1155},{"type":993,"tag":1027,"props":2464,"children":2465},{"style":1070},[2466],{"type":999,"value":2467},"\"\n",{"type":993,"tag":1027,"props":2469,"children":2470},{"class":1029,"line":109},[2471],{"type":993,"tag":1027,"props":2472,"children":2473},{"style":1064},[2474],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2476,"children":2477},{"class":1029,"line":118},[2478,2483,2487,2491,2496,2500,2504,2508,2512,2516],{"type":993,"tag":1027,"props":2479,"children":2480},{"style":1084},[2481],{"type":999,"value":2482},"    with",{"type":993,"tag":1027,"props":2484,"children":2485},{"style":1058},[2486],{"type":999,"value":1092},{"type":993,"tag":1027,"props":2488,"children":2489},{"style":1064},[2490],{"type":999,"value":1067},{"type":993,"tag":1027,"props":2492,"children":2493},{"style":1070},[2494],{"type":999,"value":2495},"\"app.log\"",{"type":993,"tag":1027,"props":2497,"children":2498},{"style":1064},[2499],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2501,"children":2502},{"style":1070},[2503],{"type":999,"value":1111},{"type":993,"tag":1027,"props":2505,"children":2506},{"style":1064},[2507],{"type":999,"value":1116},{"type":993,"tag":1027,"props":2509,"children":2510},{"style":1084},[2511],{"type":999,"value":1121},{"type":993,"tag":1027,"props":2513,"children":2514},{"style":1124},[2515],{"type":999,"value":1127},{"type":993,"tag":1027,"props":2517,"children":2518},{"style":1064},[2519],{"type":999,"value":1132},{"type":993,"tag":1027,"props":2521,"children":2522},{"class":1029,"line":127},[2523,2528],{"type":993,"tag":1027,"props":2524,"children":2525},{"style":1124},[2526],{"type":999,"value":2527},"        file",{"type":993,"tag":1027,"props":2529,"children":2530},{"style":1064},[2531],{"type":999,"value":2532},".write(log_entry)\n",{"type":993,"tag":1027,"props":2534,"children":2535},{"class":1029,"line":136},[2536,2540,2544,2549,2553,2557],{"type":993,"tag":1027,"props":2537,"children":2538},{"style":1124},[2539],{"type":999,"value":2527},{"type":993,"tag":1027,"props":2541,"children":2542},{"style":1064},[2543],{"type":999,"value":1145},{"type":993,"tag":1027,"props":2545,"children":2546},{"style":1070},[2547],{"type":999,"value":2548},"\"System initialization complete",{"type":993,"tag":1027,"props":2550,"children":2551},{"style":1058},[2552],{"type":999,"value":1155},{"type":993,"tag":1027,"props":2554,"children":2555},{"style":1070},[2556],{"type":999,"value":1160},{"type":993,"tag":1027,"props":2558,"children":2559},{"style":1064},[2560],{"type":999,"value":1078},{"type":993,"tag":1027,"props":2562,"children":2563},{"class":1029,"line":146},[2564,2568,2572,2577,2581,2585],{"type":993,"tag":1027,"props":2565,"children":2566},{"style":1124},[2567],{"type":999,"value":2527},{"type":993,"tag":1027,"props":2569,"children":2570},{"style":1064},[2571],{"type":999,"value":1145},{"type":993,"tag":1027,"props":2573,"children":2574},{"style":1070},[2575],{"type":999,"value":2576},"\"Ready to process requests",{"type":993,"tag":1027,"props":2578,"children":2579},{"style":1058},[2580],{"type":999,"value":1155},{"type":993,"tag":1027,"props":2582,"children":2583},{"style":1070},[2584],{"type":999,"value":1160},{"type":993,"tag":1027,"props":2586,"children":2587},{"style":1064},[2588],{"type":999,"value":1078},{"type":993,"tag":1027,"props":2590,"children":2591},{"class":1029,"line":155},[2592],{"type":993,"tag":1027,"props":2593,"children":2594},{"style":1064},[2595],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2597,"children":2598},{"class":1029,"line":164},[2599,2603,2607,2612],{"type":993,"tag":1027,"props":2600,"children":2601},{"style":1058},[2602],{"type":999,"value":1301},{"type":993,"tag":1027,"props":2604,"children":2605},{"style":1064},[2606],{"type":999,"value":1067},{"type":993,"tag":1027,"props":2608,"children":2609},{"style":1070},[2610],{"type":999,"value":2611},"\"   ✅ Log file created\"",{"type":993,"tag":1027,"props":2613,"children":2614},{"style":1064},[2615],{"type":999,"value":1078},{"type":993,"tag":1027,"props":2617,"children":2618},{"class":1029,"line":173},[2619],{"type":993,"tag":1027,"props":2620,"children":2621},{"style":1064},[2622],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2624,"children":2625},{"class":1029,"line":182},[2626],{"type":993,"tag":1027,"props":2627,"children":2628},{"style":1033},[2629],{"type":999,"value":2630},"    # 2. Configuration file\n",{"type":993,"tag":1027,"props":2632,"children":2633},{"class":1029,"line":191},[2634,2639,2643],{"type":993,"tag":1027,"props":2635,"children":2636},{"style":1064},[2637],{"type":999,"value":2638},"    config_data ",{"type":993,"tag":1027,"props":2640,"children":2641},{"style":1084},[2642],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2644,"children":2645},{"style":1070},[2646],{"type":999,"value":2647}," \"\"\"# My App Settings\n",{"type":993,"tag":1027,"props":2649,"children":2650},{"class":1029,"line":201},[2651],{"type":993,"tag":1027,"props":2652,"children":2653},{"style":1070},[2654],{"type":999,"value":2655},"app_name = My Python App\n",{"type":993,"tag":1027,"props":2657,"children":2658},{"class":1029,"line":210},[2659],{"type":993,"tag":1027,"props":2660,"children":2661},{"style":1070},[2662],{"type":999,"value":2663},"version = 1.0\n",{"type":993,"tag":1027,"props":2665,"children":2666},{"class":1029,"line":219},[2667],{"type":993,"tag":1027,"props":2668,"children":2669},{"style":1070},[2670],{"type":999,"value":2671},"debug = false\n",{"type":993,"tag":1027,"props":2673,"children":2674},{"class":1029,"line":228},[2675],{"type":993,"tag":1027,"props":2676,"children":2677},{"style":1070},[2678],{"type":999,"value":2679},"max_users = 100\n",{"type":993,"tag":1027,"props":2681,"children":2682},{"class":1029,"line":238},[2683],{"type":993,"tag":1027,"props":2684,"children":2685},{"style":1070},[2686],{"type":999,"value":2687},"\"\"\"\n",{"type":993,"tag":1027,"props":2689,"children":2690},{"class":1029,"line":247},[2691],{"type":993,"tag":1027,"props":2692,"children":2693},{"style":1064},[2694],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2696,"children":2697},{"class":1029,"line":256},[2698,2702,2706,2710,2715,2719,2723,2727,2731,2735],{"type":993,"tag":1027,"props":2699,"children":2700},{"style":1084},[2701],{"type":999,"value":2482},{"type":993,"tag":1027,"props":2703,"children":2704},{"style":1058},[2705],{"type":999,"value":1092},{"type":993,"tag":1027,"props":2707,"children":2708},{"style":1064},[2709],{"type":999,"value":1067},{"type":993,"tag":1027,"props":2711,"children":2712},{"style":1070},[2713],{"type":999,"value":2714},"\"settings.conf\"",{"type":993,"tag":1027,"props":2716,"children":2717},{"style":1064},[2718],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2720,"children":2721},{"style":1070},[2722],{"type":999,"value":1111},{"type":993,"tag":1027,"props":2724,"children":2725},{"style":1064},[2726],{"type":999,"value":1116},{"type":993,"tag":1027,"props":2728,"children":2729},{"style":1084},[2730],{"type":999,"value":1121},{"type":993,"tag":1027,"props":2732,"children":2733},{"style":1124},[2734],{"type":999,"value":1127},{"type":993,"tag":1027,"props":2736,"children":2737},{"style":1064},[2738],{"type":999,"value":1132},{"type":993,"tag":1027,"props":2740,"children":2741},{"class":1029,"line":265},[2742,2746],{"type":993,"tag":1027,"props":2743,"children":2744},{"style":1124},[2745],{"type":999,"value":2527},{"type":993,"tag":1027,"props":2747,"children":2748},{"style":1064},[2749],{"type":999,"value":2750},".write(config_data)\n",{"type":993,"tag":1027,"props":2752,"children":2753},{"class":1029,"line":274},[2754],{"type":993,"tag":1027,"props":2755,"children":2756},{"style":1064},[2757],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2759,"children":2760},{"class":1029,"line":284},[2761,2765,2769,2774],{"type":993,"tag":1027,"props":2762,"children":2763},{"style":1058},[2764],{"type":999,"value":1301},{"type":993,"tag":1027,"props":2766,"children":2767},{"style":1064},[2768],{"type":999,"value":1067},{"type":993,"tag":1027,"props":2770,"children":2771},{"style":1070},[2772],{"type":999,"value":2773},"\"   ⚙️ Configuration file created\"",{"type":993,"tag":1027,"props":2775,"children":2776},{"style":1064},[2777],{"type":999,"value":1078},{"type":993,"tag":1027,"props":2779,"children":2780},{"class":1029,"line":293},[2781],{"type":993,"tag":1027,"props":2782,"children":2783},{"style":1064},[2784],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2786,"children":2787},{"class":1029,"line":302},[2788],{"type":993,"tag":1027,"props":2789,"children":2790},{"style":1033},[2791],{"type":999,"value":2792},"    # 3. User data file\n",{"type":993,"tag":1027,"props":2794,"children":2795},{"class":1029,"line":311},[2796,2801,2805],{"type":993,"tag":1027,"props":2797,"children":2798},{"style":1064},[2799],{"type":999,"value":2800},"    users ",{"type":993,"tag":1027,"props":2802,"children":2803},{"style":1084},[2804],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2806,"children":2807},{"style":1064},[2808],{"type":999,"value":2809}," [\n",{"type":993,"tag":1027,"props":2811,"children":2812},{"class":1029,"line":320},[2813,2818,2822,2826,2830,2834,2839,2843,2848,2852,2857,2861,2866],{"type":993,"tag":1027,"props":2814,"children":2815},{"style":1064},[2816],{"type":999,"value":2817},"        {",{"type":993,"tag":1027,"props":2819,"children":2820},{"style":1070},[2821],{"type":999,"value":1645},{"type":993,"tag":1027,"props":2823,"children":2824},{"style":1064},[2825],{"type":999,"value":1650},{"type":993,"tag":1027,"props":2827,"children":2828},{"style":1070},[2829],{"type":999,"value":1655},{"type":993,"tag":1027,"props":2831,"children":2832},{"style":1064},[2833],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2835,"children":2836},{"style":1070},[2837],{"type":999,"value":2838},"\"email\"",{"type":993,"tag":1027,"props":2840,"children":2841},{"style":1064},[2842],{"type":999,"value":1650},{"type":993,"tag":1027,"props":2844,"children":2845},{"style":1070},[2846],{"type":999,"value":2847},"\"alice@example.com\"",{"type":993,"tag":1027,"props":2849,"children":2850},{"style":1064},[2851],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2853,"children":2854},{"style":1070},[2855],{"type":999,"value":2856},"\"role\"",{"type":993,"tag":1027,"props":2858,"children":2859},{"style":1064},[2860],{"type":999,"value":1650},{"type":993,"tag":1027,"props":2862,"children":2863},{"style":1070},[2864],{"type":999,"value":2865},"\"admin\"",{"type":993,"tag":1027,"props":2867,"children":2868},{"style":1064},[2869],{"type":999,"value":2870},"},\n",{"type":993,"tag":1027,"props":2872,"children":2873},{"class":1029,"line":329},[2874,2878,2882,2886,2891,2895,2899,2903,2908,2912,2916,2920,2925],{"type":993,"tag":1027,"props":2875,"children":2876},{"style":1064},[2877],{"type":999,"value":2817},{"type":993,"tag":1027,"props":2879,"children":2880},{"style":1070},[2881],{"type":999,"value":1645},{"type":993,"tag":1027,"props":2883,"children":2884},{"style":1064},[2885],{"type":999,"value":1650},{"type":993,"tag":1027,"props":2887,"children":2888},{"style":1070},[2889],{"type":999,"value":2890},"\"Bob\"",{"type":993,"tag":1027,"props":2892,"children":2893},{"style":1064},[2894],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2896,"children":2897},{"style":1070},[2898],{"type":999,"value":2838},{"type":993,"tag":1027,"props":2900,"children":2901},{"style":1064},[2902],{"type":999,"value":1650},{"type":993,"tag":1027,"props":2904,"children":2905},{"style":1070},[2906],{"type":999,"value":2907},"\"bob@example.com\"",{"type":993,"tag":1027,"props":2909,"children":2910},{"style":1064},[2911],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2913,"children":2914},{"style":1070},[2915],{"type":999,"value":2856},{"type":993,"tag":1027,"props":2917,"children":2918},{"style":1064},[2919],{"type":999,"value":1650},{"type":993,"tag":1027,"props":2921,"children":2922},{"style":1070},[2923],{"type":999,"value":2924},"\"user\"",{"type":993,"tag":1027,"props":2926,"children":2927},{"style":1064},[2928],{"type":999,"value":1696},{"type":993,"tag":1027,"props":2930,"children":2931},{"class":1029,"line":338},[2932],{"type":993,"tag":1027,"props":2933,"children":2934},{"style":1064},[2935],{"type":999,"value":2936},"    ]\n",{"type":993,"tag":1027,"props":2938,"children":2939},{"class":1029,"line":347},[2940],{"type":993,"tag":1027,"props":2941,"children":2942},{"style":1064},[2943],{"type":999,"value":2373},{"type":993,"tag":1027,"props":2945,"children":2946},{"class":1029,"line":356},[2947,2951,2955,2959,2964,2968,2972,2976,2980,2984],{"type":993,"tag":1027,"props":2948,"children":2949},{"style":1084},[2950],{"type":999,"value":2482},{"type":993,"tag":1027,"props":2952,"children":2953},{"style":1058},[2954],{"type":999,"value":1092},{"type":993,"tag":1027,"props":2956,"children":2957},{"style":1064},[2958],{"type":999,"value":1067},{"type":993,"tag":1027,"props":2960,"children":2961},{"style":1070},[2962],{"type":999,"value":2963},"\"users.txt\"",{"type":993,"tag":1027,"props":2965,"children":2966},{"style":1064},[2967],{"type":999,"value":1106},{"type":993,"tag":1027,"props":2969,"children":2970},{"style":1070},[2971],{"type":999,"value":1111},{"type":993,"tag":1027,"props":2973,"children":2974},{"style":1064},[2975],{"type":999,"value":1116},{"type":993,"tag":1027,"props":2977,"children":2978},{"style":1084},[2979],{"type":999,"value":1121},{"type":993,"tag":1027,"props":2981,"children":2982},{"style":1124},[2983],{"type":999,"value":1127},{"type":993,"tag":1027,"props":2985,"children":2986},{"style":1064},[2987],{"type":999,"value":1132},{"type":993,"tag":1027,"props":2989,"children":2990},{"class":1029,"line":365},[2991,2995,2999,3004,3008,3012],{"type":993,"tag":1027,"props":2992,"children":2993},{"style":1124},[2994],{"type":999,"value":2527},{"type":993,"tag":1027,"props":2996,"children":2997},{"style":1064},[2998],{"type":999,"value":1145},{"type":993,"tag":1027,"props":3000,"children":3001},{"style":1070},[3002],{"type":999,"value":3003},"\"User Database",{"type":993,"tag":1027,"props":3005,"children":3006},{"style":1058},[3007],{"type":999,"value":1155},{"type":993,"tag":1027,"props":3009,"children":3010},{"style":1070},[3011],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3013,"children":3014},{"style":1064},[3015],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3017,"children":3018},{"class":1029,"line":374},[3019,3023,3027,3032,3037,3042,3047,3052,3056,3060],{"type":993,"tag":1027,"props":3020,"children":3021},{"style":1124},[3022],{"type":999,"value":2527},{"type":993,"tag":1027,"props":3024,"children":3025},{"style":1064},[3026],{"type":999,"value":1145},{"type":993,"tag":1027,"props":3028,"children":3029},{"style":1070},[3030],{"type":999,"value":3031},"\"=\"",{"type":993,"tag":1027,"props":3033,"children":3034},{"style":1084},[3035],{"type":999,"value":3036}," *",{"type":993,"tag":1027,"props":3038,"children":3039},{"style":1058},[3040],{"type":999,"value":3041}," 20",{"type":993,"tag":1027,"props":3043,"children":3044},{"style":1084},[3045],{"type":999,"value":3046}," +",{"type":993,"tag":1027,"props":3048,"children":3049},{"style":1070},[3050],{"type":999,"value":3051}," \"",{"type":993,"tag":1027,"props":3053,"children":3054},{"style":1058},[3055],{"type":999,"value":1155},{"type":993,"tag":1027,"props":3057,"children":3058},{"style":1070},[3059],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3061,"children":3062},{"style":1064},[3063],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3065,"children":3066},{"class":1029,"line":384},[3067],{"type":993,"tag":1027,"props":3068,"children":3069},{"style":1064},[3070],{"type":999,"value":3071},"        \n",{"type":993,"tag":1027,"props":3073,"children":3074},{"class":1029,"line":393},[3075,3080,3085,3090],{"type":993,"tag":1027,"props":3076,"children":3077},{"style":1084},[3078],{"type":999,"value":3079},"        for",{"type":993,"tag":1027,"props":3081,"children":3082},{"style":1064},[3083],{"type":999,"value":3084}," user ",{"type":993,"tag":1027,"props":3086,"children":3087},{"style":1084},[3088],{"type":999,"value":3089},"in",{"type":993,"tag":1027,"props":3091,"children":3092},{"style":1064},[3093],{"type":999,"value":3094}," users:\n",{"type":993,"tag":1027,"props":3096,"children":3097},{"class":1029,"line":402},[3098,3103,3107,3111,3115,3119,3124,3128,3132,3136,3141,3145,3149,3154,3158,3162,3167,3171,3175,3180,3184,3188],{"type":993,"tag":1027,"props":3099,"children":3100},{"style":1064},[3101],{"type":999,"value":3102},"            line ",{"type":993,"tag":1027,"props":3104,"children":3105},{"style":1084},[3106],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3108,"children":3109},{"style":1084},[3110],{"type":999,"value":2434},{"type":993,"tag":1027,"props":3112,"children":3113},{"style":1070},[3114],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3116,"children":3117},{"style":1058},[3118],{"type":999,"value":1805},{"type":993,"tag":1027,"props":3120,"children":3121},{"style":1064},[3122],{"type":999,"value":3123},"user[",{"type":993,"tag":1027,"props":3125,"children":3126},{"style":1070},[3127],{"type":999,"value":1815},{"type":993,"tag":1027,"props":3129,"children":3130},{"style":1064},[3131],{"type":999,"value":1820},{"type":993,"tag":1027,"props":3133,"children":3134},{"style":1058},[3135],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3137,"children":3138},{"style":1070},[3139],{"type":999,"value":3140}," (",{"type":993,"tag":1027,"props":3142,"children":3143},{"style":1058},[3144],{"type":999,"value":1805},{"type":993,"tag":1027,"props":3146,"children":3147},{"style":1064},[3148],{"type":999,"value":3123},{"type":993,"tag":1027,"props":3150,"children":3151},{"style":1070},[3152],{"type":999,"value":3153},"'email'",{"type":993,"tag":1027,"props":3155,"children":3156},{"style":1064},[3157],{"type":999,"value":1820},{"type":993,"tag":1027,"props":3159,"children":3160},{"style":1058},[3161],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3163,"children":3164},{"style":1070},[3165],{"type":999,"value":3166},") - ",{"type":993,"tag":1027,"props":3168,"children":3169},{"style":1058},[3170],{"type":999,"value":1805},{"type":993,"tag":1027,"props":3172,"children":3173},{"style":1064},[3174],{"type":999,"value":3123},{"type":993,"tag":1027,"props":3176,"children":3177},{"style":1070},[3178],{"type":999,"value":3179},"'role'",{"type":993,"tag":1027,"props":3181,"children":3182},{"style":1064},[3183],{"type":999,"value":1820},{"type":993,"tag":1027,"props":3185,"children":3186},{"style":1058},[3187],{"type":999,"value":1825},{"type":993,"tag":1027,"props":3189,"children":3190},{"style":1070},[3191],{"type":999,"value":2467},{"type":993,"tag":1027,"props":3193,"children":3194},{"class":1029,"line":411},[3195,3200],{"type":993,"tag":1027,"props":3196,"children":3197},{"style":1124},[3198],{"type":999,"value":3199},"            file",{"type":993,"tag":1027,"props":3201,"children":3202},{"style":1064},[3203],{"type":999,"value":3204},".write(line)\n",{"type":993,"tag":1027,"props":3206,"children":3207},{"class":1029,"line":420},[3208],{"type":993,"tag":1027,"props":3209,"children":3210},{"style":1064},[3211],{"type":999,"value":2373},{"type":993,"tag":1027,"props":3213,"children":3214},{"class":1029,"line":429},[3215,3219,3223,3228],{"type":993,"tag":1027,"props":3216,"children":3217},{"style":1058},[3218],{"type":999,"value":1301},{"type":993,"tag":1027,"props":3220,"children":3221},{"style":1064},[3222],{"type":999,"value":1067},{"type":993,"tag":1027,"props":3224,"children":3225},{"style":1070},[3226],{"type":999,"value":3227},"\"   👥 User data file created\"",{"type":993,"tag":1027,"props":3229,"children":3230},{"style":1064},[3231],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3233,"children":3234},{"class":1029,"line":438},[3235],{"type":993,"tag":1027,"props":3236,"children":3237},{"style":1064},[3238],{"type":999,"value":2373},{"type":993,"tag":1027,"props":3240,"children":3241},{"class":1029,"line":447},[3242],{"type":993,"tag":1027,"props":3243,"children":3244},{"style":1033},[3245],{"type":999,"value":3246},"    # Verify files were created\n",{"type":993,"tag":1027,"props":3248,"children":3249},{"class":1029,"line":457},[3250,3255],{"type":993,"tag":1027,"props":3251,"children":3252},{"style":1084},[3253],{"type":999,"value":3254},"    import",{"type":993,"tag":1027,"props":3256,"children":3257},{"style":1064},[3258],{"type":999,"value":3259}," os\n",{"type":993,"tag":1027,"props":3261,"children":3262},{"class":1029,"line":466},[3263,3268,3272,3277,3281,3285,3289,3293,3297],{"type":993,"tag":1027,"props":3264,"children":3265},{"style":1064},[3266],{"type":999,"value":3267},"    files ",{"type":993,"tag":1027,"props":3269,"children":3270},{"style":1084},[3271],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3273,"children":3274},{"style":1064},[3275],{"type":999,"value":3276}," [",{"type":993,"tag":1027,"props":3278,"children":3279},{"style":1070},[3280],{"type":999,"value":2495},{"type":993,"tag":1027,"props":3282,"children":3283},{"style":1064},[3284],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3286,"children":3287},{"style":1070},[3288],{"type":999,"value":2714},{"type":993,"tag":1027,"props":3290,"children":3291},{"style":1064},[3292],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3294,"children":3295},{"style":1070},[3296],{"type":999,"value":2963},{"type":993,"tag":1027,"props":3298,"children":3299},{"style":1064},[3300],{"type":999,"value":3301},"]\n",{"type":993,"tag":1027,"props":3303,"children":3304},{"class":1029,"line":475},[3305],{"type":993,"tag":1027,"props":3306,"children":3307},{"style":1064},[3308],{"type":999,"value":2373},{"type":993,"tag":1027,"props":3310,"children":3311},{"class":1029,"line":484},[3312,3316,3320,3324,3328,3333],{"type":993,"tag":1027,"props":3313,"children":3314},{"style":1058},[3315],{"type":999,"value":1301},{"type":993,"tag":1027,"props":3317,"children":3318},{"style":1064},[3319],{"type":999,"value":1067},{"type":993,"tag":1027,"props":3321,"children":3322},{"style":1070},[3323],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3325,"children":3326},{"style":1058},[3327],{"type":999,"value":1155},{"type":993,"tag":1027,"props":3329,"children":3330},{"style":1070},[3331],{"type":999,"value":3332},"📋 Verification:\"",{"type":993,"tag":1027,"props":3334,"children":3335},{"style":1064},[3336],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3338,"children":3339},{"class":1029,"line":493},[3340,3345,3350,3354],{"type":993,"tag":1027,"props":3341,"children":3342},{"style":1084},[3343],{"type":999,"value":3344},"    for",{"type":993,"tag":1027,"props":3346,"children":3347},{"style":1064},[3348],{"type":999,"value":3349}," filename ",{"type":993,"tag":1027,"props":3351,"children":3352},{"style":1084},[3353],{"type":999,"value":3089},{"type":993,"tag":1027,"props":3355,"children":3356},{"style":1064},[3357],{"type":999,"value":3358}," files:\n",{"type":993,"tag":1027,"props":3360,"children":3361},{"class":1029,"line":502},[3362,3367],{"type":993,"tag":1027,"props":3363,"children":3364},{"style":1084},[3365],{"type":999,"value":3366},"        if",{"type":993,"tag":1027,"props":3368,"children":3369},{"style":1064},[3370],{"type":999,"value":3371}," os.path.exists(filename):\n",{"type":993,"tag":1027,"props":3373,"children":3374},{"class":1029,"line":511},[3375,3380,3384],{"type":993,"tag":1027,"props":3376,"children":3377},{"style":1064},[3378],{"type":999,"value":3379},"            size ",{"type":993,"tag":1027,"props":3381,"children":3382},{"style":1084},[3383],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3385,"children":3386},{"style":1064},[3387],{"type":999,"value":3388}," os.path.getsize(filename)\n",{"type":993,"tag":1027,"props":3390,"children":3391},{"class":1029,"line":520},[3392,3397,3401,3405,3410,3414,3419,3423,3427,3431,3436,3440,3445],{"type":993,"tag":1027,"props":3393,"children":3394},{"style":1058},[3395],{"type":999,"value":3396},"            print",{"type":993,"tag":1027,"props":3398,"children":3399},{"style":1064},[3400],{"type":999,"value":1067},{"type":993,"tag":1027,"props":3402,"children":3403},{"style":1084},[3404],{"type":999,"value":1763},{"type":993,"tag":1027,"props":3406,"children":3407},{"style":1070},[3408],{"type":999,"value":3409},"\"   ✅ ",{"type":993,"tag":1027,"props":3411,"children":3412},{"style":1058},[3413],{"type":999,"value":1805},{"type":993,"tag":1027,"props":3415,"children":3416},{"style":1064},[3417],{"type":999,"value":3418},"filename",{"type":993,"tag":1027,"props":3420,"children":3421},{"style":1058},[3422],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3424,"children":3425},{"style":1070},[3426],{"type":999,"value":3140},{"type":993,"tag":1027,"props":3428,"children":3429},{"style":1058},[3430],{"type":999,"value":1805},{"type":993,"tag":1027,"props":3432,"children":3433},{"style":1064},[3434],{"type":999,"value":3435},"size",{"type":993,"tag":1027,"props":3437,"children":3438},{"style":1058},[3439],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3441,"children":3442},{"style":1070},[3443],{"type":999,"value":3444}," bytes)\"",{"type":993,"tag":1027,"props":3446,"children":3447},{"style":1064},[3448],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3450,"children":3451},{"class":1029,"line":530},[3452],{"type":993,"tag":1027,"props":3453,"children":3454},{"emptyLinePlaceholder":13},[3455],{"type":999,"value":1044},{"type":993,"tag":1027,"props":3457,"children":3458},{"class":1029,"line":539},[3459],{"type":993,"tag":1027,"props":3460,"children":3461},{"style":1064},[3462],{"type":999,"value":3463},"create_basic_files()\n",{"type":993,"tag":2261,"props":3465,"children":3467},{"id":3466},"formatted-content-writing",[3468],{"type":999,"value":3469},"🎨 Formatted Content Writing",{"type":993,"tag":1002,"props":3471,"children":3472},{},[3473],{"type":999,"value":3474},"Proper formatting makes your files readable and professional-looking for both humans and other programs.",{"type":993,"tag":1013,"props":3476,"children":3477},{},[3478],{"type":993,"tag":1017,"props":3479,"children":3481},{"className":1019,"code":3480,"language":6,"meta":8,"style":8},"# 📊 Formatted File Writing Examples\n\ndef create_formatted_files():\n    print(\"🎨 Creating formatted reports:\")\n    \n    # 1. Sales report with formatting\n    sales_data = [\n        (\"Product A\", 150, 99.99),\n        (\"Product B\", 75, 149.99),\n        (\"Product C\", 200, 49.99)\n    ]\n    \n    with open(\"sales_report.txt\", \"w\") as file:\n        file.write(\"SALES REPORT\\n\")\n        file.write(\"=\" * 40 + \"\\n\")\n        file.write(f\"{'Product':\u003C12} {'Qty':\u003C5} {'Price':\u003C8} {'Total':\u003C10}\\n\")\n        file.write(\"-\" * 40 + \"\\n\")\n        \n        total_revenue = 0\n        for product, qty, price in sales_data:\n            total = qty * price\n            total_revenue += total\n            file.write(f\"{product:\u003C12} {qty:\u003C5} ${price:\u003C7.2f} ${total:\u003C9.2f}\\n\")\n        \n        file.write(\"-\" * 40 + \"\\n\")\n        file.write(f\"{'TOTAL REVENUE':\u003C25} ${total_revenue:\u003C9.2f}\\n\")\n    \n    print(\"   📈 Sales report created\")\n    \n    # 2. CSV format data\n    csv_data = [\n        [\"Name\", \"Age\", \"Department\"],\n        [\"Alice\", \"28\", \"Engineering\"],\n        [\"Bob\", \"32\", \"Marketing\"],\n        [\"Carol\", \"26\", \"Design\"]\n    ]\n    \n    with open(\"employees.csv\", \"w\") as file:\n        for row in csv_data:\n            file.write(\",\".join(row) + \"\\n\")\n    \n    print(\"   📋 CSV file created\")\n    \n    # 3. JSON-style data\n    import json\n    \n    app_data = {\n        \"app_name\": \"My Python App\",\n        \"version\": \"1.0\",\n        \"users\": [\"Alice\", \"Bob\", \"Carol\"],\n        \"settings\": {\n            \"theme\": \"dark\",\n            \"auto_save\": True\n        }\n    }\n    \n    with open(\"app_data.json\", \"w\") as file:\n        json.dump(app_data, file, indent=2)\n    \n    print(\"   📦 JSON file created\")\n\ncreate_formatted_files()\n",[3482],{"type":993,"tag":1023,"props":3483,"children":3484},{"__ignoreMap":8},[3485,3493,3500,3516,3536,3543,3551,3567,3603,3637,3671,3678,3685,3729,3757,3801,3900,3944,3951,3968,3989,4016,4034,4140,4147,4190,4256,4263,4283,4290,4298,4314,4350,4383,4416,4450,4457,4464,4508,4529,4571,4578,4598,4605,4613,4625,4632,4649,4671,4692,4729,4742,4763,4780,4788,4796,4803,4847,4882,4889,4909,4916],{"type":993,"tag":1027,"props":3486,"children":3487},{"class":1029,"line":12},[3488],{"type":993,"tag":1027,"props":3489,"children":3490},{"style":1033},[3491],{"type":999,"value":3492},"# 📊 Formatted File Writing Examples\n",{"type":993,"tag":1027,"props":3494,"children":3495},{"class":1029,"line":27},[3496],{"type":993,"tag":1027,"props":3497,"children":3498},{"emptyLinePlaceholder":13},[3499],{"type":999,"value":1044},{"type":993,"tag":1027,"props":3501,"children":3502},{"class":1029,"line":36},[3503,3507,3512],{"type":993,"tag":1027,"props":3504,"children":3505},{"style":1084},[3506],{"type":999,"value":2334},{"type":993,"tag":1027,"props":3508,"children":3509},{"style":2337},[3510],{"type":999,"value":3511}," create_formatted_files",{"type":993,"tag":1027,"props":3513,"children":3514},{"style":1064},[3515],{"type":999,"value":2345},{"type":993,"tag":1027,"props":3517,"children":3518},{"class":1029,"line":45},[3519,3523,3527,3532],{"type":993,"tag":1027,"props":3520,"children":3521},{"style":1058},[3522],{"type":999,"value":1301},{"type":993,"tag":1027,"props":3524,"children":3525},{"style":1064},[3526],{"type":999,"value":1067},{"type":993,"tag":1027,"props":3528,"children":3529},{"style":1070},[3530],{"type":999,"value":3531},"\"🎨 Creating formatted reports:\"",{"type":993,"tag":1027,"props":3533,"children":3534},{"style":1064},[3535],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3537,"children":3538},{"class":1029,"line":54},[3539],{"type":993,"tag":1027,"props":3540,"children":3541},{"style":1064},[3542],{"type":999,"value":2373},{"type":993,"tag":1027,"props":3544,"children":3545},{"class":1029,"line":63},[3546],{"type":993,"tag":1027,"props":3547,"children":3548},{"style":1033},[3549],{"type":999,"value":3550},"    # 1. Sales report with formatting\n",{"type":993,"tag":1027,"props":3552,"children":3553},{"class":1029,"line":72},[3554,3559,3563],{"type":993,"tag":1027,"props":3555,"children":3556},{"style":1064},[3557],{"type":999,"value":3558},"    sales_data ",{"type":993,"tag":1027,"props":3560,"children":3561},{"style":1084},[3562],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3564,"children":3565},{"style":1064},[3566],{"type":999,"value":2809},{"type":993,"tag":1027,"props":3568,"children":3569},{"class":1029,"line":81},[3570,3575,3580,3584,3589,3593,3598],{"type":993,"tag":1027,"props":3571,"children":3572},{"style":1064},[3573],{"type":999,"value":3574},"        (",{"type":993,"tag":1027,"props":3576,"children":3577},{"style":1070},[3578],{"type":999,"value":3579},"\"Product A\"",{"type":993,"tag":1027,"props":3581,"children":3582},{"style":1064},[3583],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3585,"children":3586},{"style":1058},[3587],{"type":999,"value":3588},"150",{"type":993,"tag":1027,"props":3590,"children":3591},{"style":1064},[3592],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3594,"children":3595},{"style":1058},[3596],{"type":999,"value":3597},"99.99",{"type":993,"tag":1027,"props":3599,"children":3600},{"style":1064},[3601],{"type":999,"value":3602},"),\n",{"type":993,"tag":1027,"props":3604,"children":3605},{"class":1029,"line":91},[3606,3610,3615,3619,3624,3628,3633],{"type":993,"tag":1027,"props":3607,"children":3608},{"style":1064},[3609],{"type":999,"value":3574},{"type":993,"tag":1027,"props":3611,"children":3612},{"style":1070},[3613],{"type":999,"value":3614},"\"Product B\"",{"type":993,"tag":1027,"props":3616,"children":3617},{"style":1064},[3618],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3620,"children":3621},{"style":1058},[3622],{"type":999,"value":3623},"75",{"type":993,"tag":1027,"props":3625,"children":3626},{"style":1064},[3627],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3629,"children":3630},{"style":1058},[3631],{"type":999,"value":3632},"149.99",{"type":993,"tag":1027,"props":3634,"children":3635},{"style":1064},[3636],{"type":999,"value":3602},{"type":993,"tag":1027,"props":3638,"children":3639},{"class":1029,"line":100},[3640,3644,3649,3653,3658,3662,3667],{"type":993,"tag":1027,"props":3641,"children":3642},{"style":1064},[3643],{"type":999,"value":3574},{"type":993,"tag":1027,"props":3645,"children":3646},{"style":1070},[3647],{"type":999,"value":3648},"\"Product C\"",{"type":993,"tag":1027,"props":3650,"children":3651},{"style":1064},[3652],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3654,"children":3655},{"style":1058},[3656],{"type":999,"value":3657},"200",{"type":993,"tag":1027,"props":3659,"children":3660},{"style":1064},[3661],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3663,"children":3664},{"style":1058},[3665],{"type":999,"value":3666},"49.99",{"type":993,"tag":1027,"props":3668,"children":3669},{"style":1064},[3670],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3672,"children":3673},{"class":1029,"line":109},[3674],{"type":993,"tag":1027,"props":3675,"children":3676},{"style":1064},[3677],{"type":999,"value":2936},{"type":993,"tag":1027,"props":3679,"children":3680},{"class":1029,"line":118},[3681],{"type":993,"tag":1027,"props":3682,"children":3683},{"style":1064},[3684],{"type":999,"value":2373},{"type":993,"tag":1027,"props":3686,"children":3687},{"class":1029,"line":127},[3688,3692,3696,3700,3705,3709,3713,3717,3721,3725],{"type":993,"tag":1027,"props":3689,"children":3690},{"style":1084},[3691],{"type":999,"value":2482},{"type":993,"tag":1027,"props":3693,"children":3694},{"style":1058},[3695],{"type":999,"value":1092},{"type":993,"tag":1027,"props":3697,"children":3698},{"style":1064},[3699],{"type":999,"value":1067},{"type":993,"tag":1027,"props":3701,"children":3702},{"style":1070},[3703],{"type":999,"value":3704},"\"sales_report.txt\"",{"type":993,"tag":1027,"props":3706,"children":3707},{"style":1064},[3708],{"type":999,"value":1106},{"type":993,"tag":1027,"props":3710,"children":3711},{"style":1070},[3712],{"type":999,"value":1111},{"type":993,"tag":1027,"props":3714,"children":3715},{"style":1064},[3716],{"type":999,"value":1116},{"type":993,"tag":1027,"props":3718,"children":3719},{"style":1084},[3720],{"type":999,"value":1121},{"type":993,"tag":1027,"props":3722,"children":3723},{"style":1124},[3724],{"type":999,"value":1127},{"type":993,"tag":1027,"props":3726,"children":3727},{"style":1064},[3728],{"type":999,"value":1132},{"type":993,"tag":1027,"props":3730,"children":3731},{"class":1029,"line":136},[3732,3736,3740,3745,3749,3753],{"type":993,"tag":1027,"props":3733,"children":3734},{"style":1124},[3735],{"type":999,"value":2527},{"type":993,"tag":1027,"props":3737,"children":3738},{"style":1064},[3739],{"type":999,"value":1145},{"type":993,"tag":1027,"props":3741,"children":3742},{"style":1070},[3743],{"type":999,"value":3744},"\"SALES REPORT",{"type":993,"tag":1027,"props":3746,"children":3747},{"style":1058},[3748],{"type":999,"value":1155},{"type":993,"tag":1027,"props":3750,"children":3751},{"style":1070},[3752],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3754,"children":3755},{"style":1064},[3756],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3758,"children":3759},{"class":1029,"line":146},[3760,3764,3768,3772,3776,3781,3785,3789,3793,3797],{"type":993,"tag":1027,"props":3761,"children":3762},{"style":1124},[3763],{"type":999,"value":2527},{"type":993,"tag":1027,"props":3765,"children":3766},{"style":1064},[3767],{"type":999,"value":1145},{"type":993,"tag":1027,"props":3769,"children":3770},{"style":1070},[3771],{"type":999,"value":3031},{"type":993,"tag":1027,"props":3773,"children":3774},{"style":1084},[3775],{"type":999,"value":3036},{"type":993,"tag":1027,"props":3777,"children":3778},{"style":1058},[3779],{"type":999,"value":3780}," 40",{"type":993,"tag":1027,"props":3782,"children":3783},{"style":1084},[3784],{"type":999,"value":3046},{"type":993,"tag":1027,"props":3786,"children":3787},{"style":1070},[3788],{"type":999,"value":3051},{"type":993,"tag":1027,"props":3790,"children":3791},{"style":1058},[3792],{"type":999,"value":1155},{"type":993,"tag":1027,"props":3794,"children":3795},{"style":1070},[3796],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3798,"children":3799},{"style":1064},[3800],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3802,"children":3803},{"class":1029,"line":155},[3804,3808,3812,3816,3820,3824,3829,3834,3838,3842,3847,3852,3856,3860,3865,3870,3874,3878,3883,3888,3892,3896],{"type":993,"tag":1027,"props":3805,"children":3806},{"style":1124},[3807],{"type":999,"value":2527},{"type":993,"tag":1027,"props":3809,"children":3810},{"style":1064},[3811],{"type":999,"value":1145},{"type":993,"tag":1027,"props":3813,"children":3814},{"style":1084},[3815],{"type":999,"value":1763},{"type":993,"tag":1027,"props":3817,"children":3818},{"style":1070},[3819],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3821,"children":3822},{"style":1058},[3823],{"type":999,"value":1805},{"type":993,"tag":1027,"props":3825,"children":3826},{"style":1070},[3827],{"type":999,"value":3828},"'Product'",{"type":993,"tag":1027,"props":3830,"children":3831},{"style":1084},[3832],{"type":999,"value":3833},":\u003C12",{"type":993,"tag":1027,"props":3835,"children":3836},{"style":1058},[3837],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3839,"children":3840},{"style":1058},[3841],{"type":999,"value":1640},{"type":993,"tag":1027,"props":3843,"children":3844},{"style":1070},[3845],{"type":999,"value":3846},"'Qty'",{"type":993,"tag":1027,"props":3848,"children":3849},{"style":1084},[3850],{"type":999,"value":3851},":\u003C5",{"type":993,"tag":1027,"props":3853,"children":3854},{"style":1058},[3855],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3857,"children":3858},{"style":1058},[3859],{"type":999,"value":1640},{"type":993,"tag":1027,"props":3861,"children":3862},{"style":1070},[3863],{"type":999,"value":3864},"'Price'",{"type":993,"tag":1027,"props":3866,"children":3867},{"style":1084},[3868],{"type":999,"value":3869},":\u003C8",{"type":993,"tag":1027,"props":3871,"children":3872},{"style":1058},[3873],{"type":999,"value":2453},{"type":993,"tag":1027,"props":3875,"children":3876},{"style":1058},[3877],{"type":999,"value":1640},{"type":993,"tag":1027,"props":3879,"children":3880},{"style":1070},[3881],{"type":999,"value":3882},"'Total'",{"type":993,"tag":1027,"props":3884,"children":3885},{"style":1084},[3886],{"type":999,"value":3887},":\u003C10",{"type":993,"tag":1027,"props":3889,"children":3890},{"style":1058},[3891],{"type":999,"value":1825},{"type":993,"tag":1027,"props":3893,"children":3894},{"style":1070},[3895],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3897,"children":3898},{"style":1064},[3899],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3901,"children":3902},{"class":1029,"line":164},[3903,3907,3911,3916,3920,3924,3928,3932,3936,3940],{"type":993,"tag":1027,"props":3904,"children":3905},{"style":1124},[3906],{"type":999,"value":2527},{"type":993,"tag":1027,"props":3908,"children":3909},{"style":1064},[3910],{"type":999,"value":1145},{"type":993,"tag":1027,"props":3912,"children":3913},{"style":1070},[3914],{"type":999,"value":3915},"\"-\"",{"type":993,"tag":1027,"props":3917,"children":3918},{"style":1084},[3919],{"type":999,"value":3036},{"type":993,"tag":1027,"props":3921,"children":3922},{"style":1058},[3923],{"type":999,"value":3780},{"type":993,"tag":1027,"props":3925,"children":3926},{"style":1084},[3927],{"type":999,"value":3046},{"type":993,"tag":1027,"props":3929,"children":3930},{"style":1070},[3931],{"type":999,"value":3051},{"type":993,"tag":1027,"props":3933,"children":3934},{"style":1058},[3935],{"type":999,"value":1155},{"type":993,"tag":1027,"props":3937,"children":3938},{"style":1070},[3939],{"type":999,"value":1160},{"type":993,"tag":1027,"props":3941,"children":3942},{"style":1064},[3943],{"type":999,"value":1078},{"type":993,"tag":1027,"props":3945,"children":3946},{"class":1029,"line":173},[3947],{"type":993,"tag":1027,"props":3948,"children":3949},{"style":1064},[3950],{"type":999,"value":3071},{"type":993,"tag":1027,"props":3952,"children":3953},{"class":1029,"line":182},[3954,3959,3963],{"type":993,"tag":1027,"props":3955,"children":3956},{"style":1064},[3957],{"type":999,"value":3958},"        total_revenue ",{"type":993,"tag":1027,"props":3960,"children":3961},{"style":1084},[3962],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3964,"children":3965},{"style":1058},[3966],{"type":999,"value":3967}," 0\n",{"type":993,"tag":1027,"props":3969,"children":3970},{"class":1029,"line":191},[3971,3975,3980,3984],{"type":993,"tag":1027,"props":3972,"children":3973},{"style":1084},[3974],{"type":999,"value":3079},{"type":993,"tag":1027,"props":3976,"children":3977},{"style":1064},[3978],{"type":999,"value":3979}," product, qty, price ",{"type":993,"tag":1027,"props":3981,"children":3982},{"style":1084},[3983],{"type":999,"value":3089},{"type":993,"tag":1027,"props":3985,"children":3986},{"style":1064},[3987],{"type":999,"value":3988}," sales_data:\n",{"type":993,"tag":1027,"props":3990,"children":3991},{"class":1029,"line":201},[3992,3997,4001,4006,4011],{"type":993,"tag":1027,"props":3993,"children":3994},{"style":1064},[3995],{"type":999,"value":3996},"            total ",{"type":993,"tag":1027,"props":3998,"children":3999},{"style":1084},[4000],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4002,"children":4003},{"style":1064},[4004],{"type":999,"value":4005}," qty ",{"type":993,"tag":1027,"props":4007,"children":4008},{"style":1084},[4009],{"type":999,"value":4010},"*",{"type":993,"tag":1027,"props":4012,"children":4013},{"style":1064},[4014],{"type":999,"value":4015}," price\n",{"type":993,"tag":1027,"props":4017,"children":4018},{"class":1029,"line":210},[4019,4024,4029],{"type":993,"tag":1027,"props":4020,"children":4021},{"style":1064},[4022],{"type":999,"value":4023},"            total_revenue ",{"type":993,"tag":1027,"props":4025,"children":4026},{"style":1084},[4027],{"type":999,"value":4028},"+=",{"type":993,"tag":1027,"props":4030,"children":4031},{"style":1064},[4032],{"type":999,"value":4033}," total\n",{"type":993,"tag":1027,"props":4035,"children":4036},{"class":1029,"line":219},[4037,4041,4045,4049,4053,4057,4062,4066,4070,4074,4079,4083,4087,4092,4096,4101,4106,4110,4114,4118,4123,4128,4132,4136],{"type":993,"tag":1027,"props":4038,"children":4039},{"style":1124},[4040],{"type":999,"value":3199},{"type":993,"tag":1027,"props":4042,"children":4043},{"style":1064},[4044],{"type":999,"value":1145},{"type":993,"tag":1027,"props":4046,"children":4047},{"style":1084},[4048],{"type":999,"value":1763},{"type":993,"tag":1027,"props":4050,"children":4051},{"style":1070},[4052],{"type":999,"value":1160},{"type":993,"tag":1027,"props":4054,"children":4055},{"style":1058},[4056],{"type":999,"value":1805},{"type":993,"tag":1027,"props":4058,"children":4059},{"style":1064},[4060],{"type":999,"value":4061},"product",{"type":993,"tag":1027,"props":4063,"children":4064},{"style":1084},[4065],{"type":999,"value":3833},{"type":993,"tag":1027,"props":4067,"children":4068},{"style":1058},[4069],{"type":999,"value":2453},{"type":993,"tag":1027,"props":4071,"children":4072},{"style":1058},[4073],{"type":999,"value":1640},{"type":993,"tag":1027,"props":4075,"children":4076},{"style":1064},[4077],{"type":999,"value":4078},"qty",{"type":993,"tag":1027,"props":4080,"children":4081},{"style":1084},[4082],{"type":999,"value":3851},{"type":993,"tag":1027,"props":4084,"children":4085},{"style":1058},[4086],{"type":999,"value":2453},{"type":993,"tag":1027,"props":4088,"children":4089},{"style":1070},[4090],{"type":999,"value":4091}," $",{"type":993,"tag":1027,"props":4093,"children":4094},{"style":1058},[4095],{"type":999,"value":1805},{"type":993,"tag":1027,"props":4097,"children":4098},{"style":1064},[4099],{"type":999,"value":4100},"price",{"type":993,"tag":1027,"props":4102,"children":4103},{"style":1084},[4104],{"type":999,"value":4105},":\u003C7.2f",{"type":993,"tag":1027,"props":4107,"children":4108},{"style":1058},[4109],{"type":999,"value":2453},{"type":993,"tag":1027,"props":4111,"children":4112},{"style":1070},[4113],{"type":999,"value":4091},{"type":993,"tag":1027,"props":4115,"children":4116},{"style":1058},[4117],{"type":999,"value":1805},{"type":993,"tag":1027,"props":4119,"children":4120},{"style":1064},[4121],{"type":999,"value":4122},"total",{"type":993,"tag":1027,"props":4124,"children":4125},{"style":1084},[4126],{"type":999,"value":4127},":\u003C9.2f",{"type":993,"tag":1027,"props":4129,"children":4130},{"style":1058},[4131],{"type":999,"value":1825},{"type":993,"tag":1027,"props":4133,"children":4134},{"style":1070},[4135],{"type":999,"value":1160},{"type":993,"tag":1027,"props":4137,"children":4138},{"style":1064},[4139],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4141,"children":4142},{"class":1029,"line":228},[4143],{"type":993,"tag":1027,"props":4144,"children":4145},{"style":1064},[4146],{"type":999,"value":3071},{"type":993,"tag":1027,"props":4148,"children":4149},{"class":1029,"line":238},[4150,4154,4158,4162,4166,4170,4174,4178,4182,4186],{"type":993,"tag":1027,"props":4151,"children":4152},{"style":1124},[4153],{"type":999,"value":2527},{"type":993,"tag":1027,"props":4155,"children":4156},{"style":1064},[4157],{"type":999,"value":1145},{"type":993,"tag":1027,"props":4159,"children":4160},{"style":1070},[4161],{"type":999,"value":3915},{"type":993,"tag":1027,"props":4163,"children":4164},{"style":1084},[4165],{"type":999,"value":3036},{"type":993,"tag":1027,"props":4167,"children":4168},{"style":1058},[4169],{"type":999,"value":3780},{"type":993,"tag":1027,"props":4171,"children":4172},{"style":1084},[4173],{"type":999,"value":3046},{"type":993,"tag":1027,"props":4175,"children":4176},{"style":1070},[4177],{"type":999,"value":3051},{"type":993,"tag":1027,"props":4179,"children":4180},{"style":1058},[4181],{"type":999,"value":1155},{"type":993,"tag":1027,"props":4183,"children":4184},{"style":1070},[4185],{"type":999,"value":1160},{"type":993,"tag":1027,"props":4187,"children":4188},{"style":1064},[4189],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4191,"children":4192},{"class":1029,"line":247},[4193,4197,4201,4205,4209,4213,4218,4223,4227,4231,4235,4240,4244,4248,4252],{"type":993,"tag":1027,"props":4194,"children":4195},{"style":1124},[4196],{"type":999,"value":2527},{"type":993,"tag":1027,"props":4198,"children":4199},{"style":1064},[4200],{"type":999,"value":1145},{"type":993,"tag":1027,"props":4202,"children":4203},{"style":1084},[4204],{"type":999,"value":1763},{"type":993,"tag":1027,"props":4206,"children":4207},{"style":1070},[4208],{"type":999,"value":1160},{"type":993,"tag":1027,"props":4210,"children":4211},{"style":1058},[4212],{"type":999,"value":1805},{"type":993,"tag":1027,"props":4214,"children":4215},{"style":1070},[4216],{"type":999,"value":4217},"'TOTAL REVENUE'",{"type":993,"tag":1027,"props":4219,"children":4220},{"style":1084},[4221],{"type":999,"value":4222},":\u003C25",{"type":993,"tag":1027,"props":4224,"children":4225},{"style":1058},[4226],{"type":999,"value":2453},{"type":993,"tag":1027,"props":4228,"children":4229},{"style":1070},[4230],{"type":999,"value":4091},{"type":993,"tag":1027,"props":4232,"children":4233},{"style":1058},[4234],{"type":999,"value":1805},{"type":993,"tag":1027,"props":4236,"children":4237},{"style":1064},[4238],{"type":999,"value":4239},"total_revenue",{"type":993,"tag":1027,"props":4241,"children":4242},{"style":1084},[4243],{"type":999,"value":4127},{"type":993,"tag":1027,"props":4245,"children":4246},{"style":1058},[4247],{"type":999,"value":1825},{"type":993,"tag":1027,"props":4249,"children":4250},{"style":1070},[4251],{"type":999,"value":1160},{"type":993,"tag":1027,"props":4253,"children":4254},{"style":1064},[4255],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4257,"children":4258},{"class":1029,"line":256},[4259],{"type":993,"tag":1027,"props":4260,"children":4261},{"style":1064},[4262],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4264,"children":4265},{"class":1029,"line":265},[4266,4270,4274,4279],{"type":993,"tag":1027,"props":4267,"children":4268},{"style":1058},[4269],{"type":999,"value":1301},{"type":993,"tag":1027,"props":4271,"children":4272},{"style":1064},[4273],{"type":999,"value":1067},{"type":993,"tag":1027,"props":4275,"children":4276},{"style":1070},[4277],{"type":999,"value":4278},"\"   📈 Sales report created\"",{"type":993,"tag":1027,"props":4280,"children":4281},{"style":1064},[4282],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4284,"children":4285},{"class":1029,"line":274},[4286],{"type":993,"tag":1027,"props":4287,"children":4288},{"style":1064},[4289],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4291,"children":4292},{"class":1029,"line":284},[4293],{"type":993,"tag":1027,"props":4294,"children":4295},{"style":1033},[4296],{"type":999,"value":4297},"    # 2. CSV format data\n",{"type":993,"tag":1027,"props":4299,"children":4300},{"class":1029,"line":293},[4301,4306,4310],{"type":993,"tag":1027,"props":4302,"children":4303},{"style":1064},[4304],{"type":999,"value":4305},"    csv_data ",{"type":993,"tag":1027,"props":4307,"children":4308},{"style":1084},[4309],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4311,"children":4312},{"style":1064},[4313],{"type":999,"value":2809},{"type":993,"tag":1027,"props":4315,"children":4316},{"class":1029,"line":302},[4317,4322,4327,4331,4336,4340,4345],{"type":993,"tag":1027,"props":4318,"children":4319},{"style":1064},[4320],{"type":999,"value":4321},"        [",{"type":993,"tag":1027,"props":4323,"children":4324},{"style":1070},[4325],{"type":999,"value":4326},"\"Name\"",{"type":993,"tag":1027,"props":4328,"children":4329},{"style":1064},[4330],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4332,"children":4333},{"style":1070},[4334],{"type":999,"value":4335},"\"Age\"",{"type":993,"tag":1027,"props":4337,"children":4338},{"style":1064},[4339],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4341,"children":4342},{"style":1070},[4343],{"type":999,"value":4344},"\"Department\"",{"type":993,"tag":1027,"props":4346,"children":4347},{"style":1064},[4348],{"type":999,"value":4349},"],\n",{"type":993,"tag":1027,"props":4351,"children":4352},{"class":1029,"line":311},[4353,4357,4361,4365,4370,4374,4379],{"type":993,"tag":1027,"props":4354,"children":4355},{"style":1064},[4356],{"type":999,"value":4321},{"type":993,"tag":1027,"props":4358,"children":4359},{"style":1070},[4360],{"type":999,"value":1655},{"type":993,"tag":1027,"props":4362,"children":4363},{"style":1064},[4364],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4366,"children":4367},{"style":1070},[4368],{"type":999,"value":4369},"\"28\"",{"type":993,"tag":1027,"props":4371,"children":4372},{"style":1064},[4373],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4375,"children":4376},{"style":1070},[4377],{"type":999,"value":4378},"\"Engineering\"",{"type":993,"tag":1027,"props":4380,"children":4381},{"style":1064},[4382],{"type":999,"value":4349},{"type":993,"tag":1027,"props":4384,"children":4385},{"class":1029,"line":320},[4386,4390,4394,4398,4403,4407,4412],{"type":993,"tag":1027,"props":4387,"children":4388},{"style":1064},[4389],{"type":999,"value":4321},{"type":993,"tag":1027,"props":4391,"children":4392},{"style":1070},[4393],{"type":999,"value":2890},{"type":993,"tag":1027,"props":4395,"children":4396},{"style":1064},[4397],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4399,"children":4400},{"style":1070},[4401],{"type":999,"value":4402},"\"32\"",{"type":993,"tag":1027,"props":4404,"children":4405},{"style":1064},[4406],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4408,"children":4409},{"style":1070},[4410],{"type":999,"value":4411},"\"Marketing\"",{"type":993,"tag":1027,"props":4413,"children":4414},{"style":1064},[4415],{"type":999,"value":4349},{"type":993,"tag":1027,"props":4417,"children":4418},{"class":1029,"line":329},[4419,4423,4428,4432,4437,4441,4446],{"type":993,"tag":1027,"props":4420,"children":4421},{"style":1064},[4422],{"type":999,"value":4321},{"type":993,"tag":1027,"props":4424,"children":4425},{"style":1070},[4426],{"type":999,"value":4427},"\"Carol\"",{"type":993,"tag":1027,"props":4429,"children":4430},{"style":1064},[4431],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4433,"children":4434},{"style":1070},[4435],{"type":999,"value":4436},"\"26\"",{"type":993,"tag":1027,"props":4438,"children":4439},{"style":1064},[4440],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4442,"children":4443},{"style":1070},[4444],{"type":999,"value":4445},"\"Design\"",{"type":993,"tag":1027,"props":4447,"children":4448},{"style":1064},[4449],{"type":999,"value":3301},{"type":993,"tag":1027,"props":4451,"children":4452},{"class":1029,"line":338},[4453],{"type":993,"tag":1027,"props":4454,"children":4455},{"style":1064},[4456],{"type":999,"value":2936},{"type":993,"tag":1027,"props":4458,"children":4459},{"class":1029,"line":347},[4460],{"type":993,"tag":1027,"props":4461,"children":4462},{"style":1064},[4463],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4465,"children":4466},{"class":1029,"line":356},[4467,4471,4475,4479,4484,4488,4492,4496,4500,4504],{"type":993,"tag":1027,"props":4468,"children":4469},{"style":1084},[4470],{"type":999,"value":2482},{"type":993,"tag":1027,"props":4472,"children":4473},{"style":1058},[4474],{"type":999,"value":1092},{"type":993,"tag":1027,"props":4476,"children":4477},{"style":1064},[4478],{"type":999,"value":1067},{"type":993,"tag":1027,"props":4480,"children":4481},{"style":1070},[4482],{"type":999,"value":4483},"\"employees.csv\"",{"type":993,"tag":1027,"props":4485,"children":4486},{"style":1064},[4487],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4489,"children":4490},{"style":1070},[4491],{"type":999,"value":1111},{"type":993,"tag":1027,"props":4493,"children":4494},{"style":1064},[4495],{"type":999,"value":1116},{"type":993,"tag":1027,"props":4497,"children":4498},{"style":1084},[4499],{"type":999,"value":1121},{"type":993,"tag":1027,"props":4501,"children":4502},{"style":1124},[4503],{"type":999,"value":1127},{"type":993,"tag":1027,"props":4505,"children":4506},{"style":1064},[4507],{"type":999,"value":1132},{"type":993,"tag":1027,"props":4509,"children":4510},{"class":1029,"line":365},[4511,4515,4520,4524],{"type":993,"tag":1027,"props":4512,"children":4513},{"style":1084},[4514],{"type":999,"value":3079},{"type":993,"tag":1027,"props":4516,"children":4517},{"style":1064},[4518],{"type":999,"value":4519}," row ",{"type":993,"tag":1027,"props":4521,"children":4522},{"style":1084},[4523],{"type":999,"value":3089},{"type":993,"tag":1027,"props":4525,"children":4526},{"style":1064},[4527],{"type":999,"value":4528}," csv_data:\n",{"type":993,"tag":1027,"props":4530,"children":4531},{"class":1029,"line":374},[4532,4536,4540,4545,4550,4555,4559,4563,4567],{"type":993,"tag":1027,"props":4533,"children":4534},{"style":1124},[4535],{"type":999,"value":3199},{"type":993,"tag":1027,"props":4537,"children":4538},{"style":1064},[4539],{"type":999,"value":1145},{"type":993,"tag":1027,"props":4541,"children":4542},{"style":1070},[4543],{"type":999,"value":4544},"\",\"",{"type":993,"tag":1027,"props":4546,"children":4547},{"style":1064},[4548],{"type":999,"value":4549},".join(row) ",{"type":993,"tag":1027,"props":4551,"children":4552},{"style":1084},[4553],{"type":999,"value":4554},"+",{"type":993,"tag":1027,"props":4556,"children":4557},{"style":1070},[4558],{"type":999,"value":3051},{"type":993,"tag":1027,"props":4560,"children":4561},{"style":1058},[4562],{"type":999,"value":1155},{"type":993,"tag":1027,"props":4564,"children":4565},{"style":1070},[4566],{"type":999,"value":1160},{"type":993,"tag":1027,"props":4568,"children":4569},{"style":1064},[4570],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4572,"children":4573},{"class":1029,"line":384},[4574],{"type":993,"tag":1027,"props":4575,"children":4576},{"style":1064},[4577],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4579,"children":4580},{"class":1029,"line":393},[4581,4585,4589,4594],{"type":993,"tag":1027,"props":4582,"children":4583},{"style":1058},[4584],{"type":999,"value":1301},{"type":993,"tag":1027,"props":4586,"children":4587},{"style":1064},[4588],{"type":999,"value":1067},{"type":993,"tag":1027,"props":4590,"children":4591},{"style":1070},[4592],{"type":999,"value":4593},"\"   📋 CSV file created\"",{"type":993,"tag":1027,"props":4595,"children":4596},{"style":1064},[4597],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4599,"children":4600},{"class":1029,"line":402},[4601],{"type":993,"tag":1027,"props":4602,"children":4603},{"style":1064},[4604],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4606,"children":4607},{"class":1029,"line":411},[4608],{"type":993,"tag":1027,"props":4609,"children":4610},{"style":1033},[4611],{"type":999,"value":4612},"    # 3. JSON-style data\n",{"type":993,"tag":1027,"props":4614,"children":4615},{"class":1029,"line":420},[4616,4620],{"type":993,"tag":1027,"props":4617,"children":4618},{"style":1084},[4619],{"type":999,"value":3254},{"type":993,"tag":1027,"props":4621,"children":4622},{"style":1064},[4623],{"type":999,"value":4624}," json\n",{"type":993,"tag":1027,"props":4626,"children":4627},{"class":1029,"line":429},[4628],{"type":993,"tag":1027,"props":4629,"children":4630},{"style":1064},[4631],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4633,"children":4634},{"class":1029,"line":438},[4635,4640,4644],{"type":993,"tag":1027,"props":4636,"children":4637},{"style":1064},[4638],{"type":999,"value":4639},"    app_data ",{"type":993,"tag":1027,"props":4641,"children":4642},{"style":1084},[4643],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4645,"children":4646},{"style":1064},[4647],{"type":999,"value":4648}," {\n",{"type":993,"tag":1027,"props":4650,"children":4651},{"class":1029,"line":447},[4652,4657,4661,4666],{"type":993,"tag":1027,"props":4653,"children":4654},{"style":1070},[4655],{"type":999,"value":4656},"        \"app_name\"",{"type":993,"tag":1027,"props":4658,"children":4659},{"style":1064},[4660],{"type":999,"value":1650},{"type":993,"tag":1027,"props":4662,"children":4663},{"style":1070},[4664],{"type":999,"value":4665},"\"My Python App\"",{"type":993,"tag":1027,"props":4667,"children":4668},{"style":1064},[4669],{"type":999,"value":4670},",\n",{"type":993,"tag":1027,"props":4672,"children":4673},{"class":1029,"line":457},[4674,4679,4683,4688],{"type":993,"tag":1027,"props":4675,"children":4676},{"style":1070},[4677],{"type":999,"value":4678},"        \"version\"",{"type":993,"tag":1027,"props":4680,"children":4681},{"style":1064},[4682],{"type":999,"value":1650},{"type":993,"tag":1027,"props":4684,"children":4685},{"style":1070},[4686],{"type":999,"value":4687},"\"1.0\"",{"type":993,"tag":1027,"props":4689,"children":4690},{"style":1064},[4691],{"type":999,"value":4670},{"type":993,"tag":1027,"props":4693,"children":4694},{"class":1029,"line":466},[4695,4700,4705,4709,4713,4717,4721,4725],{"type":993,"tag":1027,"props":4696,"children":4697},{"style":1070},[4698],{"type":999,"value":4699},"        \"users\"",{"type":993,"tag":1027,"props":4701,"children":4702},{"style":1064},[4703],{"type":999,"value":4704},": [",{"type":993,"tag":1027,"props":4706,"children":4707},{"style":1070},[4708],{"type":999,"value":1655},{"type":993,"tag":1027,"props":4710,"children":4711},{"style":1064},[4712],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4714,"children":4715},{"style":1070},[4716],{"type":999,"value":2890},{"type":993,"tag":1027,"props":4718,"children":4719},{"style":1064},[4720],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4722,"children":4723},{"style":1070},[4724],{"type":999,"value":4427},{"type":993,"tag":1027,"props":4726,"children":4727},{"style":1064},[4728],{"type":999,"value":4349},{"type":993,"tag":1027,"props":4730,"children":4731},{"class":1029,"line":475},[4732,4737],{"type":993,"tag":1027,"props":4733,"children":4734},{"style":1070},[4735],{"type":999,"value":4736},"        \"settings\"",{"type":993,"tag":1027,"props":4738,"children":4739},{"style":1064},[4740],{"type":999,"value":4741},": {\n",{"type":993,"tag":1027,"props":4743,"children":4744},{"class":1029,"line":484},[4745,4750,4754,4759],{"type":993,"tag":1027,"props":4746,"children":4747},{"style":1070},[4748],{"type":999,"value":4749},"            \"theme\"",{"type":993,"tag":1027,"props":4751,"children":4752},{"style":1064},[4753],{"type":999,"value":1650},{"type":993,"tag":1027,"props":4755,"children":4756},{"style":1070},[4757],{"type":999,"value":4758},"\"dark\"",{"type":993,"tag":1027,"props":4760,"children":4761},{"style":1064},[4762],{"type":999,"value":4670},{"type":993,"tag":1027,"props":4764,"children":4765},{"class":1029,"line":493},[4766,4771,4775],{"type":993,"tag":1027,"props":4767,"children":4768},{"style":1070},[4769],{"type":999,"value":4770},"            \"auto_save\"",{"type":993,"tag":1027,"props":4772,"children":4773},{"style":1064},[4774],{"type":999,"value":1650},{"type":993,"tag":1027,"props":4776,"children":4777},{"style":1058},[4778],{"type":999,"value":4779},"True\n",{"type":993,"tag":1027,"props":4781,"children":4782},{"class":1029,"line":502},[4783],{"type":993,"tag":1027,"props":4784,"children":4785},{"style":1064},[4786],{"type":999,"value":4787},"        }\n",{"type":993,"tag":1027,"props":4789,"children":4790},{"class":1029,"line":511},[4791],{"type":993,"tag":1027,"props":4792,"children":4793},{"style":1064},[4794],{"type":999,"value":4795},"    }\n",{"type":993,"tag":1027,"props":4797,"children":4798},{"class":1029,"line":520},[4799],{"type":993,"tag":1027,"props":4800,"children":4801},{"style":1064},[4802],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4804,"children":4805},{"class":1029,"line":530},[4806,4810,4814,4818,4823,4827,4831,4835,4839,4843],{"type":993,"tag":1027,"props":4807,"children":4808},{"style":1084},[4809],{"type":999,"value":2482},{"type":993,"tag":1027,"props":4811,"children":4812},{"style":1058},[4813],{"type":999,"value":1092},{"type":993,"tag":1027,"props":4815,"children":4816},{"style":1064},[4817],{"type":999,"value":1067},{"type":993,"tag":1027,"props":4819,"children":4820},{"style":1070},[4821],{"type":999,"value":4822},"\"app_data.json\"",{"type":993,"tag":1027,"props":4824,"children":4825},{"style":1064},[4826],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4828,"children":4829},{"style":1070},[4830],{"type":999,"value":1111},{"type":993,"tag":1027,"props":4832,"children":4833},{"style":1064},[4834],{"type":999,"value":1116},{"type":993,"tag":1027,"props":4836,"children":4837},{"style":1084},[4838],{"type":999,"value":1121},{"type":993,"tag":1027,"props":4840,"children":4841},{"style":1124},[4842],{"type":999,"value":1127},{"type":993,"tag":1027,"props":4844,"children":4845},{"style":1064},[4846],{"type":999,"value":1132},{"type":993,"tag":1027,"props":4848,"children":4849},{"class":1029,"line":539},[4850,4855,4860,4864,4869,4873,4878],{"type":993,"tag":1027,"props":4851,"children":4852},{"style":1064},[4853],{"type":999,"value":4854},"        json.dump(app_data, ",{"type":993,"tag":1027,"props":4856,"children":4857},{"style":1124},[4858],{"type":999,"value":4859},"file",{"type":993,"tag":1027,"props":4861,"children":4862},{"style":1064},[4863],{"type":999,"value":1106},{"type":993,"tag":1027,"props":4865,"children":4866},{"style":1124},[4867],{"type":999,"value":4868},"indent",{"type":993,"tag":1027,"props":4870,"children":4871},{"style":1084},[4872],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4874,"children":4875},{"style":1058},[4876],{"type":999,"value":4877},"2",{"type":993,"tag":1027,"props":4879,"children":4880},{"style":1064},[4881],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4883,"children":4884},{"class":1029,"line":548},[4885],{"type":993,"tag":1027,"props":4886,"children":4887},{"style":1064},[4888],{"type":999,"value":2373},{"type":993,"tag":1027,"props":4890,"children":4891},{"class":1029,"line":557},[4892,4896,4900,4905],{"type":993,"tag":1027,"props":4893,"children":4894},{"style":1058},[4895],{"type":999,"value":1301},{"type":993,"tag":1027,"props":4897,"children":4898},{"style":1064},[4899],{"type":999,"value":1067},{"type":993,"tag":1027,"props":4901,"children":4902},{"style":1070},[4903],{"type":999,"value":4904},"\"   📦 JSON file created\"",{"type":993,"tag":1027,"props":4906,"children":4907},{"style":1064},[4908],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4910,"children":4911},{"class":1029,"line":566},[4912],{"type":993,"tag":1027,"props":4913,"children":4914},{"emptyLinePlaceholder":13},[4915],{"type":999,"value":1044},{"type":993,"tag":1027,"props":4917,"children":4918},{"class":1029,"line":575},[4919],{"type":993,"tag":1027,"props":4920,"children":4921},{"style":1064},[4922],{"type":999,"value":4923},"create_formatted_files()\n",{"type":993,"tag":2261,"props":4925,"children":4927},{"id":4926},"appending-to-files",[4928],{"type":999,"value":4929},"➕ Appending to Files",{"type":993,"tag":1002,"props":4931,"children":4932},{},[4933],{"type":999,"value":4934},"Appending lets you add new content to existing files without losing what's already there.",{"type":993,"tag":1013,"props":4936,"children":4937},{},[4938],{"type":993,"tag":1017,"props":4939,"children":4941},{"className":1019,"code":4940,"language":6,"meta":8,"style":8},"# ➕ File Appending Examples\n\ndef demonstrate_appending():\n    print(\"➕ Demonstrating file appending:\")\n    \n    # Create initial log file\n    with open(\"activity.log\", \"w\") as file:\n        file.write(\"Activity Log Started\\n\")\n        file.write(\"Initial setup complete\\n\")\n    \n    print(\"   📝 Created initial log file\")\n    \n    # Append new activities\n    activities = [\n        \"User logged in\",\n        \"File uploaded\",\n        \"Data processed\",\n        \"Report generated\"\n    ]\n    \n    for activity in activities:\n        with open(\"activity.log\", \"a\") as file:\n            timestamp = datetime.now().strftime(\"%H:%M:%S\")\n            file.write(f\"[{timestamp}] {activity}\\n\")\n    \n    print(\"   ➕ Added activities to log\")\n    \n    # Read and display the complete log\n    print(\"\\n📖 Complete activity log:\")\n    with open(\"activity.log\", \"r\") as file:\n        for line_num, line in enumerate(file, 1):\n            print(f\"   {line_num}: {line.strip()}\")\n    \n    # Safe append with error handling\n    try:\n        with open(\"activity.log\", \"a\") as file:\n            file.write(f\"[{datetime.now().strftime('%H:%M:%S')}] Session ended\\n\")\n        print(\"\\n✅ Session end logged successfully\")\n    except Exception as e:\n        print(f\"\\n❌ Error appending to log: {e}\")\n\ndemonstrate_appending()\n",[4942],{"type":993,"tag":1023,"props":4943,"children":4944},{"__ignoreMap":8},[4945,4953,4960,4976,4996,5003,5011,5055,5083,5111,5118,5138,5145,5153,5169,5181,5193,5205,5213,5220,5227,5248,5292,5317,5375,5382,5402,5409,5417,5445,5488,5531,5589,5596,5604,5616,5659,5718,5747,5770,5819,5826],{"type":993,"tag":1027,"props":4946,"children":4947},{"class":1029,"line":12},[4948],{"type":993,"tag":1027,"props":4949,"children":4950},{"style":1033},[4951],{"type":999,"value":4952},"# ➕ File Appending Examples\n",{"type":993,"tag":1027,"props":4954,"children":4955},{"class":1029,"line":27},[4956],{"type":993,"tag":1027,"props":4957,"children":4958},{"emptyLinePlaceholder":13},[4959],{"type":999,"value":1044},{"type":993,"tag":1027,"props":4961,"children":4962},{"class":1029,"line":36},[4963,4967,4972],{"type":993,"tag":1027,"props":4964,"children":4965},{"style":1084},[4966],{"type":999,"value":2334},{"type":993,"tag":1027,"props":4968,"children":4969},{"style":2337},[4970],{"type":999,"value":4971}," demonstrate_appending",{"type":993,"tag":1027,"props":4973,"children":4974},{"style":1064},[4975],{"type":999,"value":2345},{"type":993,"tag":1027,"props":4977,"children":4978},{"class":1029,"line":45},[4979,4983,4987,4992],{"type":993,"tag":1027,"props":4980,"children":4981},{"style":1058},[4982],{"type":999,"value":1301},{"type":993,"tag":1027,"props":4984,"children":4985},{"style":1064},[4986],{"type":999,"value":1067},{"type":993,"tag":1027,"props":4988,"children":4989},{"style":1070},[4990],{"type":999,"value":4991},"\"➕ Demonstrating file appending:\"",{"type":993,"tag":1027,"props":4993,"children":4994},{"style":1064},[4995],{"type":999,"value":1078},{"type":993,"tag":1027,"props":4997,"children":4998},{"class":1029,"line":54},[4999],{"type":993,"tag":1027,"props":5000,"children":5001},{"style":1064},[5002],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5004,"children":5005},{"class":1029,"line":63},[5006],{"type":993,"tag":1027,"props":5007,"children":5008},{"style":1033},[5009],{"type":999,"value":5010},"    # Create initial log file\n",{"type":993,"tag":1027,"props":5012,"children":5013},{"class":1029,"line":72},[5014,5018,5022,5026,5031,5035,5039,5043,5047,5051],{"type":993,"tag":1027,"props":5015,"children":5016},{"style":1084},[5017],{"type":999,"value":2482},{"type":993,"tag":1027,"props":5019,"children":5020},{"style":1058},[5021],{"type":999,"value":1092},{"type":993,"tag":1027,"props":5023,"children":5024},{"style":1064},[5025],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5027,"children":5028},{"style":1070},[5029],{"type":999,"value":5030},"\"activity.log\"",{"type":993,"tag":1027,"props":5032,"children":5033},{"style":1064},[5034],{"type":999,"value":1106},{"type":993,"tag":1027,"props":5036,"children":5037},{"style":1070},[5038],{"type":999,"value":1111},{"type":993,"tag":1027,"props":5040,"children":5041},{"style":1064},[5042],{"type":999,"value":1116},{"type":993,"tag":1027,"props":5044,"children":5045},{"style":1084},[5046],{"type":999,"value":1121},{"type":993,"tag":1027,"props":5048,"children":5049},{"style":1124},[5050],{"type":999,"value":1127},{"type":993,"tag":1027,"props":5052,"children":5053},{"style":1064},[5054],{"type":999,"value":1132},{"type":993,"tag":1027,"props":5056,"children":5057},{"class":1029,"line":81},[5058,5062,5066,5071,5075,5079],{"type":993,"tag":1027,"props":5059,"children":5060},{"style":1124},[5061],{"type":999,"value":2527},{"type":993,"tag":1027,"props":5063,"children":5064},{"style":1064},[5065],{"type":999,"value":1145},{"type":993,"tag":1027,"props":5067,"children":5068},{"style":1070},[5069],{"type":999,"value":5070},"\"Activity Log Started",{"type":993,"tag":1027,"props":5072,"children":5073},{"style":1058},[5074],{"type":999,"value":1155},{"type":993,"tag":1027,"props":5076,"children":5077},{"style":1070},[5078],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5080,"children":5081},{"style":1064},[5082],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5084,"children":5085},{"class":1029,"line":91},[5086,5090,5094,5099,5103,5107],{"type":993,"tag":1027,"props":5087,"children":5088},{"style":1124},[5089],{"type":999,"value":2527},{"type":993,"tag":1027,"props":5091,"children":5092},{"style":1064},[5093],{"type":999,"value":1145},{"type":993,"tag":1027,"props":5095,"children":5096},{"style":1070},[5097],{"type":999,"value":5098},"\"Initial setup complete",{"type":993,"tag":1027,"props":5100,"children":5101},{"style":1058},[5102],{"type":999,"value":1155},{"type":993,"tag":1027,"props":5104,"children":5105},{"style":1070},[5106],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5108,"children":5109},{"style":1064},[5110],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5112,"children":5113},{"class":1029,"line":100},[5114],{"type":993,"tag":1027,"props":5115,"children":5116},{"style":1064},[5117],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5119,"children":5120},{"class":1029,"line":109},[5121,5125,5129,5134],{"type":993,"tag":1027,"props":5122,"children":5123},{"style":1058},[5124],{"type":999,"value":1301},{"type":993,"tag":1027,"props":5126,"children":5127},{"style":1064},[5128],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5130,"children":5131},{"style":1070},[5132],{"type":999,"value":5133},"\"   📝 Created initial log file\"",{"type":993,"tag":1027,"props":5135,"children":5136},{"style":1064},[5137],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5139,"children":5140},{"class":1029,"line":118},[5141],{"type":993,"tag":1027,"props":5142,"children":5143},{"style":1064},[5144],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5146,"children":5147},{"class":1029,"line":127},[5148],{"type":993,"tag":1027,"props":5149,"children":5150},{"style":1033},[5151],{"type":999,"value":5152},"    # Append new activities\n",{"type":993,"tag":1027,"props":5154,"children":5155},{"class":1029,"line":136},[5156,5161,5165],{"type":993,"tag":1027,"props":5157,"children":5158},{"style":1064},[5159],{"type":999,"value":5160},"    activities ",{"type":993,"tag":1027,"props":5162,"children":5163},{"style":1084},[5164],{"type":999,"value":1284},{"type":993,"tag":1027,"props":5166,"children":5167},{"style":1064},[5168],{"type":999,"value":2809},{"type":993,"tag":1027,"props":5170,"children":5171},{"class":1029,"line":146},[5172,5177],{"type":993,"tag":1027,"props":5173,"children":5174},{"style":1070},[5175],{"type":999,"value":5176},"        \"User logged in\"",{"type":993,"tag":1027,"props":5178,"children":5179},{"style":1064},[5180],{"type":999,"value":4670},{"type":993,"tag":1027,"props":5182,"children":5183},{"class":1029,"line":155},[5184,5189],{"type":993,"tag":1027,"props":5185,"children":5186},{"style":1070},[5187],{"type":999,"value":5188},"        \"File uploaded\"",{"type":993,"tag":1027,"props":5190,"children":5191},{"style":1064},[5192],{"type":999,"value":4670},{"type":993,"tag":1027,"props":5194,"children":5195},{"class":1029,"line":164},[5196,5201],{"type":993,"tag":1027,"props":5197,"children":5198},{"style":1070},[5199],{"type":999,"value":5200},"        \"Data processed\"",{"type":993,"tag":1027,"props":5202,"children":5203},{"style":1064},[5204],{"type":999,"value":4670},{"type":993,"tag":1027,"props":5206,"children":5207},{"class":1029,"line":173},[5208],{"type":993,"tag":1027,"props":5209,"children":5210},{"style":1070},[5211],{"type":999,"value":5212},"        \"Report generated\"\n",{"type":993,"tag":1027,"props":5214,"children":5215},{"class":1029,"line":182},[5216],{"type":993,"tag":1027,"props":5217,"children":5218},{"style":1064},[5219],{"type":999,"value":2936},{"type":993,"tag":1027,"props":5221,"children":5222},{"class":1029,"line":191},[5223],{"type":993,"tag":1027,"props":5224,"children":5225},{"style":1064},[5226],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5228,"children":5229},{"class":1029,"line":201},[5230,5234,5239,5243],{"type":993,"tag":1027,"props":5231,"children":5232},{"style":1084},[5233],{"type":999,"value":3344},{"type":993,"tag":1027,"props":5235,"children":5236},{"style":1064},[5237],{"type":999,"value":5238}," activity ",{"type":993,"tag":1027,"props":5240,"children":5241},{"style":1084},[5242],{"type":999,"value":3089},{"type":993,"tag":1027,"props":5244,"children":5245},{"style":1064},[5246],{"type":999,"value":5247}," activities:\n",{"type":993,"tag":1027,"props":5249,"children":5250},{"class":1029,"line":210},[5251,5256,5260,5264,5268,5272,5276,5280,5284,5288],{"type":993,"tag":1027,"props":5252,"children":5253},{"style":1084},[5254],{"type":999,"value":5255},"        with",{"type":993,"tag":1027,"props":5257,"children":5258},{"style":1058},[5259],{"type":999,"value":1092},{"type":993,"tag":1027,"props":5261,"children":5262},{"style":1064},[5263],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5265,"children":5266},{"style":1070},[5267],{"type":999,"value":5030},{"type":993,"tag":1027,"props":5269,"children":5270},{"style":1064},[5271],{"type":999,"value":1106},{"type":993,"tag":1027,"props":5273,"children":5274},{"style":1070},[5275],{"type":999,"value":1397},{"type":993,"tag":1027,"props":5277,"children":5278},{"style":1064},[5279],{"type":999,"value":1116},{"type":993,"tag":1027,"props":5281,"children":5282},{"style":1084},[5283],{"type":999,"value":1121},{"type":993,"tag":1027,"props":5285,"children":5286},{"style":1124},[5287],{"type":999,"value":1127},{"type":993,"tag":1027,"props":5289,"children":5290},{"style":1064},[5291],{"type":999,"value":1132},{"type":993,"tag":1027,"props":5293,"children":5294},{"class":1029,"line":219},[5295,5300,5304,5308,5313],{"type":993,"tag":1027,"props":5296,"children":5297},{"style":1064},[5298],{"type":999,"value":5299},"            timestamp ",{"type":993,"tag":1027,"props":5301,"children":5302},{"style":1084},[5303],{"type":999,"value":1284},{"type":993,"tag":1027,"props":5305,"children":5306},{"style":1064},[5307],{"type":999,"value":2398},{"type":993,"tag":1027,"props":5309,"children":5310},{"style":1070},[5311],{"type":999,"value":5312},"\"%H:%M:%S\"",{"type":993,"tag":1027,"props":5314,"children":5315},{"style":1064},[5316],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5318,"children":5319},{"class":1029,"line":228},[5320,5324,5328,5332,5336,5340,5345,5349,5354,5358,5363,5367,5371],{"type":993,"tag":1027,"props":5321,"children":5322},{"style":1124},[5323],{"type":999,"value":3199},{"type":993,"tag":1027,"props":5325,"children":5326},{"style":1064},[5327],{"type":999,"value":1145},{"type":993,"tag":1027,"props":5329,"children":5330},{"style":1084},[5331],{"type":999,"value":1763},{"type":993,"tag":1027,"props":5333,"children":5334},{"style":1070},[5335],{"type":999,"value":2439},{"type":993,"tag":1027,"props":5337,"children":5338},{"style":1058},[5339],{"type":999,"value":1805},{"type":993,"tag":1027,"props":5341,"children":5342},{"style":1064},[5343],{"type":999,"value":5344},"timestamp",{"type":993,"tag":1027,"props":5346,"children":5347},{"style":1058},[5348],{"type":999,"value":2453},{"type":993,"tag":1027,"props":5350,"children":5351},{"style":1070},[5352],{"type":999,"value":5353},"] ",{"type":993,"tag":1027,"props":5355,"children":5356},{"style":1058},[5357],{"type":999,"value":1805},{"type":993,"tag":1027,"props":5359,"children":5360},{"style":1064},[5361],{"type":999,"value":5362},"activity",{"type":993,"tag":1027,"props":5364,"children":5365},{"style":1058},[5366],{"type":999,"value":1825},{"type":993,"tag":1027,"props":5368,"children":5369},{"style":1070},[5370],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5372,"children":5373},{"style":1064},[5374],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5376,"children":5377},{"class":1029,"line":238},[5378],{"type":993,"tag":1027,"props":5379,"children":5380},{"style":1064},[5381],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5383,"children":5384},{"class":1029,"line":247},[5385,5389,5393,5398],{"type":993,"tag":1027,"props":5386,"children":5387},{"style":1058},[5388],{"type":999,"value":1301},{"type":993,"tag":1027,"props":5390,"children":5391},{"style":1064},[5392],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5394,"children":5395},{"style":1070},[5396],{"type":999,"value":5397},"\"   ➕ Added activities to log\"",{"type":993,"tag":1027,"props":5399,"children":5400},{"style":1064},[5401],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5403,"children":5404},{"class":1029,"line":256},[5405],{"type":993,"tag":1027,"props":5406,"children":5407},{"style":1064},[5408],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5410,"children":5411},{"class":1029,"line":265},[5412],{"type":993,"tag":1027,"props":5413,"children":5414},{"style":1033},[5415],{"type":999,"value":5416},"    # Read and display the complete log\n",{"type":993,"tag":1027,"props":5418,"children":5419},{"class":1029,"line":274},[5420,5424,5428,5432,5436,5441],{"type":993,"tag":1027,"props":5421,"children":5422},{"style":1058},[5423],{"type":999,"value":1301},{"type":993,"tag":1027,"props":5425,"children":5426},{"style":1064},[5427],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5429,"children":5430},{"style":1070},[5431],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5433,"children":5434},{"style":1058},[5435],{"type":999,"value":1155},{"type":993,"tag":1027,"props":5437,"children":5438},{"style":1070},[5439],{"type":999,"value":5440},"📖 Complete activity log:\"",{"type":993,"tag":1027,"props":5442,"children":5443},{"style":1064},[5444],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5446,"children":5447},{"class":1029,"line":284},[5448,5452,5456,5460,5464,5468,5472,5476,5480,5484],{"type":993,"tag":1027,"props":5449,"children":5450},{"style":1084},[5451],{"type":999,"value":2482},{"type":993,"tag":1027,"props":5453,"children":5454},{"style":1058},[5455],{"type":999,"value":1092},{"type":993,"tag":1027,"props":5457,"children":5458},{"style":1064},[5459],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5461,"children":5462},{"style":1070},[5463],{"type":999,"value":5030},{"type":993,"tag":1027,"props":5465,"children":5466},{"style":1064},[5467],{"type":999,"value":1106},{"type":993,"tag":1027,"props":5469,"children":5470},{"style":1070},[5471],{"type":999,"value":1255},{"type":993,"tag":1027,"props":5473,"children":5474},{"style":1064},[5475],{"type":999,"value":1116},{"type":993,"tag":1027,"props":5477,"children":5478},{"style":1084},[5479],{"type":999,"value":1121},{"type":993,"tag":1027,"props":5481,"children":5482},{"style":1124},[5483],{"type":999,"value":1127},{"type":993,"tag":1027,"props":5485,"children":5486},{"style":1064},[5487],{"type":999,"value":1132},{"type":993,"tag":1027,"props":5489,"children":5490},{"class":1029,"line":293},[5491,5495,5500,5504,5509,5513,5517,5521,5526],{"type":993,"tag":1027,"props":5492,"children":5493},{"style":1084},[5494],{"type":999,"value":3079},{"type":993,"tag":1027,"props":5496,"children":5497},{"style":1064},[5498],{"type":999,"value":5499}," line_num, line ",{"type":993,"tag":1027,"props":5501,"children":5502},{"style":1084},[5503],{"type":999,"value":3089},{"type":993,"tag":1027,"props":5505,"children":5506},{"style":1058},[5507],{"type":999,"value":5508}," enumerate",{"type":993,"tag":1027,"props":5510,"children":5511},{"style":1064},[5512],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5514,"children":5515},{"style":1124},[5516],{"type":999,"value":4859},{"type":993,"tag":1027,"props":5518,"children":5519},{"style":1064},[5520],{"type":999,"value":1106},{"type":993,"tag":1027,"props":5522,"children":5523},{"style":1058},[5524],{"type":999,"value":5525},"1",{"type":993,"tag":1027,"props":5527,"children":5528},{"style":1064},[5529],{"type":999,"value":5530},"):\n",{"type":993,"tag":1027,"props":5532,"children":5533},{"class":1029,"line":302},[5534,5538,5542,5546,5551,5555,5560,5564,5568,5572,5577,5581,5585],{"type":993,"tag":1027,"props":5535,"children":5536},{"style":1058},[5537],{"type":999,"value":3396},{"type":993,"tag":1027,"props":5539,"children":5540},{"style":1064},[5541],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5543,"children":5544},{"style":1084},[5545],{"type":999,"value":1763},{"type":993,"tag":1027,"props":5547,"children":5548},{"style":1070},[5549],{"type":999,"value":5550},"\"   ",{"type":993,"tag":1027,"props":5552,"children":5553},{"style":1058},[5554],{"type":999,"value":1805},{"type":993,"tag":1027,"props":5556,"children":5557},{"style":1064},[5558],{"type":999,"value":5559},"line_num",{"type":993,"tag":1027,"props":5561,"children":5562},{"style":1058},[5563],{"type":999,"value":2453},{"type":993,"tag":1027,"props":5565,"children":5566},{"style":1070},[5567],{"type":999,"value":1650},{"type":993,"tag":1027,"props":5569,"children":5570},{"style":1058},[5571],{"type":999,"value":1805},{"type":993,"tag":1027,"props":5573,"children":5574},{"style":1064},[5575],{"type":999,"value":5576},"line.strip()",{"type":993,"tag":1027,"props":5578,"children":5579},{"style":1058},[5580],{"type":999,"value":2453},{"type":993,"tag":1027,"props":5582,"children":5583},{"style":1070},[5584],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5586,"children":5587},{"style":1064},[5588],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5590,"children":5591},{"class":1029,"line":311},[5592],{"type":993,"tag":1027,"props":5593,"children":5594},{"style":1064},[5595],{"type":999,"value":2373},{"type":993,"tag":1027,"props":5597,"children":5598},{"class":1029,"line":320},[5599],{"type":993,"tag":1027,"props":5600,"children":5601},{"style":1033},[5602],{"type":999,"value":5603},"    # Safe append with error handling\n",{"type":993,"tag":1027,"props":5605,"children":5606},{"class":1029,"line":329},[5607,5612],{"type":993,"tag":1027,"props":5608,"children":5609},{"style":1084},[5610],{"type":999,"value":5611},"    try",{"type":993,"tag":1027,"props":5613,"children":5614},{"style":1064},[5615],{"type":999,"value":1132},{"type":993,"tag":1027,"props":5617,"children":5618},{"class":1029,"line":338},[5619,5623,5627,5631,5635,5639,5643,5647,5651,5655],{"type":993,"tag":1027,"props":5620,"children":5621},{"style":1084},[5622],{"type":999,"value":5255},{"type":993,"tag":1027,"props":5624,"children":5625},{"style":1058},[5626],{"type":999,"value":1092},{"type":993,"tag":1027,"props":5628,"children":5629},{"style":1064},[5630],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5632,"children":5633},{"style":1070},[5634],{"type":999,"value":5030},{"type":993,"tag":1027,"props":5636,"children":5637},{"style":1064},[5638],{"type":999,"value":1106},{"type":993,"tag":1027,"props":5640,"children":5641},{"style":1070},[5642],{"type":999,"value":1397},{"type":993,"tag":1027,"props":5644,"children":5645},{"style":1064},[5646],{"type":999,"value":1116},{"type":993,"tag":1027,"props":5648,"children":5649},{"style":1084},[5650],{"type":999,"value":1121},{"type":993,"tag":1027,"props":5652,"children":5653},{"style":1124},[5654],{"type":999,"value":1127},{"type":993,"tag":1027,"props":5656,"children":5657},{"style":1064},[5658],{"type":999,"value":1132},{"type":993,"tag":1027,"props":5660,"children":5661},{"class":1029,"line":347},[5662,5666,5670,5674,5678,5682,5687,5692,5697,5701,5706,5710,5714],{"type":993,"tag":1027,"props":5663,"children":5664},{"style":1124},[5665],{"type":999,"value":3199},{"type":993,"tag":1027,"props":5667,"children":5668},{"style":1064},[5669],{"type":999,"value":1145},{"type":993,"tag":1027,"props":5671,"children":5672},{"style":1084},[5673],{"type":999,"value":1763},{"type":993,"tag":1027,"props":5675,"children":5676},{"style":1070},[5677],{"type":999,"value":2439},{"type":993,"tag":1027,"props":5679,"children":5680},{"style":1058},[5681],{"type":999,"value":1805},{"type":993,"tag":1027,"props":5683,"children":5684},{"style":1064},[5685],{"type":999,"value":5686},"datetime.now().strftime(",{"type":993,"tag":1027,"props":5688,"children":5689},{"style":1070},[5690],{"type":999,"value":5691},"'%H:%M:%S'",{"type":993,"tag":1027,"props":5693,"children":5694},{"style":1064},[5695],{"type":999,"value":5696},")",{"type":993,"tag":1027,"props":5698,"children":5699},{"style":1058},[5700],{"type":999,"value":2453},{"type":993,"tag":1027,"props":5702,"children":5703},{"style":1070},[5704],{"type":999,"value":5705},"] Session ended",{"type":993,"tag":1027,"props":5707,"children":5708},{"style":1058},[5709],{"type":999,"value":1155},{"type":993,"tag":1027,"props":5711,"children":5712},{"style":1070},[5713],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5715,"children":5716},{"style":1064},[5717],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5719,"children":5720},{"class":1029,"line":356},[5721,5726,5730,5734,5738,5743],{"type":993,"tag":1027,"props":5722,"children":5723},{"style":1058},[5724],{"type":999,"value":5725},"        print",{"type":993,"tag":1027,"props":5727,"children":5728},{"style":1064},[5729],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5731,"children":5732},{"style":1070},[5733],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5735,"children":5736},{"style":1058},[5737],{"type":999,"value":1155},{"type":993,"tag":1027,"props":5739,"children":5740},{"style":1070},[5741],{"type":999,"value":5742},"✅ Session end logged successfully\"",{"type":993,"tag":1027,"props":5744,"children":5745},{"style":1064},[5746],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5748,"children":5749},{"class":1029,"line":365},[5750,5755,5760,5765],{"type":993,"tag":1027,"props":5751,"children":5752},{"style":1084},[5753],{"type":999,"value":5754},"    except",{"type":993,"tag":1027,"props":5756,"children":5757},{"style":1058},[5758],{"type":999,"value":5759}," Exception",{"type":993,"tag":1027,"props":5761,"children":5762},{"style":1084},[5763],{"type":999,"value":5764}," as",{"type":993,"tag":1027,"props":5766,"children":5767},{"style":1064},[5768],{"type":999,"value":5769}," e:\n",{"type":993,"tag":1027,"props":5771,"children":5772},{"class":1029,"line":374},[5773,5777,5781,5785,5789,5793,5798,5802,5807,5811,5815],{"type":993,"tag":1027,"props":5774,"children":5775},{"style":1058},[5776],{"type":999,"value":5725},{"type":993,"tag":1027,"props":5778,"children":5779},{"style":1064},[5780],{"type":999,"value":1067},{"type":993,"tag":1027,"props":5782,"children":5783},{"style":1084},[5784],{"type":999,"value":1763},{"type":993,"tag":1027,"props":5786,"children":5787},{"style":1070},[5788],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5790,"children":5791},{"style":1058},[5792],{"type":999,"value":1155},{"type":993,"tag":1027,"props":5794,"children":5795},{"style":1070},[5796],{"type":999,"value":5797},"❌ Error appending to log: ",{"type":993,"tag":1027,"props":5799,"children":5800},{"style":1058},[5801],{"type":999,"value":1805},{"type":993,"tag":1027,"props":5803,"children":5804},{"style":1064},[5805],{"type":999,"value":5806},"e",{"type":993,"tag":1027,"props":5808,"children":5809},{"style":1058},[5810],{"type":999,"value":2453},{"type":993,"tag":1027,"props":5812,"children":5813},{"style":1070},[5814],{"type":999,"value":1160},{"type":993,"tag":1027,"props":5816,"children":5817},{"style":1064},[5818],{"type":999,"value":1078},{"type":993,"tag":1027,"props":5820,"children":5821},{"class":1029,"line":384},[5822],{"type":993,"tag":1027,"props":5823,"children":5824},{"emptyLinePlaceholder":13},[5825],{"type":999,"value":1044},{"type":993,"tag":1027,"props":5827,"children":5828},{"class":1029,"line":393},[5829],{"type":993,"tag":1027,"props":5830,"children":5831},{"style":1064},[5832],{"type":999,"value":5833},"demonstrate_appending()\n",{"type":993,"tag":1960,"props":5835,"children":5837},{"id":5836},"️-safe-file-writing",[5838],{"type":999,"value":5839},"🛡️ Safe File Writing",{"type":993,"tag":1002,"props":5841,"children":5842},{},[5843],{"type":999,"value":5844},"When writing important files, safety measures prevent data loss and ensure reliability.",{"type":993,"tag":1972,"props":5846,"children":5850},{"emoji":5847,"title":5848,"type":5849},"⚠️","File Writing Safety","warning",[5851,5859,5867,5909,5917,5950,5958,5991,5999],{"type":993,"tag":1002,"props":5852,"children":5853},{},[5854],{"type":993,"tag":1982,"props":5855,"children":5856},{},[5857],{"type":999,"value":5858},"Safety Considerations:",{"type":993,"tag":1002,"props":5860,"children":5861},{},[5862],{"type":993,"tag":1982,"props":5863,"children":5864},{},[5865],{"type":999,"value":5866},"Data Loss Prevention:",{"type":993,"tag":1996,"props":5868,"children":5869},{},[5870,5879,5889,5899],{"type":993,"tag":2000,"props":5871,"children":5872},{},[5873,5878],{"type":993,"tag":1982,"props":5874,"children":5875},{},[5876],{"type":999,"value":5877},"Create backups",{"type":999,"value":2172},{"type":993,"tag":2000,"props":5880,"children":5881},{},[5882,5887],{"type":993,"tag":1982,"props":5883,"children":5884},{},[5885],{"type":999,"value":5886},"Use temporary files",{"type":999,"value":5888}," for complex operations",{"type":993,"tag":2000,"props":5890,"children":5891},{},[5892,5897],{"type":993,"tag":1982,"props":5893,"children":5894},{},[5895],{"type":999,"value":5896},"Verify writes",{"type":999,"value":5898}," by reading content back",{"type":993,"tag":2000,"props":5900,"children":5901},{},[5902,5907],{"type":993,"tag":1982,"props":5903,"children":5904},{},[5905],{"type":999,"value":5906},"Handle errors gracefully",{"type":999,"value":5908}," with try/except",{"type":993,"tag":1002,"props":5910,"children":5911},{},[5912],{"type":993,"tag":1982,"props":5913,"children":5914},{},[5915],{"type":999,"value":5916},"File Mode Awareness:",{"type":993,"tag":1996,"props":5918,"children":5919},{},[5920,5930,5940],{"type":993,"tag":2000,"props":5921,"children":5922},{},[5923,5928],{"type":993,"tag":1982,"props":5924,"children":5925},{},[5926],{"type":999,"value":5927},"'w' mode destroys existing content",{"type":999,"value":5929}," - use carefully",{"type":993,"tag":2000,"props":5931,"children":5932},{},[5933,5938],{"type":993,"tag":1982,"props":5934,"children":5935},{},[5936],{"type":999,"value":5937},"'a' mode preserves content",{"type":999,"value":5939}," - safer for logs",{"type":993,"tag":2000,"props":5941,"children":5942},{},[5943,5948],{"type":993,"tag":1982,"props":5944,"children":5945},{},[5946],{"type":999,"value":5947},"Check file exists",{"type":999,"value":5949}," before choosing mode",{"type":993,"tag":1002,"props":5951,"children":5952},{},[5953],{"type":993,"tag":1982,"props":5954,"children":5955},{},[5956],{"type":999,"value":5957},"Error Handling:",{"type":993,"tag":1996,"props":5959,"children":5960},{},[5961,5971,5981],{"type":993,"tag":2000,"props":5962,"children":5963},{},[5964,5969],{"type":993,"tag":1982,"props":5965,"children":5966},{},[5967],{"type":999,"value":5968},"PermissionError",{"type":999,"value":5970}," - File may be locked or read-only",{"type":993,"tag":2000,"props":5972,"children":5973},{},[5974,5979],{"type":993,"tag":1982,"props":5975,"children":5976},{},[5977],{"type":999,"value":5978},"DiskSpaceError",{"type":999,"value":5980}," - Not enough storage space",{"type":993,"tag":2000,"props":5982,"children":5983},{},[5984,5989],{"type":993,"tag":1982,"props":5985,"children":5986},{},[5987],{"type":999,"value":5988},"UnicodeEncodeError",{"type":999,"value":5990}," - Character encoding issues",{"type":993,"tag":1002,"props":5992,"children":5993},{},[5994],{"type":993,"tag":1982,"props":5995,"children":5996},{},[5997],{"type":999,"value":5998},"Best Practices:",{"type":993,"tag":1996,"props":6000,"children":6001},{},[6002,6007,6012,6017],{"type":993,"tag":2000,"props":6003,"children":6004},{},[6005],{"type":999,"value":6006},"Use atomic writes (write to temp file, then rename)",{"type":993,"tag":2000,"props":6008,"children":6009},{},[6010],{"type":999,"value":6011},"Flush buffers for immediate disk writing",{"type":993,"tag":2000,"props":6013,"children":6014},{},[6015],{"type":999,"value":6016},"Validate data before writing",{"type":993,"tag":2000,"props":6018,"children":6019},{},[6020],{"type":999,"value":6021},"Use appropriate file permissions",{"type":993,"tag":2261,"props":6023,"children":6025},{"id":6024},"safe-writing-techniques",[6026],{"type":999,"value":6027},"🔒 Safe Writing Techniques",{"type":993,"tag":1013,"props":6029,"children":6030},{},[6031],{"type":993,"tag":1017,"props":6032,"children":6034},{"className":1019,"code":6033,"language":6,"meta":8,"style":8},"import os\nimport shutil\n\n# 🛡️ Safe File Writing Examples\n\ndef safe_file_writing():\n    print(\"🔒 Demonstrating safe file writing:\")\n    \n    # Create important data\n    important_data = \"Critical application data\\nDo not lose this information!\"\n    filename = \"important.txt\"\n    \n    with open(filename, \"w\") as file:\n        file.write(important_data)\n    \n    print(\"   📄 Created important file\")\n    \n    # Safe update with backup\n    def safe_update_file(filename, new_content):\n        backup_name = filename + \".backup\"\n        \n        try:\n            # Step 1: Create backup if file exists\n            if os.path.exists(filename):\n                shutil.copy2(filename, backup_name)\n                print(f\"   💾 Backup created: {backup_name}\")\n            \n            # Step 2: Write new content\n            with open(filename, \"w\") as file:\n                file.write(new_content)\n            \n            print(f\"   ✅ File updated successfully\")\n            return True\n            \n        except Exception as e:\n            print(f\"   ❌ Update failed: {e}\")\n            \n            # Step 3: Restore from backup if needed\n            if os.path.exists(backup_name):\n                try:\n                    shutil.copy2(backup_name, filename)\n                    print(f\"   🔄 File restored from backup\")\n                except Exception:\n                    print(f\"   ❌ Could not restore backup\")\n            \n            return False\n    \n    # Test safe update\n    new_content = important_data + \"\\nUpdated with new information\"\n    safe_update_file(filename, new_content)\n    \n    # Verify the update\n    with open(filename, \"r\") as file:\n        content = file.read()\n        print(f\"\\n📖 Updated content:\\n{content}\")\n\nsafe_file_writing()\n",[6035],{"type":993,"tag":1023,"props":6036,"children":6037},{"__ignoreMap":8},[6038,6049,6061,6068,6076,6083,6099,6119,6126,6134,6160,6177,6184,6220,6232,6239,6259,6266,6274,6292,6317,6324,6336,6344,6356,6364,6406,6414,6422,6458,6471,6478,6502,6515,6522,6542,6582,6589,6597,6609,6621,6629,6654,6670,6694,6701,6713,6720,6728,6762,6770,6777,6785,6820,6840,6889,6896],{"type":993,"tag":1027,"props":6039,"children":6040},{"class":1029,"line":12},[6041,6045],{"type":993,"tag":1027,"props":6042,"children":6043},{"style":1084},[6044],{"type":999,"value":2299},{"type":993,"tag":1027,"props":6046,"children":6047},{"style":1064},[6048],{"type":999,"value":3259},{"type":993,"tag":1027,"props":6050,"children":6051},{"class":1029,"line":27},[6052,6056],{"type":993,"tag":1027,"props":6053,"children":6054},{"style":1084},[6055],{"type":999,"value":2299},{"type":993,"tag":1027,"props":6057,"children":6058},{"style":1064},[6059],{"type":999,"value":6060}," shutil\n",{"type":993,"tag":1027,"props":6062,"children":6063},{"class":1029,"line":36},[6064],{"type":993,"tag":1027,"props":6065,"children":6066},{"emptyLinePlaceholder":13},[6067],{"type":999,"value":1044},{"type":993,"tag":1027,"props":6069,"children":6070},{"class":1029,"line":45},[6071],{"type":993,"tag":1027,"props":6072,"children":6073},{"style":1033},[6074],{"type":999,"value":6075},"# 🛡️ Safe File Writing Examples\n",{"type":993,"tag":1027,"props":6077,"children":6078},{"class":1029,"line":54},[6079],{"type":993,"tag":1027,"props":6080,"children":6081},{"emptyLinePlaceholder":13},[6082],{"type":999,"value":1044},{"type":993,"tag":1027,"props":6084,"children":6085},{"class":1029,"line":63},[6086,6090,6095],{"type":993,"tag":1027,"props":6087,"children":6088},{"style":1084},[6089],{"type":999,"value":2334},{"type":993,"tag":1027,"props":6091,"children":6092},{"style":2337},[6093],{"type":999,"value":6094}," safe_file_writing",{"type":993,"tag":1027,"props":6096,"children":6097},{"style":1064},[6098],{"type":999,"value":2345},{"type":993,"tag":1027,"props":6100,"children":6101},{"class":1029,"line":72},[6102,6106,6110,6115],{"type":993,"tag":1027,"props":6103,"children":6104},{"style":1058},[6105],{"type":999,"value":1301},{"type":993,"tag":1027,"props":6107,"children":6108},{"style":1064},[6109],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6111,"children":6112},{"style":1070},[6113],{"type":999,"value":6114},"\"🔒 Demonstrating safe file writing:\"",{"type":993,"tag":1027,"props":6116,"children":6117},{"style":1064},[6118],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6120,"children":6121},{"class":1029,"line":81},[6122],{"type":993,"tag":1027,"props":6123,"children":6124},{"style":1064},[6125],{"type":999,"value":2373},{"type":993,"tag":1027,"props":6127,"children":6128},{"class":1029,"line":91},[6129],{"type":993,"tag":1027,"props":6130,"children":6131},{"style":1033},[6132],{"type":999,"value":6133},"    # Create important data\n",{"type":993,"tag":1027,"props":6135,"children":6136},{"class":1029,"line":100},[6137,6142,6146,6151,6155],{"type":993,"tag":1027,"props":6138,"children":6139},{"style":1064},[6140],{"type":999,"value":6141},"    important_data ",{"type":993,"tag":1027,"props":6143,"children":6144},{"style":1084},[6145],{"type":999,"value":1284},{"type":993,"tag":1027,"props":6147,"children":6148},{"style":1070},[6149],{"type":999,"value":6150}," \"Critical application data",{"type":993,"tag":1027,"props":6152,"children":6153},{"style":1058},[6154],{"type":999,"value":1155},{"type":993,"tag":1027,"props":6156,"children":6157},{"style":1070},[6158],{"type":999,"value":6159},"Do not lose this information!\"\n",{"type":993,"tag":1027,"props":6161,"children":6162},{"class":1029,"line":109},[6163,6168,6172],{"type":993,"tag":1027,"props":6164,"children":6165},{"style":1064},[6166],{"type":999,"value":6167},"    filename ",{"type":993,"tag":1027,"props":6169,"children":6170},{"style":1084},[6171],{"type":999,"value":1284},{"type":993,"tag":1027,"props":6173,"children":6174},{"style":1070},[6175],{"type":999,"value":6176}," \"important.txt\"\n",{"type":993,"tag":1027,"props":6178,"children":6179},{"class":1029,"line":118},[6180],{"type":993,"tag":1027,"props":6181,"children":6182},{"style":1064},[6183],{"type":999,"value":2373},{"type":993,"tag":1027,"props":6185,"children":6186},{"class":1029,"line":127},[6187,6191,6195,6200,6204,6208,6212,6216],{"type":993,"tag":1027,"props":6188,"children":6189},{"style":1084},[6190],{"type":999,"value":2482},{"type":993,"tag":1027,"props":6192,"children":6193},{"style":1058},[6194],{"type":999,"value":1092},{"type":993,"tag":1027,"props":6196,"children":6197},{"style":1064},[6198],{"type":999,"value":6199},"(filename, ",{"type":993,"tag":1027,"props":6201,"children":6202},{"style":1070},[6203],{"type":999,"value":1111},{"type":993,"tag":1027,"props":6205,"children":6206},{"style":1064},[6207],{"type":999,"value":1116},{"type":993,"tag":1027,"props":6209,"children":6210},{"style":1084},[6211],{"type":999,"value":1121},{"type":993,"tag":1027,"props":6213,"children":6214},{"style":1124},[6215],{"type":999,"value":1127},{"type":993,"tag":1027,"props":6217,"children":6218},{"style":1064},[6219],{"type":999,"value":1132},{"type":993,"tag":1027,"props":6221,"children":6222},{"class":1029,"line":136},[6223,6227],{"type":993,"tag":1027,"props":6224,"children":6225},{"style":1124},[6226],{"type":999,"value":2527},{"type":993,"tag":1027,"props":6228,"children":6229},{"style":1064},[6230],{"type":999,"value":6231},".write(important_data)\n",{"type":993,"tag":1027,"props":6233,"children":6234},{"class":1029,"line":146},[6235],{"type":993,"tag":1027,"props":6236,"children":6237},{"style":1064},[6238],{"type":999,"value":2373},{"type":993,"tag":1027,"props":6240,"children":6241},{"class":1029,"line":155},[6242,6246,6250,6255],{"type":993,"tag":1027,"props":6243,"children":6244},{"style":1058},[6245],{"type":999,"value":1301},{"type":993,"tag":1027,"props":6247,"children":6248},{"style":1064},[6249],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6251,"children":6252},{"style":1070},[6253],{"type":999,"value":6254},"\"   📄 Created important file\"",{"type":993,"tag":1027,"props":6256,"children":6257},{"style":1064},[6258],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6260,"children":6261},{"class":1029,"line":164},[6262],{"type":993,"tag":1027,"props":6263,"children":6264},{"style":1064},[6265],{"type":999,"value":2373},{"type":993,"tag":1027,"props":6267,"children":6268},{"class":1029,"line":173},[6269],{"type":993,"tag":1027,"props":6270,"children":6271},{"style":1033},[6272],{"type":999,"value":6273},"    # Safe update with backup\n",{"type":993,"tag":1027,"props":6275,"children":6276},{"class":1029,"line":182},[6277,6282,6287],{"type":993,"tag":1027,"props":6278,"children":6279},{"style":1084},[6280],{"type":999,"value":6281},"    def",{"type":993,"tag":1027,"props":6283,"children":6284},{"style":2337},[6285],{"type":999,"value":6286}," safe_update_file",{"type":993,"tag":1027,"props":6288,"children":6289},{"style":1064},[6290],{"type":999,"value":6291},"(filename, new_content):\n",{"type":993,"tag":1027,"props":6293,"children":6294},{"class":1029,"line":191},[6295,6300,6304,6308,6312],{"type":993,"tag":1027,"props":6296,"children":6297},{"style":1064},[6298],{"type":999,"value":6299},"        backup_name ",{"type":993,"tag":1027,"props":6301,"children":6302},{"style":1084},[6303],{"type":999,"value":1284},{"type":993,"tag":1027,"props":6305,"children":6306},{"style":1064},[6307],{"type":999,"value":3349},{"type":993,"tag":1027,"props":6309,"children":6310},{"style":1084},[6311],{"type":999,"value":4554},{"type":993,"tag":1027,"props":6313,"children":6314},{"style":1070},[6315],{"type":999,"value":6316}," \".backup\"\n",{"type":993,"tag":1027,"props":6318,"children":6319},{"class":1029,"line":201},[6320],{"type":993,"tag":1027,"props":6321,"children":6322},{"style":1064},[6323],{"type":999,"value":3071},{"type":993,"tag":1027,"props":6325,"children":6326},{"class":1029,"line":210},[6327,6332],{"type":993,"tag":1027,"props":6328,"children":6329},{"style":1084},[6330],{"type":999,"value":6331},"        try",{"type":993,"tag":1027,"props":6333,"children":6334},{"style":1064},[6335],{"type":999,"value":1132},{"type":993,"tag":1027,"props":6337,"children":6338},{"class":1029,"line":219},[6339],{"type":993,"tag":1027,"props":6340,"children":6341},{"style":1033},[6342],{"type":999,"value":6343},"            # Step 1: Create backup if file exists\n",{"type":993,"tag":1027,"props":6345,"children":6346},{"class":1029,"line":228},[6347,6352],{"type":993,"tag":1027,"props":6348,"children":6349},{"style":1084},[6350],{"type":999,"value":6351},"            if",{"type":993,"tag":1027,"props":6353,"children":6354},{"style":1064},[6355],{"type":999,"value":3371},{"type":993,"tag":1027,"props":6357,"children":6358},{"class":1029,"line":238},[6359],{"type":993,"tag":1027,"props":6360,"children":6361},{"style":1064},[6362],{"type":999,"value":6363},"                shutil.copy2(filename, backup_name)\n",{"type":993,"tag":1027,"props":6365,"children":6366},{"class":1029,"line":247},[6367,6372,6376,6380,6385,6389,6394,6398,6402],{"type":993,"tag":1027,"props":6368,"children":6369},{"style":1058},[6370],{"type":999,"value":6371},"                print",{"type":993,"tag":1027,"props":6373,"children":6374},{"style":1064},[6375],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6377,"children":6378},{"style":1084},[6379],{"type":999,"value":1763},{"type":993,"tag":1027,"props":6381,"children":6382},{"style":1070},[6383],{"type":999,"value":6384},"\"   💾 Backup created: ",{"type":993,"tag":1027,"props":6386,"children":6387},{"style":1058},[6388],{"type":999,"value":1805},{"type":993,"tag":1027,"props":6390,"children":6391},{"style":1064},[6392],{"type":999,"value":6393},"backup_name",{"type":993,"tag":1027,"props":6395,"children":6396},{"style":1058},[6397],{"type":999,"value":2453},{"type":993,"tag":1027,"props":6399,"children":6400},{"style":1070},[6401],{"type":999,"value":1160},{"type":993,"tag":1027,"props":6403,"children":6404},{"style":1064},[6405],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6407,"children":6408},{"class":1029,"line":256},[6409],{"type":993,"tag":1027,"props":6410,"children":6411},{"style":1064},[6412],{"type":999,"value":6413},"            \n",{"type":993,"tag":1027,"props":6415,"children":6416},{"class":1029,"line":265},[6417],{"type":993,"tag":1027,"props":6418,"children":6419},{"style":1033},[6420],{"type":999,"value":6421},"            # Step 2: Write new content\n",{"type":993,"tag":1027,"props":6423,"children":6424},{"class":1029,"line":274},[6425,6430,6434,6438,6442,6446,6450,6454],{"type":993,"tag":1027,"props":6426,"children":6427},{"style":1084},[6428],{"type":999,"value":6429},"            with",{"type":993,"tag":1027,"props":6431,"children":6432},{"style":1058},[6433],{"type":999,"value":1092},{"type":993,"tag":1027,"props":6435,"children":6436},{"style":1064},[6437],{"type":999,"value":6199},{"type":993,"tag":1027,"props":6439,"children":6440},{"style":1070},[6441],{"type":999,"value":1111},{"type":993,"tag":1027,"props":6443,"children":6444},{"style":1064},[6445],{"type":999,"value":1116},{"type":993,"tag":1027,"props":6447,"children":6448},{"style":1084},[6449],{"type":999,"value":1121},{"type":993,"tag":1027,"props":6451,"children":6452},{"style":1124},[6453],{"type":999,"value":1127},{"type":993,"tag":1027,"props":6455,"children":6456},{"style":1064},[6457],{"type":999,"value":1132},{"type":993,"tag":1027,"props":6459,"children":6460},{"class":1029,"line":284},[6461,6466],{"type":993,"tag":1027,"props":6462,"children":6463},{"style":1124},[6464],{"type":999,"value":6465},"                file",{"type":993,"tag":1027,"props":6467,"children":6468},{"style":1064},[6469],{"type":999,"value":6470},".write(new_content)\n",{"type":993,"tag":1027,"props":6472,"children":6473},{"class":1029,"line":293},[6474],{"type":993,"tag":1027,"props":6475,"children":6476},{"style":1064},[6477],{"type":999,"value":6413},{"type":993,"tag":1027,"props":6479,"children":6480},{"class":1029,"line":302},[6481,6485,6489,6493,6498],{"type":993,"tag":1027,"props":6482,"children":6483},{"style":1058},[6484],{"type":999,"value":3396},{"type":993,"tag":1027,"props":6486,"children":6487},{"style":1064},[6488],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6490,"children":6491},{"style":1084},[6492],{"type":999,"value":1763},{"type":993,"tag":1027,"props":6494,"children":6495},{"style":1070},[6496],{"type":999,"value":6497},"\"   ✅ File updated successfully\"",{"type":993,"tag":1027,"props":6499,"children":6500},{"style":1064},[6501],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6503,"children":6504},{"class":1029,"line":311},[6505,6510],{"type":993,"tag":1027,"props":6506,"children":6507},{"style":1084},[6508],{"type":999,"value":6509},"            return",{"type":993,"tag":1027,"props":6511,"children":6512},{"style":1058},[6513],{"type":999,"value":6514}," True\n",{"type":993,"tag":1027,"props":6516,"children":6517},{"class":1029,"line":320},[6518],{"type":993,"tag":1027,"props":6519,"children":6520},{"style":1064},[6521],{"type":999,"value":6413},{"type":993,"tag":1027,"props":6523,"children":6524},{"class":1029,"line":329},[6525,6530,6534,6538],{"type":993,"tag":1027,"props":6526,"children":6527},{"style":1084},[6528],{"type":999,"value":6529},"        except",{"type":993,"tag":1027,"props":6531,"children":6532},{"style":1058},[6533],{"type":999,"value":5759},{"type":993,"tag":1027,"props":6535,"children":6536},{"style":1084},[6537],{"type":999,"value":5764},{"type":993,"tag":1027,"props":6539,"children":6540},{"style":1064},[6541],{"type":999,"value":5769},{"type":993,"tag":1027,"props":6543,"children":6544},{"class":1029,"line":338},[6545,6549,6553,6557,6562,6566,6570,6574,6578],{"type":993,"tag":1027,"props":6546,"children":6547},{"style":1058},[6548],{"type":999,"value":3396},{"type":993,"tag":1027,"props":6550,"children":6551},{"style":1064},[6552],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6554,"children":6555},{"style":1084},[6556],{"type":999,"value":1763},{"type":993,"tag":1027,"props":6558,"children":6559},{"style":1070},[6560],{"type":999,"value":6561},"\"   ❌ Update failed: ",{"type":993,"tag":1027,"props":6563,"children":6564},{"style":1058},[6565],{"type":999,"value":1805},{"type":993,"tag":1027,"props":6567,"children":6568},{"style":1064},[6569],{"type":999,"value":5806},{"type":993,"tag":1027,"props":6571,"children":6572},{"style":1058},[6573],{"type":999,"value":2453},{"type":993,"tag":1027,"props":6575,"children":6576},{"style":1070},[6577],{"type":999,"value":1160},{"type":993,"tag":1027,"props":6579,"children":6580},{"style":1064},[6581],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6583,"children":6584},{"class":1029,"line":347},[6585],{"type":993,"tag":1027,"props":6586,"children":6587},{"style":1064},[6588],{"type":999,"value":6413},{"type":993,"tag":1027,"props":6590,"children":6591},{"class":1029,"line":356},[6592],{"type":993,"tag":1027,"props":6593,"children":6594},{"style":1033},[6595],{"type":999,"value":6596},"            # Step 3: Restore from backup if needed\n",{"type":993,"tag":1027,"props":6598,"children":6599},{"class":1029,"line":365},[6600,6604],{"type":993,"tag":1027,"props":6601,"children":6602},{"style":1084},[6603],{"type":999,"value":6351},{"type":993,"tag":1027,"props":6605,"children":6606},{"style":1064},[6607],{"type":999,"value":6608}," os.path.exists(backup_name):\n",{"type":993,"tag":1027,"props":6610,"children":6611},{"class":1029,"line":374},[6612,6617],{"type":993,"tag":1027,"props":6613,"children":6614},{"style":1084},[6615],{"type":999,"value":6616},"                try",{"type":993,"tag":1027,"props":6618,"children":6619},{"style":1064},[6620],{"type":999,"value":1132},{"type":993,"tag":1027,"props":6622,"children":6623},{"class":1029,"line":384},[6624],{"type":993,"tag":1027,"props":6625,"children":6626},{"style":1064},[6627],{"type":999,"value":6628},"                    shutil.copy2(backup_name, filename)\n",{"type":993,"tag":1027,"props":6630,"children":6631},{"class":1029,"line":393},[6632,6637,6641,6645,6650],{"type":993,"tag":1027,"props":6633,"children":6634},{"style":1058},[6635],{"type":999,"value":6636},"                    print",{"type":993,"tag":1027,"props":6638,"children":6639},{"style":1064},[6640],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6642,"children":6643},{"style":1084},[6644],{"type":999,"value":1763},{"type":993,"tag":1027,"props":6646,"children":6647},{"style":1070},[6648],{"type":999,"value":6649},"\"   🔄 File restored from backup\"",{"type":993,"tag":1027,"props":6651,"children":6652},{"style":1064},[6653],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6655,"children":6656},{"class":1029,"line":402},[6657,6662,6666],{"type":993,"tag":1027,"props":6658,"children":6659},{"style":1084},[6660],{"type":999,"value":6661},"                except",{"type":993,"tag":1027,"props":6663,"children":6664},{"style":1058},[6665],{"type":999,"value":5759},{"type":993,"tag":1027,"props":6667,"children":6668},{"style":1064},[6669],{"type":999,"value":1132},{"type":993,"tag":1027,"props":6671,"children":6672},{"class":1029,"line":411},[6673,6677,6681,6685,6690],{"type":993,"tag":1027,"props":6674,"children":6675},{"style":1058},[6676],{"type":999,"value":6636},{"type":993,"tag":1027,"props":6678,"children":6679},{"style":1064},[6680],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6682,"children":6683},{"style":1084},[6684],{"type":999,"value":1763},{"type":993,"tag":1027,"props":6686,"children":6687},{"style":1070},[6688],{"type":999,"value":6689},"\"   ❌ Could not restore backup\"",{"type":993,"tag":1027,"props":6691,"children":6692},{"style":1064},[6693],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6695,"children":6696},{"class":1029,"line":420},[6697],{"type":993,"tag":1027,"props":6698,"children":6699},{"style":1064},[6700],{"type":999,"value":6413},{"type":993,"tag":1027,"props":6702,"children":6703},{"class":1029,"line":429},[6704,6708],{"type":993,"tag":1027,"props":6705,"children":6706},{"style":1084},[6707],{"type":999,"value":6509},{"type":993,"tag":1027,"props":6709,"children":6710},{"style":1058},[6711],{"type":999,"value":6712}," False\n",{"type":993,"tag":1027,"props":6714,"children":6715},{"class":1029,"line":438},[6716],{"type":993,"tag":1027,"props":6717,"children":6718},{"style":1064},[6719],{"type":999,"value":2373},{"type":993,"tag":1027,"props":6721,"children":6722},{"class":1029,"line":447},[6723],{"type":993,"tag":1027,"props":6724,"children":6725},{"style":1033},[6726],{"type":999,"value":6727},"    # Test safe update\n",{"type":993,"tag":1027,"props":6729,"children":6730},{"class":1029,"line":457},[6731,6736,6740,6745,6749,6753,6757],{"type":993,"tag":1027,"props":6732,"children":6733},{"style":1064},[6734],{"type":999,"value":6735},"    new_content ",{"type":993,"tag":1027,"props":6737,"children":6738},{"style":1084},[6739],{"type":999,"value":1284},{"type":993,"tag":1027,"props":6741,"children":6742},{"style":1064},[6743],{"type":999,"value":6744}," important_data ",{"type":993,"tag":1027,"props":6746,"children":6747},{"style":1084},[6748],{"type":999,"value":4554},{"type":993,"tag":1027,"props":6750,"children":6751},{"style":1070},[6752],{"type":999,"value":3051},{"type":993,"tag":1027,"props":6754,"children":6755},{"style":1058},[6756],{"type":999,"value":1155},{"type":993,"tag":1027,"props":6758,"children":6759},{"style":1070},[6760],{"type":999,"value":6761},"Updated with new information\"\n",{"type":993,"tag":1027,"props":6763,"children":6764},{"class":1029,"line":466},[6765],{"type":993,"tag":1027,"props":6766,"children":6767},{"style":1064},[6768],{"type":999,"value":6769},"    safe_update_file(filename, new_content)\n",{"type":993,"tag":1027,"props":6771,"children":6772},{"class":1029,"line":475},[6773],{"type":993,"tag":1027,"props":6774,"children":6775},{"style":1064},[6776],{"type":999,"value":2373},{"type":993,"tag":1027,"props":6778,"children":6779},{"class":1029,"line":484},[6780],{"type":993,"tag":1027,"props":6781,"children":6782},{"style":1033},[6783],{"type":999,"value":6784},"    # Verify the update\n",{"type":993,"tag":1027,"props":6786,"children":6787},{"class":1029,"line":493},[6788,6792,6796,6800,6804,6808,6812,6816],{"type":993,"tag":1027,"props":6789,"children":6790},{"style":1084},[6791],{"type":999,"value":2482},{"type":993,"tag":1027,"props":6793,"children":6794},{"style":1058},[6795],{"type":999,"value":1092},{"type":993,"tag":1027,"props":6797,"children":6798},{"style":1064},[6799],{"type":999,"value":6199},{"type":993,"tag":1027,"props":6801,"children":6802},{"style":1070},[6803],{"type":999,"value":1255},{"type":993,"tag":1027,"props":6805,"children":6806},{"style":1064},[6807],{"type":999,"value":1116},{"type":993,"tag":1027,"props":6809,"children":6810},{"style":1084},[6811],{"type":999,"value":1121},{"type":993,"tag":1027,"props":6813,"children":6814},{"style":1124},[6815],{"type":999,"value":1127},{"type":993,"tag":1027,"props":6817,"children":6818},{"style":1064},[6819],{"type":999,"value":1132},{"type":993,"tag":1027,"props":6821,"children":6822},{"class":1029,"line":502},[6823,6828,6832,6836],{"type":993,"tag":1027,"props":6824,"children":6825},{"style":1064},[6826],{"type":999,"value":6827},"        content ",{"type":993,"tag":1027,"props":6829,"children":6830},{"style":1084},[6831],{"type":999,"value":1284},{"type":993,"tag":1027,"props":6833,"children":6834},{"style":1124},[6835],{"type":999,"value":1127},{"type":993,"tag":1027,"props":6837,"children":6838},{"style":1064},[6839],{"type":999,"value":1293},{"type":993,"tag":1027,"props":6841,"children":6842},{"class":1029,"line":511},[6843,6847,6851,6855,6859,6863,6868,6873,6877,6881,6885],{"type":993,"tag":1027,"props":6844,"children":6845},{"style":1058},[6846],{"type":999,"value":5725},{"type":993,"tag":1027,"props":6848,"children":6849},{"style":1064},[6850],{"type":999,"value":1067},{"type":993,"tag":1027,"props":6852,"children":6853},{"style":1084},[6854],{"type":999,"value":1763},{"type":993,"tag":1027,"props":6856,"children":6857},{"style":1070},[6858],{"type":999,"value":1160},{"type":993,"tag":1027,"props":6860,"children":6861},{"style":1058},[6862],{"type":999,"value":1155},{"type":993,"tag":1027,"props":6864,"children":6865},{"style":1070},[6866],{"type":999,"value":6867},"📖 Updated content:",{"type":993,"tag":1027,"props":6869,"children":6870},{"style":1058},[6871],{"type":999,"value":6872},"\\n{",{"type":993,"tag":1027,"props":6874,"children":6875},{"style":1064},[6876],{"type":999,"value":17},{"type":993,"tag":1027,"props":6878,"children":6879},{"style":1058},[6880],{"type":999,"value":2453},{"type":993,"tag":1027,"props":6882,"children":6883},{"style":1070},[6884],{"type":999,"value":1160},{"type":993,"tag":1027,"props":6886,"children":6887},{"style":1064},[6888],{"type":999,"value":1078},{"type":993,"tag":1027,"props":6890,"children":6891},{"class":1029,"line":520},[6892],{"type":993,"tag":1027,"props":6893,"children":6894},{"emptyLinePlaceholder":13},[6895],{"type":999,"value":1044},{"type":993,"tag":1027,"props":6897,"children":6898},{"class":1029,"line":530},[6899],{"type":993,"tag":1027,"props":6900,"children":6901},{"style":1064},[6902],{"type":999,"value":6903},"safe_file_writing()\n",{"type":993,"tag":1960,"props":6905,"children":6907},{"id":6906},"writing-different-data-types",[6908],{"type":999,"value":6909},"💾 Writing Different Data Types",{"type":993,"tag":1002,"props":6911,"children":6912},{},[6913],{"type":999,"value":6914},"Different types of data require specific formatting and handling when writing to files.",{"type":993,"tag":1013,"props":6916,"children":6917},{},[6918],{"type":993,"tag":1017,"props":6919,"children":6921},{"className":1019,"code":6920,"language":6,"meta":8,"style":8},"import json\nfrom datetime import datetime\n\n# 💾 Writing Various Data Types\n\ndef write_different_data_types():\n    print(\"💾 Writing different data types:\")\n    \n    # 1. Plain text\n    with open(\"notes.txt\", \"w\") as file:\n        file.write(\"My Python Notes\\n\")\n        file.write(\"Learning file operations\\n\")\n        file.write(\"This is plain text content\")\n    \n    print(\"   📝 Plain text written\")\n    \n    # 2. Numbers and calculations\n    numbers = [10, 25, 30, 45, 50]\n    with open(\"calculations.txt\", \"w\") as file:\n        file.write(\"Number Analysis\\n\")\n        file.write(\"-\" * 15 + \"\\n\")\n        \n        for num in numbers:\n            square = num ** 2\n            file.write(f\"Number: {num:2d}, Square: {square:4d}\\n\")\n        \n        total = sum(numbers)\n        average = total / len(numbers)\n        file.write(f\"\\nTotal: {total}, Average: {average:.1f}\\n\")\n    \n    print(\"   🔢 Numbers and calculations written\")\n    \n    # 3. Structured data as JSON\n    student_data = {\n        \"name\": \"Alice Johnson\",\n        \"age\": 22,\n        \"courses\": [\"Python\", \"Math\", \"Science\"],\n        \"grades\": {\"Python\": 95, \"Math\": 87, \"Science\": 92},\n        \"enrolled\": True,\n        \"enrollment_date\": \"2024-01-15\"\n    }\n    \n    with open(\"student.json\", \"w\") as file:\n        json.dump(student_data, file, indent=2)\n    \n    print(\"   📊 JSON data written\")\n    \n    # 4. Lists and dictionaries as text\n    inventory = {\n        \"apples\": 50,\n        \"bananas\": 30,\n        \"oranges\": 25\n    }\n    \n    with open(\"inventory.txt\", \"w\") as file:\n        file.write(\"Store Inventory\\n\")\n        file.write(\"=\" * 20 + \"\\n\")\n        \n        for item, quantity in inventory.items():\n            file.write(f\"{item.capitalize()}: {quantity} units\\n\")\n        \n        total_items = sum(inventory.values())\n        file.write(f\"\\nTotal items: {total_items}\\n\")\n    \n    print(\"   📦 Inventory data written\")\n\nwrite_different_data_types()\n",[6922],{"type":993,"tag":1023,"props":6923,"children":6924},{"__ignoreMap":8},[6925,6936,6955,6962,6970,6977,6993,7013,7020,7028,7072,7100,7128,7148,7155,7175,7182,7190,7250,7294,7322,7366,7373,7394,7420,7489,7496,7518,7549,7620,7627,7647,7654,7662,7678,7699,7720,7759,7823,7844,7861,7868,7875,7919,7951,7958,7978,7985,7993,8009,8029,8049,8066,8073,8080,8124,8152,8195,8202,8223,8289,8296,8317,8366,8373,8393,8400],{"type":993,"tag":1027,"props":6926,"children":6927},{"class":1029,"line":12},[6928,6932],{"type":993,"tag":1027,"props":6929,"children":6930},{"style":1084},[6931],{"type":999,"value":2299},{"type":993,"tag":1027,"props":6933,"children":6934},{"style":1064},[6935],{"type":999,"value":4624},{"type":993,"tag":1027,"props":6937,"children":6938},{"class":1029,"line":27},[6939,6943,6947,6951],{"type":993,"tag":1027,"props":6940,"children":6941},{"style":1084},[6942],{"type":999,"value":2289},{"type":993,"tag":1027,"props":6944,"children":6945},{"style":1064},[6946],{"type":999,"value":2294},{"type":993,"tag":1027,"props":6948,"children":6949},{"style":1084},[6950],{"type":999,"value":2299},{"type":993,"tag":1027,"props":6952,"children":6953},{"style":1064},[6954],{"type":999,"value":2304},{"type":993,"tag":1027,"props":6956,"children":6957},{"class":1029,"line":36},[6958],{"type":993,"tag":1027,"props":6959,"children":6960},{"emptyLinePlaceholder":13},[6961],{"type":999,"value":1044},{"type":993,"tag":1027,"props":6963,"children":6964},{"class":1029,"line":45},[6965],{"type":993,"tag":1027,"props":6966,"children":6967},{"style":1033},[6968],{"type":999,"value":6969},"# 💾 Writing Various Data Types\n",{"type":993,"tag":1027,"props":6971,"children":6972},{"class":1029,"line":54},[6973],{"type":993,"tag":1027,"props":6974,"children":6975},{"emptyLinePlaceholder":13},[6976],{"type":999,"value":1044},{"type":993,"tag":1027,"props":6978,"children":6979},{"class":1029,"line":63},[6980,6984,6989],{"type":993,"tag":1027,"props":6981,"children":6982},{"style":1084},[6983],{"type":999,"value":2334},{"type":993,"tag":1027,"props":6985,"children":6986},{"style":2337},[6987],{"type":999,"value":6988}," write_different_data_types",{"type":993,"tag":1027,"props":6990,"children":6991},{"style":1064},[6992],{"type":999,"value":2345},{"type":993,"tag":1027,"props":6994,"children":6995},{"class":1029,"line":72},[6996,7000,7004,7009],{"type":993,"tag":1027,"props":6997,"children":6998},{"style":1058},[6999],{"type":999,"value":1301},{"type":993,"tag":1027,"props":7001,"children":7002},{"style":1064},[7003],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7005,"children":7006},{"style":1070},[7007],{"type":999,"value":7008},"\"💾 Writing different data types:\"",{"type":993,"tag":1027,"props":7010,"children":7011},{"style":1064},[7012],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7014,"children":7015},{"class":1029,"line":81},[7016],{"type":993,"tag":1027,"props":7017,"children":7018},{"style":1064},[7019],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7021,"children":7022},{"class":1029,"line":91},[7023],{"type":993,"tag":1027,"props":7024,"children":7025},{"style":1033},[7026],{"type":999,"value":7027},"    # 1. Plain text\n",{"type":993,"tag":1027,"props":7029,"children":7030},{"class":1029,"line":100},[7031,7035,7039,7043,7048,7052,7056,7060,7064,7068],{"type":993,"tag":1027,"props":7032,"children":7033},{"style":1084},[7034],{"type":999,"value":2482},{"type":993,"tag":1027,"props":7036,"children":7037},{"style":1058},[7038],{"type":999,"value":1092},{"type":993,"tag":1027,"props":7040,"children":7041},{"style":1064},[7042],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7044,"children":7045},{"style":1070},[7046],{"type":999,"value":7047},"\"notes.txt\"",{"type":993,"tag":1027,"props":7049,"children":7050},{"style":1064},[7051],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7053,"children":7054},{"style":1070},[7055],{"type":999,"value":1111},{"type":993,"tag":1027,"props":7057,"children":7058},{"style":1064},[7059],{"type":999,"value":1116},{"type":993,"tag":1027,"props":7061,"children":7062},{"style":1084},[7063],{"type":999,"value":1121},{"type":993,"tag":1027,"props":7065,"children":7066},{"style":1124},[7067],{"type":999,"value":1127},{"type":993,"tag":1027,"props":7069,"children":7070},{"style":1064},[7071],{"type":999,"value":1132},{"type":993,"tag":1027,"props":7073,"children":7074},{"class":1029,"line":109},[7075,7079,7083,7088,7092,7096],{"type":993,"tag":1027,"props":7076,"children":7077},{"style":1124},[7078],{"type":999,"value":2527},{"type":993,"tag":1027,"props":7080,"children":7081},{"style":1064},[7082],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7084,"children":7085},{"style":1070},[7086],{"type":999,"value":7087},"\"My Python Notes",{"type":993,"tag":1027,"props":7089,"children":7090},{"style":1058},[7091],{"type":999,"value":1155},{"type":993,"tag":1027,"props":7093,"children":7094},{"style":1070},[7095],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7097,"children":7098},{"style":1064},[7099],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7101,"children":7102},{"class":1029,"line":118},[7103,7107,7111,7116,7120,7124],{"type":993,"tag":1027,"props":7104,"children":7105},{"style":1124},[7106],{"type":999,"value":2527},{"type":993,"tag":1027,"props":7108,"children":7109},{"style":1064},[7110],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7112,"children":7113},{"style":1070},[7114],{"type":999,"value":7115},"\"Learning file operations",{"type":993,"tag":1027,"props":7117,"children":7118},{"style":1058},[7119],{"type":999,"value":1155},{"type":993,"tag":1027,"props":7121,"children":7122},{"style":1070},[7123],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7125,"children":7126},{"style":1064},[7127],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7129,"children":7130},{"class":1029,"line":127},[7131,7135,7139,7144],{"type":993,"tag":1027,"props":7132,"children":7133},{"style":1124},[7134],{"type":999,"value":2527},{"type":993,"tag":1027,"props":7136,"children":7137},{"style":1064},[7138],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7140,"children":7141},{"style":1070},[7142],{"type":999,"value":7143},"\"This is plain text content\"",{"type":993,"tag":1027,"props":7145,"children":7146},{"style":1064},[7147],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7149,"children":7150},{"class":1029,"line":136},[7151],{"type":993,"tag":1027,"props":7152,"children":7153},{"style":1064},[7154],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7156,"children":7157},{"class":1029,"line":146},[7158,7162,7166,7171],{"type":993,"tag":1027,"props":7159,"children":7160},{"style":1058},[7161],{"type":999,"value":1301},{"type":993,"tag":1027,"props":7163,"children":7164},{"style":1064},[7165],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7167,"children":7168},{"style":1070},[7169],{"type":999,"value":7170},"\"   📝 Plain text written\"",{"type":993,"tag":1027,"props":7172,"children":7173},{"style":1064},[7174],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7176,"children":7177},{"class":1029,"line":155},[7178],{"type":993,"tag":1027,"props":7179,"children":7180},{"style":1064},[7181],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7183,"children":7184},{"class":1029,"line":164},[7185],{"type":993,"tag":1027,"props":7186,"children":7187},{"style":1033},[7188],{"type":999,"value":7189},"    # 2. Numbers and calculations\n",{"type":993,"tag":1027,"props":7191,"children":7192},{"class":1029,"line":173},[7193,7198,7202,7206,7211,7215,7219,7223,7228,7232,7237,7241,7246],{"type":993,"tag":1027,"props":7194,"children":7195},{"style":1064},[7196],{"type":999,"value":7197},"    numbers ",{"type":993,"tag":1027,"props":7199,"children":7200},{"style":1084},[7201],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7203,"children":7204},{"style":1064},[7205],{"type":999,"value":3276},{"type":993,"tag":1027,"props":7207,"children":7208},{"style":1058},[7209],{"type":999,"value":7210},"10",{"type":993,"tag":1027,"props":7212,"children":7213},{"style":1064},[7214],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7216,"children":7217},{"style":1058},[7218],{"type":999,"value":1673},{"type":993,"tag":1027,"props":7220,"children":7221},{"style":1064},[7222],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7224,"children":7225},{"style":1058},[7226],{"type":999,"value":7227},"30",{"type":993,"tag":1027,"props":7229,"children":7230},{"style":1064},[7231],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7233,"children":7234},{"style":1058},[7235],{"type":999,"value":7236},"45",{"type":993,"tag":1027,"props":7238,"children":7239},{"style":1064},[7240],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7242,"children":7243},{"style":1058},[7244],{"type":999,"value":7245},"50",{"type":993,"tag":1027,"props":7247,"children":7248},{"style":1064},[7249],{"type":999,"value":3301},{"type":993,"tag":1027,"props":7251,"children":7252},{"class":1029,"line":182},[7253,7257,7261,7265,7270,7274,7278,7282,7286,7290],{"type":993,"tag":1027,"props":7254,"children":7255},{"style":1084},[7256],{"type":999,"value":2482},{"type":993,"tag":1027,"props":7258,"children":7259},{"style":1058},[7260],{"type":999,"value":1092},{"type":993,"tag":1027,"props":7262,"children":7263},{"style":1064},[7264],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7266,"children":7267},{"style":1070},[7268],{"type":999,"value":7269},"\"calculations.txt\"",{"type":993,"tag":1027,"props":7271,"children":7272},{"style":1064},[7273],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7275,"children":7276},{"style":1070},[7277],{"type":999,"value":1111},{"type":993,"tag":1027,"props":7279,"children":7280},{"style":1064},[7281],{"type":999,"value":1116},{"type":993,"tag":1027,"props":7283,"children":7284},{"style":1084},[7285],{"type":999,"value":1121},{"type":993,"tag":1027,"props":7287,"children":7288},{"style":1124},[7289],{"type":999,"value":1127},{"type":993,"tag":1027,"props":7291,"children":7292},{"style":1064},[7293],{"type":999,"value":1132},{"type":993,"tag":1027,"props":7295,"children":7296},{"class":1029,"line":191},[7297,7301,7305,7310,7314,7318],{"type":993,"tag":1027,"props":7298,"children":7299},{"style":1124},[7300],{"type":999,"value":2527},{"type":993,"tag":1027,"props":7302,"children":7303},{"style":1064},[7304],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7306,"children":7307},{"style":1070},[7308],{"type":999,"value":7309},"\"Number Analysis",{"type":993,"tag":1027,"props":7311,"children":7312},{"style":1058},[7313],{"type":999,"value":1155},{"type":993,"tag":1027,"props":7315,"children":7316},{"style":1070},[7317],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7319,"children":7320},{"style":1064},[7321],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7323,"children":7324},{"class":1029,"line":201},[7325,7329,7333,7337,7341,7346,7350,7354,7358,7362],{"type":993,"tag":1027,"props":7326,"children":7327},{"style":1124},[7328],{"type":999,"value":2527},{"type":993,"tag":1027,"props":7330,"children":7331},{"style":1064},[7332],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7334,"children":7335},{"style":1070},[7336],{"type":999,"value":3915},{"type":993,"tag":1027,"props":7338,"children":7339},{"style":1084},[7340],{"type":999,"value":3036},{"type":993,"tag":1027,"props":7342,"children":7343},{"style":1058},[7344],{"type":999,"value":7345}," 15",{"type":993,"tag":1027,"props":7347,"children":7348},{"style":1084},[7349],{"type":999,"value":3046},{"type":993,"tag":1027,"props":7351,"children":7352},{"style":1070},[7353],{"type":999,"value":3051},{"type":993,"tag":1027,"props":7355,"children":7356},{"style":1058},[7357],{"type":999,"value":1155},{"type":993,"tag":1027,"props":7359,"children":7360},{"style":1070},[7361],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7363,"children":7364},{"style":1064},[7365],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7367,"children":7368},{"class":1029,"line":210},[7369],{"type":993,"tag":1027,"props":7370,"children":7371},{"style":1064},[7372],{"type":999,"value":3071},{"type":993,"tag":1027,"props":7374,"children":7375},{"class":1029,"line":219},[7376,7380,7385,7389],{"type":993,"tag":1027,"props":7377,"children":7378},{"style":1084},[7379],{"type":999,"value":3079},{"type":993,"tag":1027,"props":7381,"children":7382},{"style":1064},[7383],{"type":999,"value":7384}," num ",{"type":993,"tag":1027,"props":7386,"children":7387},{"style":1084},[7388],{"type":999,"value":3089},{"type":993,"tag":1027,"props":7390,"children":7391},{"style":1064},[7392],{"type":999,"value":7393}," numbers:\n",{"type":993,"tag":1027,"props":7395,"children":7396},{"class":1029,"line":228},[7397,7402,7406,7410,7415],{"type":993,"tag":1027,"props":7398,"children":7399},{"style":1064},[7400],{"type":999,"value":7401},"            square ",{"type":993,"tag":1027,"props":7403,"children":7404},{"style":1084},[7405],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7407,"children":7408},{"style":1064},[7409],{"type":999,"value":7384},{"type":993,"tag":1027,"props":7411,"children":7412},{"style":1084},[7413],{"type":999,"value":7414},"**",{"type":993,"tag":1027,"props":7416,"children":7417},{"style":1058},[7418],{"type":999,"value":7419}," 2\n",{"type":993,"tag":1027,"props":7421,"children":7422},{"class":1029,"line":238},[7423,7427,7431,7435,7440,7444,7449,7454,7458,7463,7467,7472,7477,7481,7485],{"type":993,"tag":1027,"props":7424,"children":7425},{"style":1124},[7426],{"type":999,"value":3199},{"type":993,"tag":1027,"props":7428,"children":7429},{"style":1064},[7430],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7432,"children":7433},{"style":1084},[7434],{"type":999,"value":1763},{"type":993,"tag":1027,"props":7436,"children":7437},{"style":1070},[7438],{"type":999,"value":7439},"\"Number: ",{"type":993,"tag":1027,"props":7441,"children":7442},{"style":1058},[7443],{"type":999,"value":1805},{"type":993,"tag":1027,"props":7445,"children":7446},{"style":1064},[7447],{"type":999,"value":7448},"num",{"type":993,"tag":1027,"props":7450,"children":7451},{"style":1084},[7452],{"type":999,"value":7453},":2d",{"type":993,"tag":1027,"props":7455,"children":7456},{"style":1058},[7457],{"type":999,"value":2453},{"type":993,"tag":1027,"props":7459,"children":7460},{"style":1070},[7461],{"type":999,"value":7462},", Square: ",{"type":993,"tag":1027,"props":7464,"children":7465},{"style":1058},[7466],{"type":999,"value":1805},{"type":993,"tag":1027,"props":7468,"children":7469},{"style":1064},[7470],{"type":999,"value":7471},"square",{"type":993,"tag":1027,"props":7473,"children":7474},{"style":1084},[7475],{"type":999,"value":7476},":4d",{"type":993,"tag":1027,"props":7478,"children":7479},{"style":1058},[7480],{"type":999,"value":1825},{"type":993,"tag":1027,"props":7482,"children":7483},{"style":1070},[7484],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7486,"children":7487},{"style":1064},[7488],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7490,"children":7491},{"class":1029,"line":247},[7492],{"type":993,"tag":1027,"props":7493,"children":7494},{"style":1064},[7495],{"type":999,"value":3071},{"type":993,"tag":1027,"props":7497,"children":7498},{"class":1029,"line":256},[7499,7504,7508,7513],{"type":993,"tag":1027,"props":7500,"children":7501},{"style":1064},[7502],{"type":999,"value":7503},"        total ",{"type":993,"tag":1027,"props":7505,"children":7506},{"style":1084},[7507],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7509,"children":7510},{"style":1058},[7511],{"type":999,"value":7512}," sum",{"type":993,"tag":1027,"props":7514,"children":7515},{"style":1064},[7516],{"type":999,"value":7517},"(numbers)\n",{"type":993,"tag":1027,"props":7519,"children":7520},{"class":1029,"line":265},[7521,7526,7530,7535,7540,7545],{"type":993,"tag":1027,"props":7522,"children":7523},{"style":1064},[7524],{"type":999,"value":7525},"        average ",{"type":993,"tag":1027,"props":7527,"children":7528},{"style":1084},[7529],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7531,"children":7532},{"style":1064},[7533],{"type":999,"value":7534}," total ",{"type":993,"tag":1027,"props":7536,"children":7537},{"style":1084},[7538],{"type":999,"value":7539},"/",{"type":993,"tag":1027,"props":7541,"children":7542},{"style":1058},[7543],{"type":999,"value":7544}," len",{"type":993,"tag":1027,"props":7546,"children":7547},{"style":1064},[7548],{"type":999,"value":7517},{"type":993,"tag":1027,"props":7550,"children":7551},{"class":1029,"line":274},[7552,7556,7560,7564,7568,7572,7577,7581,7585,7589,7594,7598,7603,7608,7612,7616],{"type":993,"tag":1027,"props":7553,"children":7554},{"style":1124},[7555],{"type":999,"value":2527},{"type":993,"tag":1027,"props":7557,"children":7558},{"style":1064},[7559],{"type":999,"value":1145},{"type":993,"tag":1027,"props":7561,"children":7562},{"style":1084},[7563],{"type":999,"value":1763},{"type":993,"tag":1027,"props":7565,"children":7566},{"style":1070},[7567],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7569,"children":7570},{"style":1058},[7571],{"type":999,"value":1155},{"type":993,"tag":1027,"props":7573,"children":7574},{"style":1070},[7575],{"type":999,"value":7576},"Total: ",{"type":993,"tag":1027,"props":7578,"children":7579},{"style":1058},[7580],{"type":999,"value":1805},{"type":993,"tag":1027,"props":7582,"children":7583},{"style":1064},[7584],{"type":999,"value":4122},{"type":993,"tag":1027,"props":7586,"children":7587},{"style":1058},[7588],{"type":999,"value":2453},{"type":993,"tag":1027,"props":7590,"children":7591},{"style":1070},[7592],{"type":999,"value":7593},", Average: ",{"type":993,"tag":1027,"props":7595,"children":7596},{"style":1058},[7597],{"type":999,"value":1805},{"type":993,"tag":1027,"props":7599,"children":7600},{"style":1064},[7601],{"type":999,"value":7602},"average",{"type":993,"tag":1027,"props":7604,"children":7605},{"style":1084},[7606],{"type":999,"value":7607},":.1f",{"type":993,"tag":1027,"props":7609,"children":7610},{"style":1058},[7611],{"type":999,"value":1825},{"type":993,"tag":1027,"props":7613,"children":7614},{"style":1070},[7615],{"type":999,"value":1160},{"type":993,"tag":1027,"props":7617,"children":7618},{"style":1064},[7619],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7621,"children":7622},{"class":1029,"line":284},[7623],{"type":993,"tag":1027,"props":7624,"children":7625},{"style":1064},[7626],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7628,"children":7629},{"class":1029,"line":293},[7630,7634,7638,7643],{"type":993,"tag":1027,"props":7631,"children":7632},{"style":1058},[7633],{"type":999,"value":1301},{"type":993,"tag":1027,"props":7635,"children":7636},{"style":1064},[7637],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7639,"children":7640},{"style":1070},[7641],{"type":999,"value":7642},"\"   🔢 Numbers and calculations written\"",{"type":993,"tag":1027,"props":7644,"children":7645},{"style":1064},[7646],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7648,"children":7649},{"class":1029,"line":302},[7650],{"type":993,"tag":1027,"props":7651,"children":7652},{"style":1064},[7653],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7655,"children":7656},{"class":1029,"line":311},[7657],{"type":993,"tag":1027,"props":7658,"children":7659},{"style":1033},[7660],{"type":999,"value":7661},"    # 3. Structured data as JSON\n",{"type":993,"tag":1027,"props":7663,"children":7664},{"class":1029,"line":320},[7665,7670,7674],{"type":993,"tag":1027,"props":7666,"children":7667},{"style":1064},[7668],{"type":999,"value":7669},"    student_data ",{"type":993,"tag":1027,"props":7671,"children":7672},{"style":1084},[7673],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7675,"children":7676},{"style":1064},[7677],{"type":999,"value":4648},{"type":993,"tag":1027,"props":7679,"children":7680},{"class":1029,"line":329},[7681,7686,7690,7695],{"type":993,"tag":1027,"props":7682,"children":7683},{"style":1070},[7684],{"type":999,"value":7685},"        \"name\"",{"type":993,"tag":1027,"props":7687,"children":7688},{"style":1064},[7689],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7691,"children":7692},{"style":1070},[7693],{"type":999,"value":7694},"\"Alice Johnson\"",{"type":993,"tag":1027,"props":7696,"children":7697},{"style":1064},[7698],{"type":999,"value":4670},{"type":993,"tag":1027,"props":7700,"children":7701},{"class":1029,"line":338},[7702,7707,7711,7716],{"type":993,"tag":1027,"props":7703,"children":7704},{"style":1070},[7705],{"type":999,"value":7706},"        \"age\"",{"type":993,"tag":1027,"props":7708,"children":7709},{"style":1064},[7710],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7712,"children":7713},{"style":1058},[7714],{"type":999,"value":7715},"22",{"type":993,"tag":1027,"props":7717,"children":7718},{"style":1064},[7719],{"type":999,"value":4670},{"type":993,"tag":1027,"props":7721,"children":7722},{"class":1029,"line":347},[7723,7728,7732,7737,7741,7746,7750,7755],{"type":993,"tag":1027,"props":7724,"children":7725},{"style":1070},[7726],{"type":999,"value":7727},"        \"courses\"",{"type":993,"tag":1027,"props":7729,"children":7730},{"style":1064},[7731],{"type":999,"value":4704},{"type":993,"tag":1027,"props":7733,"children":7734},{"style":1070},[7735],{"type":999,"value":7736},"\"Python\"",{"type":993,"tag":1027,"props":7738,"children":7739},{"style":1064},[7740],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7742,"children":7743},{"style":1070},[7744],{"type":999,"value":7745},"\"Math\"",{"type":993,"tag":1027,"props":7747,"children":7748},{"style":1064},[7749],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7751,"children":7752},{"style":1070},[7753],{"type":999,"value":7754},"\"Science\"",{"type":993,"tag":1027,"props":7756,"children":7757},{"style":1064},[7758],{"type":999,"value":4349},{"type":993,"tag":1027,"props":7760,"children":7761},{"class":1029,"line":356},[7762,7767,7772,7776,7780,7785,7789,7793,7797,7802,7806,7810,7814,7819],{"type":993,"tag":1027,"props":7763,"children":7764},{"style":1070},[7765],{"type":999,"value":7766},"        \"grades\"",{"type":993,"tag":1027,"props":7768,"children":7769},{"style":1064},[7770],{"type":999,"value":7771},": {",{"type":993,"tag":1027,"props":7773,"children":7774},{"style":1070},[7775],{"type":999,"value":7736},{"type":993,"tag":1027,"props":7777,"children":7778},{"style":1064},[7779],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7781,"children":7782},{"style":1058},[7783],{"type":999,"value":7784},"95",{"type":993,"tag":1027,"props":7786,"children":7787},{"style":1064},[7788],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7790,"children":7791},{"style":1070},[7792],{"type":999,"value":7745},{"type":993,"tag":1027,"props":7794,"children":7795},{"style":1064},[7796],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7798,"children":7799},{"style":1058},[7800],{"type":999,"value":7801},"87",{"type":993,"tag":1027,"props":7803,"children":7804},{"style":1064},[7805],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7807,"children":7808},{"style":1070},[7809],{"type":999,"value":7754},{"type":993,"tag":1027,"props":7811,"children":7812},{"style":1064},[7813],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7815,"children":7816},{"style":1058},[7817],{"type":999,"value":7818},"92",{"type":993,"tag":1027,"props":7820,"children":7821},{"style":1064},[7822],{"type":999,"value":2870},{"type":993,"tag":1027,"props":7824,"children":7825},{"class":1029,"line":365},[7826,7831,7835,7840],{"type":993,"tag":1027,"props":7827,"children":7828},{"style":1070},[7829],{"type":999,"value":7830},"        \"enrolled\"",{"type":993,"tag":1027,"props":7832,"children":7833},{"style":1064},[7834],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7836,"children":7837},{"style":1058},[7838],{"type":999,"value":7839},"True",{"type":993,"tag":1027,"props":7841,"children":7842},{"style":1064},[7843],{"type":999,"value":4670},{"type":993,"tag":1027,"props":7845,"children":7846},{"class":1029,"line":374},[7847,7852,7856],{"type":993,"tag":1027,"props":7848,"children":7849},{"style":1070},[7850],{"type":999,"value":7851},"        \"enrollment_date\"",{"type":993,"tag":1027,"props":7853,"children":7854},{"style":1064},[7855],{"type":999,"value":1650},{"type":993,"tag":1027,"props":7857,"children":7858},{"style":1070},[7859],{"type":999,"value":7860},"\"2024-01-15\"\n",{"type":993,"tag":1027,"props":7862,"children":7863},{"class":1029,"line":384},[7864],{"type":993,"tag":1027,"props":7865,"children":7866},{"style":1064},[7867],{"type":999,"value":4795},{"type":993,"tag":1027,"props":7869,"children":7870},{"class":1029,"line":393},[7871],{"type":993,"tag":1027,"props":7872,"children":7873},{"style":1064},[7874],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7876,"children":7877},{"class":1029,"line":402},[7878,7882,7886,7890,7895,7899,7903,7907,7911,7915],{"type":993,"tag":1027,"props":7879,"children":7880},{"style":1084},[7881],{"type":999,"value":2482},{"type":993,"tag":1027,"props":7883,"children":7884},{"style":1058},[7885],{"type":999,"value":1092},{"type":993,"tag":1027,"props":7887,"children":7888},{"style":1064},[7889],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7891,"children":7892},{"style":1070},[7893],{"type":999,"value":7894},"\"student.json\"",{"type":993,"tag":1027,"props":7896,"children":7897},{"style":1064},[7898],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7900,"children":7901},{"style":1070},[7902],{"type":999,"value":1111},{"type":993,"tag":1027,"props":7904,"children":7905},{"style":1064},[7906],{"type":999,"value":1116},{"type":993,"tag":1027,"props":7908,"children":7909},{"style":1084},[7910],{"type":999,"value":1121},{"type":993,"tag":1027,"props":7912,"children":7913},{"style":1124},[7914],{"type":999,"value":1127},{"type":993,"tag":1027,"props":7916,"children":7917},{"style":1064},[7918],{"type":999,"value":1132},{"type":993,"tag":1027,"props":7920,"children":7921},{"class":1029,"line":411},[7922,7927,7931,7935,7939,7943,7947],{"type":993,"tag":1027,"props":7923,"children":7924},{"style":1064},[7925],{"type":999,"value":7926},"        json.dump(student_data, ",{"type":993,"tag":1027,"props":7928,"children":7929},{"style":1124},[7930],{"type":999,"value":4859},{"type":993,"tag":1027,"props":7932,"children":7933},{"style":1064},[7934],{"type":999,"value":1106},{"type":993,"tag":1027,"props":7936,"children":7937},{"style":1124},[7938],{"type":999,"value":4868},{"type":993,"tag":1027,"props":7940,"children":7941},{"style":1084},[7942],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7944,"children":7945},{"style":1058},[7946],{"type":999,"value":4877},{"type":993,"tag":1027,"props":7948,"children":7949},{"style":1064},[7950],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7952,"children":7953},{"class":1029,"line":420},[7954],{"type":993,"tag":1027,"props":7955,"children":7956},{"style":1064},[7957],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7959,"children":7960},{"class":1029,"line":429},[7961,7965,7969,7974],{"type":993,"tag":1027,"props":7962,"children":7963},{"style":1058},[7964],{"type":999,"value":1301},{"type":993,"tag":1027,"props":7966,"children":7967},{"style":1064},[7968],{"type":999,"value":1067},{"type":993,"tag":1027,"props":7970,"children":7971},{"style":1070},[7972],{"type":999,"value":7973},"\"   📊 JSON data written\"",{"type":993,"tag":1027,"props":7975,"children":7976},{"style":1064},[7977],{"type":999,"value":1078},{"type":993,"tag":1027,"props":7979,"children":7980},{"class":1029,"line":438},[7981],{"type":993,"tag":1027,"props":7982,"children":7983},{"style":1064},[7984],{"type":999,"value":2373},{"type":993,"tag":1027,"props":7986,"children":7987},{"class":1029,"line":447},[7988],{"type":993,"tag":1027,"props":7989,"children":7990},{"style":1033},[7991],{"type":999,"value":7992},"    # 4. Lists and dictionaries as text\n",{"type":993,"tag":1027,"props":7994,"children":7995},{"class":1029,"line":457},[7996,8001,8005],{"type":993,"tag":1027,"props":7997,"children":7998},{"style":1064},[7999],{"type":999,"value":8000},"    inventory ",{"type":993,"tag":1027,"props":8002,"children":8003},{"style":1084},[8004],{"type":999,"value":1284},{"type":993,"tag":1027,"props":8006,"children":8007},{"style":1064},[8008],{"type":999,"value":4648},{"type":993,"tag":1027,"props":8010,"children":8011},{"class":1029,"line":466},[8012,8017,8021,8025],{"type":993,"tag":1027,"props":8013,"children":8014},{"style":1070},[8015],{"type":999,"value":8016},"        \"apples\"",{"type":993,"tag":1027,"props":8018,"children":8019},{"style":1064},[8020],{"type":999,"value":1650},{"type":993,"tag":1027,"props":8022,"children":8023},{"style":1058},[8024],{"type":999,"value":7245},{"type":993,"tag":1027,"props":8026,"children":8027},{"style":1064},[8028],{"type":999,"value":4670},{"type":993,"tag":1027,"props":8030,"children":8031},{"class":1029,"line":475},[8032,8037,8041,8045],{"type":993,"tag":1027,"props":8033,"children":8034},{"style":1070},[8035],{"type":999,"value":8036},"        \"bananas\"",{"type":993,"tag":1027,"props":8038,"children":8039},{"style":1064},[8040],{"type":999,"value":1650},{"type":993,"tag":1027,"props":8042,"children":8043},{"style":1058},[8044],{"type":999,"value":7227},{"type":993,"tag":1027,"props":8046,"children":8047},{"style":1064},[8048],{"type":999,"value":4670},{"type":993,"tag":1027,"props":8050,"children":8051},{"class":1029,"line":484},[8052,8057,8061],{"type":993,"tag":1027,"props":8053,"children":8054},{"style":1070},[8055],{"type":999,"value":8056},"        \"oranges\"",{"type":993,"tag":1027,"props":8058,"children":8059},{"style":1064},[8060],{"type":999,"value":1650},{"type":993,"tag":1027,"props":8062,"children":8063},{"style":1058},[8064],{"type":999,"value":8065},"25\n",{"type":993,"tag":1027,"props":8067,"children":8068},{"class":1029,"line":493},[8069],{"type":993,"tag":1027,"props":8070,"children":8071},{"style":1064},[8072],{"type":999,"value":4795},{"type":993,"tag":1027,"props":8074,"children":8075},{"class":1029,"line":502},[8076],{"type":993,"tag":1027,"props":8077,"children":8078},{"style":1064},[8079],{"type":999,"value":2373},{"type":993,"tag":1027,"props":8081,"children":8082},{"class":1029,"line":511},[8083,8087,8091,8095,8100,8104,8108,8112,8116,8120],{"type":993,"tag":1027,"props":8084,"children":8085},{"style":1084},[8086],{"type":999,"value":2482},{"type":993,"tag":1027,"props":8088,"children":8089},{"style":1058},[8090],{"type":999,"value":1092},{"type":993,"tag":1027,"props":8092,"children":8093},{"style":1064},[8094],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8096,"children":8097},{"style":1070},[8098],{"type":999,"value":8099},"\"inventory.txt\"",{"type":993,"tag":1027,"props":8101,"children":8102},{"style":1064},[8103],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8105,"children":8106},{"style":1070},[8107],{"type":999,"value":1111},{"type":993,"tag":1027,"props":8109,"children":8110},{"style":1064},[8111],{"type":999,"value":1116},{"type":993,"tag":1027,"props":8113,"children":8114},{"style":1084},[8115],{"type":999,"value":1121},{"type":993,"tag":1027,"props":8117,"children":8118},{"style":1124},[8119],{"type":999,"value":1127},{"type":993,"tag":1027,"props":8121,"children":8122},{"style":1064},[8123],{"type":999,"value":1132},{"type":993,"tag":1027,"props":8125,"children":8126},{"class":1029,"line":520},[8127,8131,8135,8140,8144,8148],{"type":993,"tag":1027,"props":8128,"children":8129},{"style":1124},[8130],{"type":999,"value":2527},{"type":993,"tag":1027,"props":8132,"children":8133},{"style":1064},[8134],{"type":999,"value":1145},{"type":993,"tag":1027,"props":8136,"children":8137},{"style":1070},[8138],{"type":999,"value":8139},"\"Store Inventory",{"type":993,"tag":1027,"props":8141,"children":8142},{"style":1058},[8143],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8145,"children":8146},{"style":1070},[8147],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8149,"children":8150},{"style":1064},[8151],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8153,"children":8154},{"class":1029,"line":530},[8155,8159,8163,8167,8171,8175,8179,8183,8187,8191],{"type":993,"tag":1027,"props":8156,"children":8157},{"style":1124},[8158],{"type":999,"value":2527},{"type":993,"tag":1027,"props":8160,"children":8161},{"style":1064},[8162],{"type":999,"value":1145},{"type":993,"tag":1027,"props":8164,"children":8165},{"style":1070},[8166],{"type":999,"value":3031},{"type":993,"tag":1027,"props":8168,"children":8169},{"style":1084},[8170],{"type":999,"value":3036},{"type":993,"tag":1027,"props":8172,"children":8173},{"style":1058},[8174],{"type":999,"value":3041},{"type":993,"tag":1027,"props":8176,"children":8177},{"style":1084},[8178],{"type":999,"value":3046},{"type":993,"tag":1027,"props":8180,"children":8181},{"style":1070},[8182],{"type":999,"value":3051},{"type":993,"tag":1027,"props":8184,"children":8185},{"style":1058},[8186],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8188,"children":8189},{"style":1070},[8190],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8192,"children":8193},{"style":1064},[8194],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8196,"children":8197},{"class":1029,"line":539},[8198],{"type":993,"tag":1027,"props":8199,"children":8200},{"style":1064},[8201],{"type":999,"value":3071},{"type":993,"tag":1027,"props":8203,"children":8204},{"class":1029,"line":548},[8205,8209,8214,8218],{"type":993,"tag":1027,"props":8206,"children":8207},{"style":1084},[8208],{"type":999,"value":3079},{"type":993,"tag":1027,"props":8210,"children":8211},{"style":1064},[8212],{"type":999,"value":8213}," item, quantity ",{"type":993,"tag":1027,"props":8215,"children":8216},{"style":1084},[8217],{"type":999,"value":3089},{"type":993,"tag":1027,"props":8219,"children":8220},{"style":1064},[8221],{"type":999,"value":8222}," inventory.items():\n",{"type":993,"tag":1027,"props":8224,"children":8225},{"class":1029,"line":557},[8226,8230,8234,8238,8242,8246,8251,8255,8259,8263,8268,8272,8277,8281,8285],{"type":993,"tag":1027,"props":8227,"children":8228},{"style":1124},[8229],{"type":999,"value":3199},{"type":993,"tag":1027,"props":8231,"children":8232},{"style":1064},[8233],{"type":999,"value":1145},{"type":993,"tag":1027,"props":8235,"children":8236},{"style":1084},[8237],{"type":999,"value":1763},{"type":993,"tag":1027,"props":8239,"children":8240},{"style":1070},[8241],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8243,"children":8244},{"style":1058},[8245],{"type":999,"value":1805},{"type":993,"tag":1027,"props":8247,"children":8248},{"style":1064},[8249],{"type":999,"value":8250},"item.capitalize()",{"type":993,"tag":1027,"props":8252,"children":8253},{"style":1058},[8254],{"type":999,"value":2453},{"type":993,"tag":1027,"props":8256,"children":8257},{"style":1070},[8258],{"type":999,"value":1650},{"type":993,"tag":1027,"props":8260,"children":8261},{"style":1058},[8262],{"type":999,"value":1805},{"type":993,"tag":1027,"props":8264,"children":8265},{"style":1064},[8266],{"type":999,"value":8267},"quantity",{"type":993,"tag":1027,"props":8269,"children":8270},{"style":1058},[8271],{"type":999,"value":2453},{"type":993,"tag":1027,"props":8273,"children":8274},{"style":1070},[8275],{"type":999,"value":8276}," units",{"type":993,"tag":1027,"props":8278,"children":8279},{"style":1058},[8280],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8282,"children":8283},{"style":1070},[8284],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8286,"children":8287},{"style":1064},[8288],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8290,"children":8291},{"class":1029,"line":566},[8292],{"type":993,"tag":1027,"props":8293,"children":8294},{"style":1064},[8295],{"type":999,"value":3071},{"type":993,"tag":1027,"props":8297,"children":8298},{"class":1029,"line":575},[8299,8304,8308,8312],{"type":993,"tag":1027,"props":8300,"children":8301},{"style":1064},[8302],{"type":999,"value":8303},"        total_items ",{"type":993,"tag":1027,"props":8305,"children":8306},{"style":1084},[8307],{"type":999,"value":1284},{"type":993,"tag":1027,"props":8309,"children":8310},{"style":1058},[8311],{"type":999,"value":7512},{"type":993,"tag":1027,"props":8313,"children":8314},{"style":1064},[8315],{"type":999,"value":8316},"(inventory.values())\n",{"type":993,"tag":1027,"props":8318,"children":8319},{"class":1029,"line":584},[8320,8324,8328,8332,8336,8340,8345,8349,8354,8358,8362],{"type":993,"tag":1027,"props":8321,"children":8322},{"style":1124},[8323],{"type":999,"value":2527},{"type":993,"tag":1027,"props":8325,"children":8326},{"style":1064},[8327],{"type":999,"value":1145},{"type":993,"tag":1027,"props":8329,"children":8330},{"style":1084},[8331],{"type":999,"value":1763},{"type":993,"tag":1027,"props":8333,"children":8334},{"style":1070},[8335],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8337,"children":8338},{"style":1058},[8339],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8341,"children":8342},{"style":1070},[8343],{"type":999,"value":8344},"Total items: ",{"type":993,"tag":1027,"props":8346,"children":8347},{"style":1058},[8348],{"type":999,"value":1805},{"type":993,"tag":1027,"props":8350,"children":8351},{"style":1064},[8352],{"type":999,"value":8353},"total_items",{"type":993,"tag":1027,"props":8355,"children":8356},{"style":1058},[8357],{"type":999,"value":1825},{"type":993,"tag":1027,"props":8359,"children":8360},{"style":1070},[8361],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8363,"children":8364},{"style":1064},[8365],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8367,"children":8368},{"class":1029,"line":593},[8369],{"type":993,"tag":1027,"props":8370,"children":8371},{"style":1064},[8372],{"type":999,"value":2373},{"type":993,"tag":1027,"props":8374,"children":8375},{"class":1029,"line":602},[8376,8380,8384,8389],{"type":993,"tag":1027,"props":8377,"children":8378},{"style":1058},[8379],{"type":999,"value":1301},{"type":993,"tag":1027,"props":8381,"children":8382},{"style":1064},[8383],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8385,"children":8386},{"style":1070},[8387],{"type":999,"value":8388},"\"   📦 Inventory data written\"",{"type":993,"tag":1027,"props":8390,"children":8391},{"style":1064},[8392],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8394,"children":8395},{"class":1029,"line":611},[8396],{"type":993,"tag":1027,"props":8397,"children":8398},{"emptyLinePlaceholder":13},[8399],{"type":999,"value":1044},{"type":993,"tag":1027,"props":8401,"children":8402},{"class":1029,"line":621},[8403],{"type":993,"tag":1027,"props":8404,"children":8405},{"style":1064},[8406],{"type":999,"value":8407},"write_different_data_types()\n",{"type":993,"tag":1960,"props":8409,"children":8411},{"id":8410},"file-writing-reference",[8412],{"type":999,"value":8413},"📋 File Writing Reference",{"type":993,"tag":1002,"props":8415,"children":8416},{},[8417],{"type":999,"value":8418},"Quick reference for common file writing patterns and best practices.",{"type":993,"tag":1972,"props":8420,"children":8423},{"emoji":8421,"title":8422,"type":1976},"✍️","Writing Methods Reference",[8424,8432,8704,8712,8911,8919,9077,9085],{"type":993,"tag":1002,"props":8425,"children":8426},{},[8427],{"type":993,"tag":1982,"props":8428,"children":8429},{},[8430],{"type":999,"value":8431},"Basic Writing:",{"type":993,"tag":1017,"props":8433,"children":8435},{"className":1019,"code":8434,"language":6,"meta":8,"style":8},"# Create new file\nwith open(\"file.txt\", \"w\") as f:\n    f.write(\"content\")\n\n# Append to file\nwith open(\"file.txt\", \"a\") as f:\n    f.write(\"more content\")\n\n# Write multiple lines\nwith open(\"file.txt\", \"w\") as f:\n    lines = [\"line 1\\n\", \"line 2\\n\", \"line 3\\n\"]\n    f.writelines(lines)\n",[8436],{"type":993,"tag":1023,"props":8437,"children":8438},{"__ignoreMap":8},[8439,8447,8488,8505,8512,8520,8559,8575,8582,8590,8629,8696],{"type":993,"tag":1027,"props":8440,"children":8441},{"class":1029,"line":12},[8442],{"type":993,"tag":1027,"props":8443,"children":8444},{"style":1033},[8445],{"type":999,"value":8446},"# Create new file\n",{"type":993,"tag":1027,"props":8448,"children":8449},{"class":1029,"line":27},[8450,8454,8458,8462,8467,8471,8475,8479,8483],{"type":993,"tag":1027,"props":8451,"children":8452},{"style":1084},[8453],{"type":999,"value":1087},{"type":993,"tag":1027,"props":8455,"children":8456},{"style":1058},[8457],{"type":999,"value":1092},{"type":993,"tag":1027,"props":8459,"children":8460},{"style":1064},[8461],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8463,"children":8464},{"style":1070},[8465],{"type":999,"value":8466},"\"file.txt\"",{"type":993,"tag":1027,"props":8468,"children":8469},{"style":1064},[8470],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8472,"children":8473},{"style":1070},[8474],{"type":999,"value":1111},{"type":993,"tag":1027,"props":8476,"children":8477},{"style":1064},[8478],{"type":999,"value":1116},{"type":993,"tag":1027,"props":8480,"children":8481},{"style":1084},[8482],{"type":999,"value":1121},{"type":993,"tag":1027,"props":8484,"children":8485},{"style":1064},[8486],{"type":999,"value":8487}," f:\n",{"type":993,"tag":1027,"props":8489,"children":8490},{"class":1029,"line":36},[8491,8496,8501],{"type":993,"tag":1027,"props":8492,"children":8493},{"style":1064},[8494],{"type":999,"value":8495},"    f.write(",{"type":993,"tag":1027,"props":8497,"children":8498},{"style":1070},[8499],{"type":999,"value":8500},"\"content\"",{"type":993,"tag":1027,"props":8502,"children":8503},{"style":1064},[8504],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8506,"children":8507},{"class":1029,"line":45},[8508],{"type":993,"tag":1027,"props":8509,"children":8510},{"emptyLinePlaceholder":13},[8511],{"type":999,"value":1044},{"type":993,"tag":1027,"props":8513,"children":8514},{"class":1029,"line":54},[8515],{"type":993,"tag":1027,"props":8516,"children":8517},{"style":1033},[8518],{"type":999,"value":8519},"# Append to file\n",{"type":993,"tag":1027,"props":8521,"children":8522},{"class":1029,"line":63},[8523,8527,8531,8535,8539,8543,8547,8551,8555],{"type":993,"tag":1027,"props":8524,"children":8525},{"style":1084},[8526],{"type":999,"value":1087},{"type":993,"tag":1027,"props":8528,"children":8529},{"style":1058},[8530],{"type":999,"value":1092},{"type":993,"tag":1027,"props":8532,"children":8533},{"style":1064},[8534],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8536,"children":8537},{"style":1070},[8538],{"type":999,"value":8466},{"type":993,"tag":1027,"props":8540,"children":8541},{"style":1064},[8542],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8544,"children":8545},{"style":1070},[8546],{"type":999,"value":1397},{"type":993,"tag":1027,"props":8548,"children":8549},{"style":1064},[8550],{"type":999,"value":1116},{"type":993,"tag":1027,"props":8552,"children":8553},{"style":1084},[8554],{"type":999,"value":1121},{"type":993,"tag":1027,"props":8556,"children":8557},{"style":1064},[8558],{"type":999,"value":8487},{"type":993,"tag":1027,"props":8560,"children":8561},{"class":1029,"line":72},[8562,8566,8571],{"type":993,"tag":1027,"props":8563,"children":8564},{"style":1064},[8565],{"type":999,"value":8495},{"type":993,"tag":1027,"props":8567,"children":8568},{"style":1070},[8569],{"type":999,"value":8570},"\"more content\"",{"type":993,"tag":1027,"props":8572,"children":8573},{"style":1064},[8574],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8576,"children":8577},{"class":1029,"line":81},[8578],{"type":993,"tag":1027,"props":8579,"children":8580},{"emptyLinePlaceholder":13},[8581],{"type":999,"value":1044},{"type":993,"tag":1027,"props":8583,"children":8584},{"class":1029,"line":91},[8585],{"type":993,"tag":1027,"props":8586,"children":8587},{"style":1033},[8588],{"type":999,"value":8589},"# Write multiple lines\n",{"type":993,"tag":1027,"props":8591,"children":8592},{"class":1029,"line":100},[8593,8597,8601,8605,8609,8613,8617,8621,8625],{"type":993,"tag":1027,"props":8594,"children":8595},{"style":1084},[8596],{"type":999,"value":1087},{"type":993,"tag":1027,"props":8598,"children":8599},{"style":1058},[8600],{"type":999,"value":1092},{"type":993,"tag":1027,"props":8602,"children":8603},{"style":1064},[8604],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8606,"children":8607},{"style":1070},[8608],{"type":999,"value":8466},{"type":993,"tag":1027,"props":8610,"children":8611},{"style":1064},[8612],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8614,"children":8615},{"style":1070},[8616],{"type":999,"value":1111},{"type":993,"tag":1027,"props":8618,"children":8619},{"style":1064},[8620],{"type":999,"value":1116},{"type":993,"tag":1027,"props":8622,"children":8623},{"style":1084},[8624],{"type":999,"value":1121},{"type":993,"tag":1027,"props":8626,"children":8627},{"style":1064},[8628],{"type":999,"value":8487},{"type":993,"tag":1027,"props":8630,"children":8631},{"class":1029,"line":109},[8632,8637,8641,8645,8650,8654,8658,8662,8667,8671,8675,8679,8684,8688,8692],{"type":993,"tag":1027,"props":8633,"children":8634},{"style":1064},[8635],{"type":999,"value":8636},"    lines ",{"type":993,"tag":1027,"props":8638,"children":8639},{"style":1084},[8640],{"type":999,"value":1284},{"type":993,"tag":1027,"props":8642,"children":8643},{"style":1064},[8644],{"type":999,"value":3276},{"type":993,"tag":1027,"props":8646,"children":8647},{"style":1070},[8648],{"type":999,"value":8649},"\"line 1",{"type":993,"tag":1027,"props":8651,"children":8652},{"style":1058},[8653],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8655,"children":8656},{"style":1070},[8657],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8659,"children":8660},{"style":1064},[8661],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8663,"children":8664},{"style":1070},[8665],{"type":999,"value":8666},"\"line 2",{"type":993,"tag":1027,"props":8668,"children":8669},{"style":1058},[8670],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8672,"children":8673},{"style":1070},[8674],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8676,"children":8677},{"style":1064},[8678],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8680,"children":8681},{"style":1070},[8682],{"type":999,"value":8683},"\"line 3",{"type":993,"tag":1027,"props":8685,"children":8686},{"style":1058},[8687],{"type":999,"value":1155},{"type":993,"tag":1027,"props":8689,"children":8690},{"style":1070},[8691],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8693,"children":8694},{"style":1064},[8695],{"type":999,"value":3301},{"type":993,"tag":1027,"props":8697,"children":8698},{"class":1029,"line":118},[8699],{"type":993,"tag":1027,"props":8700,"children":8701},{"style":1064},[8702],{"type":999,"value":8703},"    f.writelines(lines)\n",{"type":993,"tag":1002,"props":8705,"children":8706},{},[8707],{"type":993,"tag":1982,"props":8708,"children":8709},{},[8710],{"type":999,"value":8711},"Safe Writing Pattern:",{"type":993,"tag":1017,"props":8713,"children":8715},{"className":1019,"code":8714,"language":6,"meta":8,"style":8},"# With error handling\ntry:\n    with open(\"file.txt\", \"w\") as f:\n        f.write(\"important data\")\n    print(\"File written successfully\")\nexcept PermissionError:\n    print(\"Permission denied\")\nexcept Exception as e:\n    print(f\"Error: {e}\")\n",[8716],{"type":993,"tag":1023,"props":8717,"children":8718},{"__ignoreMap":8},[8719,8727,8739,8778,8795,8815,8832,8852,8871],{"type":993,"tag":1027,"props":8720,"children":8721},{"class":1029,"line":12},[8722],{"type":993,"tag":1027,"props":8723,"children":8724},{"style":1033},[8725],{"type":999,"value":8726},"# With error handling\n",{"type":993,"tag":1027,"props":8728,"children":8729},{"class":1029,"line":27},[8730,8735],{"type":993,"tag":1027,"props":8731,"children":8732},{"style":1084},[8733],{"type":999,"value":8734},"try",{"type":993,"tag":1027,"props":8736,"children":8737},{"style":1064},[8738],{"type":999,"value":1132},{"type":993,"tag":1027,"props":8740,"children":8741},{"class":1029,"line":36},[8742,8746,8750,8754,8758,8762,8766,8770,8774],{"type":993,"tag":1027,"props":8743,"children":8744},{"style":1084},[8745],{"type":999,"value":2482},{"type":993,"tag":1027,"props":8747,"children":8748},{"style":1058},[8749],{"type":999,"value":1092},{"type":993,"tag":1027,"props":8751,"children":8752},{"style":1064},[8753],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8755,"children":8756},{"style":1070},[8757],{"type":999,"value":8466},{"type":993,"tag":1027,"props":8759,"children":8760},{"style":1064},[8761],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8763,"children":8764},{"style":1070},[8765],{"type":999,"value":1111},{"type":993,"tag":1027,"props":8767,"children":8768},{"style":1064},[8769],{"type":999,"value":1116},{"type":993,"tag":1027,"props":8771,"children":8772},{"style":1084},[8773],{"type":999,"value":1121},{"type":993,"tag":1027,"props":8775,"children":8776},{"style":1064},[8777],{"type":999,"value":8487},{"type":993,"tag":1027,"props":8779,"children":8780},{"class":1029,"line":45},[8781,8786,8791],{"type":993,"tag":1027,"props":8782,"children":8783},{"style":1064},[8784],{"type":999,"value":8785},"        f.write(",{"type":993,"tag":1027,"props":8787,"children":8788},{"style":1070},[8789],{"type":999,"value":8790},"\"important data\"",{"type":993,"tag":1027,"props":8792,"children":8793},{"style":1064},[8794],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8796,"children":8797},{"class":1029,"line":54},[8798,8802,8806,8811],{"type":993,"tag":1027,"props":8799,"children":8800},{"style":1058},[8801],{"type":999,"value":1301},{"type":993,"tag":1027,"props":8803,"children":8804},{"style":1064},[8805],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8807,"children":8808},{"style":1070},[8809],{"type":999,"value":8810},"\"File written successfully\"",{"type":993,"tag":1027,"props":8812,"children":8813},{"style":1064},[8814],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8816,"children":8817},{"class":1029,"line":63},[8818,8823,8828],{"type":993,"tag":1027,"props":8819,"children":8820},{"style":1084},[8821],{"type":999,"value":8822},"except",{"type":993,"tag":1027,"props":8824,"children":8825},{"style":1058},[8826],{"type":999,"value":8827}," PermissionError",{"type":993,"tag":1027,"props":8829,"children":8830},{"style":1064},[8831],{"type":999,"value":1132},{"type":993,"tag":1027,"props":8833,"children":8834},{"class":1029,"line":72},[8835,8839,8843,8848],{"type":993,"tag":1027,"props":8836,"children":8837},{"style":1058},[8838],{"type":999,"value":1301},{"type":993,"tag":1027,"props":8840,"children":8841},{"style":1064},[8842],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8844,"children":8845},{"style":1070},[8846],{"type":999,"value":8847},"\"Permission denied\"",{"type":993,"tag":1027,"props":8849,"children":8850},{"style":1064},[8851],{"type":999,"value":1078},{"type":993,"tag":1027,"props":8853,"children":8854},{"class":1029,"line":81},[8855,8859,8863,8867],{"type":993,"tag":1027,"props":8856,"children":8857},{"style":1084},[8858],{"type":999,"value":8822},{"type":993,"tag":1027,"props":8860,"children":8861},{"style":1058},[8862],{"type":999,"value":5759},{"type":993,"tag":1027,"props":8864,"children":8865},{"style":1084},[8866],{"type":999,"value":5764},{"type":993,"tag":1027,"props":8868,"children":8869},{"style":1064},[8870],{"type":999,"value":5769},{"type":993,"tag":1027,"props":8872,"children":8873},{"class":1029,"line":91},[8874,8878,8882,8886,8891,8895,8899,8903,8907],{"type":993,"tag":1027,"props":8875,"children":8876},{"style":1058},[8877],{"type":999,"value":1301},{"type":993,"tag":1027,"props":8879,"children":8880},{"style":1064},[8881],{"type":999,"value":1067},{"type":993,"tag":1027,"props":8883,"children":8884},{"style":1084},[8885],{"type":999,"value":1763},{"type":993,"tag":1027,"props":8887,"children":8888},{"style":1070},[8889],{"type":999,"value":8890},"\"Error: ",{"type":993,"tag":1027,"props":8892,"children":8893},{"style":1058},[8894],{"type":999,"value":1805},{"type":993,"tag":1027,"props":8896,"children":8897},{"style":1064},[8898],{"type":999,"value":5806},{"type":993,"tag":1027,"props":8900,"children":8901},{"style":1058},[8902],{"type":999,"value":2453},{"type":993,"tag":1027,"props":8904,"children":8905},{"style":1070},[8906],{"type":999,"value":1160},{"type":993,"tag":1027,"props":8908,"children":8909},{"style":1064},[8910],{"type":999,"value":1078},{"type":993,"tag":1002,"props":8912,"children":8913},{},[8914],{"type":993,"tag":1982,"props":8915,"children":8916},{},[8917],{"type":999,"value":8918},"JSON Writing:",{"type":993,"tag":1017,"props":8920,"children":8922},{"className":1019,"code":8921,"language":6,"meta":8,"style":8},"import json\n\ndata = {\"key\": \"value\", \"numbers\": [1, 2, 3]}\nwith open(\"data.json\", \"w\") as f:\n    json.dump(data, f, indent=2)\n",[8923],{"type":993,"tag":1023,"props":8924,"children":8925},{"__ignoreMap":8},[8926,8937,8944,9013,9053],{"type":993,"tag":1027,"props":8927,"children":8928},{"class":1029,"line":12},[8929,8933],{"type":993,"tag":1027,"props":8930,"children":8931},{"style":1084},[8932],{"type":999,"value":2299},{"type":993,"tag":1027,"props":8934,"children":8935},{"style":1064},[8936],{"type":999,"value":4624},{"type":993,"tag":1027,"props":8938,"children":8939},{"class":1029,"line":27},[8940],{"type":993,"tag":1027,"props":8941,"children":8942},{"emptyLinePlaceholder":13},[8943],{"type":999,"value":1044},{"type":993,"tag":1027,"props":8945,"children":8946},{"class":1029,"line":36},[8947,8952,8956,8960,8965,8969,8974,8978,8983,8987,8991,8995,8999,9003,9008],{"type":993,"tag":1027,"props":8948,"children":8949},{"style":1064},[8950],{"type":999,"value":8951},"data ",{"type":993,"tag":1027,"props":8953,"children":8954},{"style":1084},[8955],{"type":999,"value":1284},{"type":993,"tag":1027,"props":8957,"children":8958},{"style":1064},[8959],{"type":999,"value":1640},{"type":993,"tag":1027,"props":8961,"children":8962},{"style":1070},[8963],{"type":999,"value":8964},"\"key\"",{"type":993,"tag":1027,"props":8966,"children":8967},{"style":1064},[8968],{"type":999,"value":1650},{"type":993,"tag":1027,"props":8970,"children":8971},{"style":1070},[8972],{"type":999,"value":8973},"\"value\"",{"type":993,"tag":1027,"props":8975,"children":8976},{"style":1064},[8977],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8979,"children":8980},{"style":1070},[8981],{"type":999,"value":8982},"\"numbers\"",{"type":993,"tag":1027,"props":8984,"children":8985},{"style":1064},[8986],{"type":999,"value":4704},{"type":993,"tag":1027,"props":8988,"children":8989},{"style":1058},[8990],{"type":999,"value":5525},{"type":993,"tag":1027,"props":8992,"children":8993},{"style":1064},[8994],{"type":999,"value":1106},{"type":993,"tag":1027,"props":8996,"children":8997},{"style":1058},[8998],{"type":999,"value":4877},{"type":993,"tag":1027,"props":9000,"children":9001},{"style":1064},[9002],{"type":999,"value":1106},{"type":993,"tag":1027,"props":9004,"children":9005},{"style":1058},[9006],{"type":999,"value":9007},"3",{"type":993,"tag":1027,"props":9009,"children":9010},{"style":1064},[9011],{"type":999,"value":9012},"]}\n",{"type":993,"tag":1027,"props":9014,"children":9015},{"class":1029,"line":45},[9016,9020,9024,9028,9033,9037,9041,9045,9049],{"type":993,"tag":1027,"props":9017,"children":9018},{"style":1084},[9019],{"type":999,"value":1087},{"type":993,"tag":1027,"props":9021,"children":9022},{"style":1058},[9023],{"type":999,"value":1092},{"type":993,"tag":1027,"props":9025,"children":9026},{"style":1064},[9027],{"type":999,"value":1067},{"type":993,"tag":1027,"props":9029,"children":9030},{"style":1070},[9031],{"type":999,"value":9032},"\"data.json\"",{"type":993,"tag":1027,"props":9034,"children":9035},{"style":1064},[9036],{"type":999,"value":1106},{"type":993,"tag":1027,"props":9038,"children":9039},{"style":1070},[9040],{"type":999,"value":1111},{"type":993,"tag":1027,"props":9042,"children":9043},{"style":1064},[9044],{"type":999,"value":1116},{"type":993,"tag":1027,"props":9046,"children":9047},{"style":1084},[9048],{"type":999,"value":1121},{"type":993,"tag":1027,"props":9050,"children":9051},{"style":1064},[9052],{"type":999,"value":8487},{"type":993,"tag":1027,"props":9054,"children":9055},{"class":1029,"line":54},[9056,9061,9065,9069,9073],{"type":993,"tag":1027,"props":9057,"children":9058},{"style":1064},[9059],{"type":999,"value":9060},"    json.dump(data, f, ",{"type":993,"tag":1027,"props":9062,"children":9063},{"style":1124},[9064],{"type":999,"value":4868},{"type":993,"tag":1027,"props":9066,"children":9067},{"style":1084},[9068],{"type":999,"value":1284},{"type":993,"tag":1027,"props":9070,"children":9071},{"style":1058},[9072],{"type":999,"value":4877},{"type":993,"tag":1027,"props":9074,"children":9075},{"style":1064},[9076],{"type":999,"value":1078},{"type":993,"tag":1002,"props":9078,"children":9079},{},[9080],{"type":993,"tag":1982,"props":9081,"children":9082},{},[9083],{"type":999,"value":9084},"CSV Writing:",{"type":993,"tag":1017,"props":9086,"children":9088},{"className":1019,"code":9087,"language":6,"meta":8,"style":8},"# Manual CSV\nwith open(\"data.csv\", \"w\") as f:\n    f.write(\"Name,Age,City\\n\")\n    f.write(\"Alice,25,New York\\n\")\n    f.write(\"Bob,30,London\\n\")\n",[9089],{"type":993,"tag":1023,"props":9090,"children":9091},{"__ignoreMap":8},[9092,9100,9140,9164,9188],{"type":993,"tag":1027,"props":9093,"children":9094},{"class":1029,"line":12},[9095],{"type":993,"tag":1027,"props":9096,"children":9097},{"style":1033},[9098],{"type":999,"value":9099},"# Manual CSV\n",{"type":993,"tag":1027,"props":9101,"children":9102},{"class":1029,"line":27},[9103,9107,9111,9115,9120,9124,9128,9132,9136],{"type":993,"tag":1027,"props":9104,"children":9105},{"style":1084},[9106],{"type":999,"value":1087},{"type":993,"tag":1027,"props":9108,"children":9109},{"style":1058},[9110],{"type":999,"value":1092},{"type":993,"tag":1027,"props":9112,"children":9113},{"style":1064},[9114],{"type":999,"value":1067},{"type":993,"tag":1027,"props":9116,"children":9117},{"style":1070},[9118],{"type":999,"value":9119},"\"data.csv\"",{"type":993,"tag":1027,"props":9121,"children":9122},{"style":1064},[9123],{"type":999,"value":1106},{"type":993,"tag":1027,"props":9125,"children":9126},{"style":1070},[9127],{"type":999,"value":1111},{"type":993,"tag":1027,"props":9129,"children":9130},{"style":1064},[9131],{"type":999,"value":1116},{"type":993,"tag":1027,"props":9133,"children":9134},{"style":1084},[9135],{"type":999,"value":1121},{"type":993,"tag":1027,"props":9137,"children":9138},{"style":1064},[9139],{"type":999,"value":8487},{"type":993,"tag":1027,"props":9141,"children":9142},{"class":1029,"line":36},[9143,9147,9152,9156,9160],{"type":993,"tag":1027,"props":9144,"children":9145},{"style":1064},[9146],{"type":999,"value":8495},{"type":993,"tag":1027,"props":9148,"children":9149},{"style":1070},[9150],{"type":999,"value":9151},"\"Name,Age,City",{"type":993,"tag":1027,"props":9153,"children":9154},{"style":1058},[9155],{"type":999,"value":1155},{"type":993,"tag":1027,"props":9157,"children":9158},{"style":1070},[9159],{"type":999,"value":1160},{"type":993,"tag":1027,"props":9161,"children":9162},{"style":1064},[9163],{"type":999,"value":1078},{"type":993,"tag":1027,"props":9165,"children":9166},{"class":1029,"line":45},[9167,9171,9176,9180,9184],{"type":993,"tag":1027,"props":9168,"children":9169},{"style":1064},[9170],{"type":999,"value":8495},{"type":993,"tag":1027,"props":9172,"children":9173},{"style":1070},[9174],{"type":999,"value":9175},"\"Alice,25,New York",{"type":993,"tag":1027,"props":9177,"children":9178},{"style":1058},[9179],{"type":999,"value":1155},{"type":993,"tag":1027,"props":9181,"children":9182},{"style":1070},[9183],{"type":999,"value":1160},{"type":993,"tag":1027,"props":9185,"children":9186},{"style":1064},[9187],{"type":999,"value":1078},{"type":993,"tag":1027,"props":9189,"children":9190},{"class":1029,"line":54},[9191,9195,9200,9204,9208],{"type":993,"tag":1027,"props":9192,"children":9193},{"style":1064},[9194],{"type":999,"value":8495},{"type":993,"tag":1027,"props":9196,"children":9197},{"style":1070},[9198],{"type":999,"value":9199},"\"Bob,30,London",{"type":993,"tag":1027,"props":9201,"children":9202},{"style":1058},[9203],{"type":999,"value":1155},{"type":993,"tag":1027,"props":9205,"children":9206},{"style":1070},[9207],{"type":999,"value":1160},{"type":993,"tag":1027,"props":9209,"children":9210},{"style":1064},[9211],{"type":999,"value":1078},{"type":993,"tag":1960,"props":9213,"children":9215},{"id":9214},"essential-file-writing-methods",[9216],{"type":999,"value":9217},"Essential File Writing Methods",{"type":993,"tag":1002,"props":9219,"children":9220},{},[9221],{"type":999,"value":9222},"Understanding core file writing methods enables effective data saving and proper file creation in Python applications.",{"type":993,"tag":9224,"props":9225,"children":9226},"table",{},[9227,9256],{"type":993,"tag":9228,"props":9229,"children":9230},"thead",{},[9231],{"type":993,"tag":9232,"props":9233,"children":9234},"tr",{},[9235,9241,9246,9251],{"type":993,"tag":9236,"props":9237,"children":9238},"th",{},[9239],{"type":999,"value":9240},"Method",{"type":993,"tag":9236,"props":9242,"children":9243},{},[9244],{"type":999,"value":9245},"Purpose",{"type":993,"tag":9236,"props":9247,"children":9248},{},[9249],{"type":999,"value":9250},"Example",{"type":993,"tag":9236,"props":9252,"children":9253},{},[9254],{"type":999,"value":9255},"Best Practice",{"type":993,"tag":9257,"props":9258,"children":9259},"tbody",{},[9260,9292,9323,9353,9384,9415,9446,9477],{"type":993,"tag":9232,"props":9261,"children":9262},{},[9263,9273,9278,9287],{"type":993,"tag":9264,"props":9265,"children":9266},"td",{},[9267],{"type":993,"tag":1023,"props":9268,"children":9270},{"className":9269},[],[9271],{"type":999,"value":9272},"file.write(text)",{"type":993,"tag":9264,"props":9274,"children":9275},{},[9276],{"type":999,"value":9277},"Write text to file",{"type":993,"tag":9264,"props":9279,"children":9280},{},[9281],{"type":993,"tag":1023,"props":9282,"children":9284},{"className":9283},[],[9285],{"type":999,"value":9286},"file.write(\"Hello\")",{"type":993,"tag":9264,"props":9288,"children":9289},{},[9290],{"type":999,"value":9291},"Returns number of characters written",{"type":993,"tag":9232,"props":9293,"children":9294},{},[9295,9304,9309,9318],{"type":993,"tag":9264,"props":9296,"children":9297},{},[9298],{"type":993,"tag":1023,"props":9299,"children":9301},{"className":9300},[],[9302],{"type":999,"value":9303},"file.writelines(list)",{"type":993,"tag":9264,"props":9305,"children":9306},{},[9307],{"type":999,"value":9308},"Write list of strings",{"type":993,"tag":9264,"props":9310,"children":9311},{},[9312],{"type":993,"tag":1023,"props":9313,"children":9315},{"className":9314},[],[9316],{"type":999,"value":9317},"file.writelines(lines)",{"type":993,"tag":9264,"props":9319,"children":9320},{},[9321],{"type":999,"value":9322},"Add newlines manually if needed",{"type":993,"tag":9232,"props":9324,"children":9325},{},[9326,9335,9340,9348],{"type":993,"tag":9264,"props":9327,"children":9328},{},[9329],{"type":993,"tag":1023,"props":9330,"children":9332},{"className":9331},[],[9333],{"type":999,"value":9334},"file.flush()",{"type":993,"tag":9264,"props":9336,"children":9337},{},[9338],{"type":999,"value":9339},"Force write to disk",{"type":993,"tag":9264,"props":9341,"children":9342},{},[9343],{"type":993,"tag":1023,"props":9344,"children":9346},{"className":9345},[],[9347],{"type":999,"value":9334},{"type":993,"tag":9264,"props":9349,"children":9350},{},[9351],{"type":999,"value":9352},"Ensure data is saved immediately",{"type":993,"tag":9232,"props":9354,"children":9355},{},[9356,9365,9370,9379],{"type":993,"tag":9264,"props":9357,"children":9358},{},[9359],{"type":993,"tag":1023,"props":9360,"children":9362},{"className":9361},[],[9363],{"type":999,"value":9364},"file.writable()",{"type":993,"tag":9264,"props":9366,"children":9367},{},[9368],{"type":999,"value":9369},"Check if file is writable",{"type":993,"tag":9264,"props":9371,"children":9372},{},[9373],{"type":993,"tag":1023,"props":9374,"children":9376},{"className":9375},[],[9377],{"type":999,"value":9378},"can_write = file.writable()",{"type":993,"tag":9264,"props":9380,"children":9381},{},[9382],{"type":999,"value":9383},"Verify before writing",{"type":993,"tag":9232,"props":9385,"children":9386},{},[9387,9396,9401,9410],{"type":993,"tag":9264,"props":9388,"children":9389},{},[9390],{"type":993,"tag":1023,"props":9391,"children":9393},{"className":9392},[],[9394],{"type":999,"value":9395},"file.seek(position)",{"type":993,"tag":9264,"props":9397,"children":9398},{},[9399],{"type":999,"value":9400},"Move to position in file",{"type":993,"tag":9264,"props":9402,"children":9403},{},[9404],{"type":993,"tag":1023,"props":9405,"children":9407},{"className":9406},[],[9408],{"type":999,"value":9409},"file.seek(0)",{"type":993,"tag":9264,"props":9411,"children":9412},{},[9413],{"type":999,"value":9414},"Position for overwriting",{"type":993,"tag":9232,"props":9416,"children":9417},{},[9418,9427,9432,9441],{"type":993,"tag":9264,"props":9419,"children":9420},{},[9421],{"type":993,"tag":1023,"props":9422,"children":9424},{"className":9423},[],[9425],{"type":999,"value":9426},"file.tell()",{"type":993,"tag":9264,"props":9428,"children":9429},{},[9430],{"type":999,"value":9431},"Get current position",{"type":993,"tag":9264,"props":9433,"children":9434},{},[9435],{"type":993,"tag":1023,"props":9436,"children":9438},{"className":9437},[],[9439],{"type":999,"value":9440},"pos = file.tell()",{"type":993,"tag":9264,"props":9442,"children":9443},{},[9444],{"type":999,"value":9445},"Track write position",{"type":993,"tag":9232,"props":9447,"children":9448},{},[9449,9458,9463,9472],{"type":993,"tag":9264,"props":9450,"children":9451},{},[9452],{"type":993,"tag":1023,"props":9453,"children":9455},{"className":9454},[],[9456],{"type":999,"value":9457},"file.truncate(size)",{"type":993,"tag":9264,"props":9459,"children":9460},{},[9461],{"type":999,"value":9462},"Resize file",{"type":993,"tag":9264,"props":9464,"children":9465},{},[9466],{"type":993,"tag":1023,"props":9467,"children":9469},{"className":9468},[],[9470],{"type":999,"value":9471},"file.truncate()",{"type":993,"tag":9264,"props":9473,"children":9474},{},[9475],{"type":999,"value":9476},"Remove content after position",{"type":993,"tag":9232,"props":9478,"children":9479},{},[9480,9489,9494,9503],{"type":993,"tag":9264,"props":9481,"children":9482},{},[9483],{"type":993,"tag":1023,"props":9484,"children":9486},{"className":9485},[],[9487],{"type":999,"value":9488},"print(..., file=f)",{"type":993,"tag":9264,"props":9490,"children":9491},{},[9492],{"type":999,"value":9493},"Print to file",{"type":993,"tag":9264,"props":9495,"children":9496},{},[9497],{"type":993,"tag":1023,"props":9498,"children":9500},{"className":9499},[],[9501],{"type":999,"value":9502},"print(\"text\", file=f)",{"type":993,"tag":9264,"props":9504,"children":9505},{},[9506],{"type":999,"value":9507},"Convenient for formatted output",{"type":993,"tag":1002,"props":9509,"children":9510},{},[9511],{"type":999,"value":9512},"Writing files effectively gives your Python programs the ability to save information permanently. Whether you're creating configuration files, generating reports, or logging activities, these techniques will help you handle file writing safely and efficiently.",{"type":993,"tag":9514,"props":9515,"children":9517},"content-exercise",{":widget-view":9516,"category":6,"id":839},"true",[],{"type":993,"tag":1960,"props":9519,"children":9521},{"id":9520},"test-your-knowledge",[9522],{"type":999,"value":9523},"Test Your Knowledge",{"type":993,"tag":1002,"props":9525,"children":9526},{},[9527],{"type":999,"value":9528},"Test your understanding of file writing techniques:",{"type":993,"tag":9530,"props":9531,"children":9535},"redirect-button",{"icon":9532,"label":9533,"url":9534},"pi pi-send","Take Quiz","/tutorial-quiz/python/writing-files",[],{"type":993,"tag":1960,"props":9537,"children":9539},{"id":9538},"whats-next",[9540],{"type":999,"value":9541},"What's Next?",{"type":993,"tag":1002,"props":9543,"children":9544},{},[9545],{"type":999,"value":9546},"Now that you understand how to write files effectively, you're ready to learn about file management. Discover how to organize files, check properties, and maintain your file system efficiently.",{"type":993,"tag":1002,"props":9548,"children":9549},{},[9550,9552,9557],{"type":999,"value":9551},"Ready to continue? Check out our lesson on ",{"type":993,"tag":9553,"props":9554,"children":9555},"a",{"href":845},[9556],{"type":999,"value":846},{"type":999,"value":9558},".",{"type":993,"tag":9560,"props":9561,"children":9562},"style",{},[9563],{"type":999,"value":9564},"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":9566},[9567,9572,9575,9576,9577,9578,9579],{"id":1962,"depth":27,"text":1965,"children":9568},[9569,9570,9571],{"id":2263,"depth":36,"text":2266},{"id":3466,"depth":36,"text":3469},{"id":4926,"depth":36,"text":4929},{"id":5836,"depth":27,"text":5839,"children":9573},[9574],{"id":6024,"depth":36,"text":6027},{"id":6906,"depth":27,"text":6909},{"id":8410,"depth":27,"text":8413},{"id":9214,"depth":27,"text":9217},{"id":9520,"depth":27,"text":9523},{"id":9538,"depth":27,"text":9541},1782373750912]