[{"data":1,"prerenderedAt":7975},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/reading-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",[826],{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"body":989,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},{"type":990,"children":991,"toc":7960},"root",[992,1000,1006,1011,1802,1809,1814,2022,2029,2034,3105,3111,3116,4032,4038,4043,5268,5274,5279,6141,6147,6152,6255,6261,7016,7022,7027,7608,7614,7619,7903,7908,7913,7919,7924,7931,7937,7942,7954],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":830},[997],{"type":998,"value":999},"text","📖 Reading Files",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Reading files in Python is like opening a book and extracting information from it. You can read the whole book at once, go through it page by page, or look for specific information. Understanding different reading techniques helps you work with files efficiently, whether they're small text files or large data sets.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Think of file reading as your program's way to learn from existing information - configuration files, user data, logs, or any text-based content.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# 🎯 File Reading Demo\n\n# Create a sample file first\nsample_text = \"\"\"Welcome to Python file reading!\nThis file contains multiple lines.\nEach line shows different concepts.\nReading files is essential for data processing.\nLine 5: The end of our sample.\"\"\"\n\n# Save sample content\nwith open(\"sample.txt\", \"w\") as file:\n    file.write(sample_text)\n\n# Method 1: Read entire file\nprint(\"📄 Reading entire file:\")\nwith open(\"sample.txt\", \"r\") as file:\n    content = file.read()\n    print(content)\n    print(f\"Total characters: {len(content)}\")\n\n# Method 2: Read line by line (memory efficient)\nprint(\"\\n📝 Reading line by line:\")\nwith open(\"sample.txt\", \"r\") as file:\n    for line_number, line in enumerate(file, 1):\n        print(f\"Line {line_number}: {line.strip()}\")\n\n# Method 3: Read all lines into a list\nprint(\"\\n📋 Reading all lines:\")\nwith open(\"sample.txt\", \"r\") as file:\n    lines = file.readlines()\n    print(f\"File has {len(lines)} lines\")\n    for i, line in enumerate(lines):\n        word_count = len(line.strip().split())\n        print(f\"Line {i+1}: {word_count} words\")\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1044,1052,1073,1081,1089,1097,1105,1112,1120,1175,1188,1195,1203,1225,1269,1290,1303,1348,1355,1363,1392,1435,1481,1542,1549,1557,1585,1628,1649,1691,1716,1738],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# 🎯 File Reading Demo\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039],{"type":993,"tag":1026,"props":1040,"children":1041},{"emptyLinePlaceholder":13},[1042],{"type":998,"value":1043},"\n",{"type":993,"tag":1026,"props":1045,"children":1046},{"class":1028,"line":36},[1047],{"type":993,"tag":1026,"props":1048,"children":1049},{"style":1032},[1050],{"type":998,"value":1051},"# Create a sample file first\n",{"type":993,"tag":1026,"props":1053,"children":1054},{"class":1028,"line":45},[1055,1061,1067],{"type":993,"tag":1026,"props":1056,"children":1058},{"style":1057},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1059],{"type":998,"value":1060},"sample_text ",{"type":993,"tag":1026,"props":1062,"children":1064},{"style":1063},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1065],{"type":998,"value":1066},"=",{"type":993,"tag":1026,"props":1068,"children":1070},{"style":1069},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1071],{"type":998,"value":1072}," \"\"\"Welcome to Python file reading!\n",{"type":993,"tag":1026,"props":1074,"children":1075},{"class":1028,"line":54},[1076],{"type":993,"tag":1026,"props":1077,"children":1078},{"style":1069},[1079],{"type":998,"value":1080},"This file contains multiple lines.\n",{"type":993,"tag":1026,"props":1082,"children":1083},{"class":1028,"line":63},[1084],{"type":993,"tag":1026,"props":1085,"children":1086},{"style":1069},[1087],{"type":998,"value":1088},"Each line shows different concepts.\n",{"type":993,"tag":1026,"props":1090,"children":1091},{"class":1028,"line":72},[1092],{"type":993,"tag":1026,"props":1093,"children":1094},{"style":1069},[1095],{"type":998,"value":1096},"Reading files is essential for data processing.\n",{"type":993,"tag":1026,"props":1098,"children":1099},{"class":1028,"line":81},[1100],{"type":993,"tag":1026,"props":1101,"children":1102},{"style":1069},[1103],{"type":998,"value":1104},"Line 5: The end of our sample.\"\"\"\n",{"type":993,"tag":1026,"props":1106,"children":1107},{"class":1028,"line":91},[1108],{"type":993,"tag":1026,"props":1109,"children":1110},{"emptyLinePlaceholder":13},[1111],{"type":998,"value":1043},{"type":993,"tag":1026,"props":1113,"children":1114},{"class":1028,"line":100},[1115],{"type":993,"tag":1026,"props":1116,"children":1117},{"style":1032},[1118],{"type":998,"value":1119},"# Save sample content\n",{"type":993,"tag":1026,"props":1121,"children":1122},{"class":1028,"line":109},[1123,1128,1134,1139,1144,1149,1154,1159,1164,1170],{"type":993,"tag":1026,"props":1124,"children":1125},{"style":1063},[1126],{"type":998,"value":1127},"with",{"type":993,"tag":1026,"props":1129,"children":1131},{"style":1130},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1132],{"type":998,"value":1133}," open",{"type":993,"tag":1026,"props":1135,"children":1136},{"style":1057},[1137],{"type":998,"value":1138},"(",{"type":993,"tag":1026,"props":1140,"children":1141},{"style":1069},[1142],{"type":998,"value":1143},"\"sample.txt\"",{"type":993,"tag":1026,"props":1145,"children":1146},{"style":1057},[1147],{"type":998,"value":1148},", ",{"type":993,"tag":1026,"props":1150,"children":1151},{"style":1069},[1152],{"type":998,"value":1153},"\"w\"",{"type":993,"tag":1026,"props":1155,"children":1156},{"style":1057},[1157],{"type":998,"value":1158},") ",{"type":993,"tag":1026,"props":1160,"children":1161},{"style":1063},[1162],{"type":998,"value":1163},"as",{"type":993,"tag":1026,"props":1165,"children":1167},{"style":1166},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1168],{"type":998,"value":1169}," file",{"type":993,"tag":1026,"props":1171,"children":1172},{"style":1057},[1173],{"type":998,"value":1174},":\n",{"type":993,"tag":1026,"props":1176,"children":1177},{"class":1028,"line":118},[1178,1183],{"type":993,"tag":1026,"props":1179,"children":1180},{"style":1166},[1181],{"type":998,"value":1182},"    file",{"type":993,"tag":1026,"props":1184,"children":1185},{"style":1057},[1186],{"type":998,"value":1187},".write(sample_text)\n",{"type":993,"tag":1026,"props":1189,"children":1190},{"class":1028,"line":127},[1191],{"type":993,"tag":1026,"props":1192,"children":1193},{"emptyLinePlaceholder":13},[1194],{"type":998,"value":1043},{"type":993,"tag":1026,"props":1196,"children":1197},{"class":1028,"line":136},[1198],{"type":993,"tag":1026,"props":1199,"children":1200},{"style":1032},[1201],{"type":998,"value":1202},"# Method 1: Read entire file\n",{"type":993,"tag":1026,"props":1204,"children":1205},{"class":1028,"line":146},[1206,1211,1215,1220],{"type":993,"tag":1026,"props":1207,"children":1208},{"style":1130},[1209],{"type":998,"value":1210},"print",{"type":993,"tag":1026,"props":1212,"children":1213},{"style":1057},[1214],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1216,"children":1217},{"style":1069},[1218],{"type":998,"value":1219},"\"📄 Reading entire file:\"",{"type":993,"tag":1026,"props":1221,"children":1222},{"style":1057},[1223],{"type":998,"value":1224},")\n",{"type":993,"tag":1026,"props":1226,"children":1227},{"class":1028,"line":155},[1228,1232,1236,1240,1244,1248,1253,1257,1261,1265],{"type":993,"tag":1026,"props":1229,"children":1230},{"style":1063},[1231],{"type":998,"value":1127},{"type":993,"tag":1026,"props":1233,"children":1234},{"style":1130},[1235],{"type":998,"value":1133},{"type":993,"tag":1026,"props":1237,"children":1238},{"style":1057},[1239],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1241,"children":1242},{"style":1069},[1243],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1245,"children":1246},{"style":1057},[1247],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1249,"children":1250},{"style":1069},[1251],{"type":998,"value":1252},"\"r\"",{"type":993,"tag":1026,"props":1254,"children":1255},{"style":1057},[1256],{"type":998,"value":1158},{"type":993,"tag":1026,"props":1258,"children":1259},{"style":1063},[1260],{"type":998,"value":1163},{"type":993,"tag":1026,"props":1262,"children":1263},{"style":1166},[1264],{"type":998,"value":1169},{"type":993,"tag":1026,"props":1266,"children":1267},{"style":1057},[1268],{"type":998,"value":1174},{"type":993,"tag":1026,"props":1270,"children":1271},{"class":1028,"line":164},[1272,1277,1281,1285],{"type":993,"tag":1026,"props":1273,"children":1274},{"style":1057},[1275],{"type":998,"value":1276},"    content ",{"type":993,"tag":1026,"props":1278,"children":1279},{"style":1063},[1280],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1282,"children":1283},{"style":1166},[1284],{"type":998,"value":1169},{"type":993,"tag":1026,"props":1286,"children":1287},{"style":1057},[1288],{"type":998,"value":1289},".read()\n",{"type":993,"tag":1026,"props":1291,"children":1292},{"class":1028,"line":173},[1293,1298],{"type":993,"tag":1026,"props":1294,"children":1295},{"style":1130},[1296],{"type":998,"value":1297},"    print",{"type":993,"tag":1026,"props":1299,"children":1300},{"style":1057},[1301],{"type":998,"value":1302},"(content)\n",{"type":993,"tag":1026,"props":1304,"children":1305},{"class":1028,"line":182},[1306,1310,1314,1319,1324,1329,1334,1339,1344],{"type":993,"tag":1026,"props":1307,"children":1308},{"style":1130},[1309],{"type":998,"value":1297},{"type":993,"tag":1026,"props":1311,"children":1312},{"style":1057},[1313],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1315,"children":1316},{"style":1063},[1317],{"type":998,"value":1318},"f",{"type":993,"tag":1026,"props":1320,"children":1321},{"style":1069},[1322],{"type":998,"value":1323},"\"Total characters: ",{"type":993,"tag":1026,"props":1325,"children":1326},{"style":1130},[1327],{"type":998,"value":1328},"{len",{"type":993,"tag":1026,"props":1330,"children":1331},{"style":1057},[1332],{"type":998,"value":1333},"(content)",{"type":993,"tag":1026,"props":1335,"children":1336},{"style":1130},[1337],{"type":998,"value":1338},"}",{"type":993,"tag":1026,"props":1340,"children":1341},{"style":1069},[1342],{"type":998,"value":1343},"\"",{"type":993,"tag":1026,"props":1345,"children":1346},{"style":1057},[1347],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1349,"children":1350},{"class":1028,"line":191},[1351],{"type":993,"tag":1026,"props":1352,"children":1353},{"emptyLinePlaceholder":13},[1354],{"type":998,"value":1043},{"type":993,"tag":1026,"props":1356,"children":1357},{"class":1028,"line":201},[1358],{"type":993,"tag":1026,"props":1359,"children":1360},{"style":1032},[1361],{"type":998,"value":1362},"# Method 2: Read line by line (memory efficient)\n",{"type":993,"tag":1026,"props":1364,"children":1365},{"class":1028,"line":210},[1366,1370,1374,1378,1383,1388],{"type":993,"tag":1026,"props":1367,"children":1368},{"style":1130},[1369],{"type":998,"value":1210},{"type":993,"tag":1026,"props":1371,"children":1372},{"style":1057},[1373],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1375,"children":1376},{"style":1069},[1377],{"type":998,"value":1343},{"type":993,"tag":1026,"props":1379,"children":1380},{"style":1130},[1381],{"type":998,"value":1382},"\\n",{"type":993,"tag":1026,"props":1384,"children":1385},{"style":1069},[1386],{"type":998,"value":1387},"📝 Reading line by line:\"",{"type":993,"tag":1026,"props":1389,"children":1390},{"style":1057},[1391],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1393,"children":1394},{"class":1028,"line":219},[1395,1399,1403,1407,1411,1415,1419,1423,1427,1431],{"type":993,"tag":1026,"props":1396,"children":1397},{"style":1063},[1398],{"type":998,"value":1127},{"type":993,"tag":1026,"props":1400,"children":1401},{"style":1130},[1402],{"type":998,"value":1133},{"type":993,"tag":1026,"props":1404,"children":1405},{"style":1057},[1406],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1408,"children":1409},{"style":1069},[1410],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1412,"children":1413},{"style":1057},[1414],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1416,"children":1417},{"style":1069},[1418],{"type":998,"value":1252},{"type":993,"tag":1026,"props":1420,"children":1421},{"style":1057},[1422],{"type":998,"value":1158},{"type":993,"tag":1026,"props":1424,"children":1425},{"style":1063},[1426],{"type":998,"value":1163},{"type":993,"tag":1026,"props":1428,"children":1429},{"style":1166},[1430],{"type":998,"value":1169},{"type":993,"tag":1026,"props":1432,"children":1433},{"style":1057},[1434],{"type":998,"value":1174},{"type":993,"tag":1026,"props":1436,"children":1437},{"class":1028,"line":228},[1438,1443,1448,1453,1458,1462,1467,1471,1476],{"type":993,"tag":1026,"props":1439,"children":1440},{"style":1063},[1441],{"type":998,"value":1442},"    for",{"type":993,"tag":1026,"props":1444,"children":1445},{"style":1057},[1446],{"type":998,"value":1447}," line_number, line ",{"type":993,"tag":1026,"props":1449,"children":1450},{"style":1063},[1451],{"type":998,"value":1452},"in",{"type":993,"tag":1026,"props":1454,"children":1455},{"style":1130},[1456],{"type":998,"value":1457}," enumerate",{"type":993,"tag":1026,"props":1459,"children":1460},{"style":1057},[1461],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1463,"children":1464},{"style":1166},[1465],{"type":998,"value":1466},"file",{"type":993,"tag":1026,"props":1468,"children":1469},{"style":1057},[1470],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1472,"children":1473},{"style":1130},[1474],{"type":998,"value":1475},"1",{"type":993,"tag":1026,"props":1477,"children":1478},{"style":1057},[1479],{"type":998,"value":1480},"):\n",{"type":993,"tag":1026,"props":1482,"children":1483},{"class":1028,"line":238},[1484,1489,1493,1497,1502,1507,1512,1516,1521,1525,1530,1534,1538],{"type":993,"tag":1026,"props":1485,"children":1486},{"style":1130},[1487],{"type":998,"value":1488},"        print",{"type":993,"tag":1026,"props":1490,"children":1491},{"style":1057},[1492],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1494,"children":1495},{"style":1063},[1496],{"type":998,"value":1318},{"type":993,"tag":1026,"props":1498,"children":1499},{"style":1069},[1500],{"type":998,"value":1501},"\"Line ",{"type":993,"tag":1026,"props":1503,"children":1504},{"style":1130},[1505],{"type":998,"value":1506},"{",{"type":993,"tag":1026,"props":1508,"children":1509},{"style":1057},[1510],{"type":998,"value":1511},"line_number",{"type":993,"tag":1026,"props":1513,"children":1514},{"style":1130},[1515],{"type":998,"value":1338},{"type":993,"tag":1026,"props":1517,"children":1518},{"style":1069},[1519],{"type":998,"value":1520},": ",{"type":993,"tag":1026,"props":1522,"children":1523},{"style":1130},[1524],{"type":998,"value":1506},{"type":993,"tag":1026,"props":1526,"children":1527},{"style":1057},[1528],{"type":998,"value":1529},"line.strip()",{"type":993,"tag":1026,"props":1531,"children":1532},{"style":1130},[1533],{"type":998,"value":1338},{"type":993,"tag":1026,"props":1535,"children":1536},{"style":1069},[1537],{"type":998,"value":1343},{"type":993,"tag":1026,"props":1539,"children":1540},{"style":1057},[1541],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1543,"children":1544},{"class":1028,"line":247},[1545],{"type":993,"tag":1026,"props":1546,"children":1547},{"emptyLinePlaceholder":13},[1548],{"type":998,"value":1043},{"type":993,"tag":1026,"props":1550,"children":1551},{"class":1028,"line":256},[1552],{"type":993,"tag":1026,"props":1553,"children":1554},{"style":1032},[1555],{"type":998,"value":1556},"# Method 3: Read all lines into a list\n",{"type":993,"tag":1026,"props":1558,"children":1559},{"class":1028,"line":265},[1560,1564,1568,1572,1576,1581],{"type":993,"tag":1026,"props":1561,"children":1562},{"style":1130},[1563],{"type":998,"value":1210},{"type":993,"tag":1026,"props":1565,"children":1566},{"style":1057},[1567],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1569,"children":1570},{"style":1069},[1571],{"type":998,"value":1343},{"type":993,"tag":1026,"props":1573,"children":1574},{"style":1130},[1575],{"type":998,"value":1382},{"type":993,"tag":1026,"props":1577,"children":1578},{"style":1069},[1579],{"type":998,"value":1580},"📋 Reading all lines:\"",{"type":993,"tag":1026,"props":1582,"children":1583},{"style":1057},[1584],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1586,"children":1587},{"class":1028,"line":274},[1588,1592,1596,1600,1604,1608,1612,1616,1620,1624],{"type":993,"tag":1026,"props":1589,"children":1590},{"style":1063},[1591],{"type":998,"value":1127},{"type":993,"tag":1026,"props":1593,"children":1594},{"style":1130},[1595],{"type":998,"value":1133},{"type":993,"tag":1026,"props":1597,"children":1598},{"style":1057},[1599],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1601,"children":1602},{"style":1069},[1603],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1605,"children":1606},{"style":1057},[1607],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1609,"children":1610},{"style":1069},[1611],{"type":998,"value":1252},{"type":993,"tag":1026,"props":1613,"children":1614},{"style":1057},[1615],{"type":998,"value":1158},{"type":993,"tag":1026,"props":1617,"children":1618},{"style":1063},[1619],{"type":998,"value":1163},{"type":993,"tag":1026,"props":1621,"children":1622},{"style":1166},[1623],{"type":998,"value":1169},{"type":993,"tag":1026,"props":1625,"children":1626},{"style":1057},[1627],{"type":998,"value":1174},{"type":993,"tag":1026,"props":1629,"children":1630},{"class":1028,"line":284},[1631,1636,1640,1644],{"type":993,"tag":1026,"props":1632,"children":1633},{"style":1057},[1634],{"type":998,"value":1635},"    lines ",{"type":993,"tag":1026,"props":1637,"children":1638},{"style":1063},[1639],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1641,"children":1642},{"style":1166},[1643],{"type":998,"value":1169},{"type":993,"tag":1026,"props":1645,"children":1646},{"style":1057},[1647],{"type":998,"value":1648},".readlines()\n",{"type":993,"tag":1026,"props":1650,"children":1651},{"class":1028,"line":293},[1652,1656,1660,1664,1669,1673,1678,1682,1687],{"type":993,"tag":1026,"props":1653,"children":1654},{"style":1130},[1655],{"type":998,"value":1297},{"type":993,"tag":1026,"props":1657,"children":1658},{"style":1057},[1659],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1661,"children":1662},{"style":1063},[1663],{"type":998,"value":1318},{"type":993,"tag":1026,"props":1665,"children":1666},{"style":1069},[1667],{"type":998,"value":1668},"\"File has ",{"type":993,"tag":1026,"props":1670,"children":1671},{"style":1130},[1672],{"type":998,"value":1328},{"type":993,"tag":1026,"props":1674,"children":1675},{"style":1057},[1676],{"type":998,"value":1677},"(lines)",{"type":993,"tag":1026,"props":1679,"children":1680},{"style":1130},[1681],{"type":998,"value":1338},{"type":993,"tag":1026,"props":1683,"children":1684},{"style":1069},[1685],{"type":998,"value":1686}," lines\"",{"type":993,"tag":1026,"props":1688,"children":1689},{"style":1057},[1690],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1692,"children":1693},{"class":1028,"line":302},[1694,1698,1703,1707,1711],{"type":993,"tag":1026,"props":1695,"children":1696},{"style":1063},[1697],{"type":998,"value":1442},{"type":993,"tag":1026,"props":1699,"children":1700},{"style":1057},[1701],{"type":998,"value":1702}," i, line ",{"type":993,"tag":1026,"props":1704,"children":1705},{"style":1063},[1706],{"type":998,"value":1452},{"type":993,"tag":1026,"props":1708,"children":1709},{"style":1130},[1710],{"type":998,"value":1457},{"type":993,"tag":1026,"props":1712,"children":1713},{"style":1057},[1714],{"type":998,"value":1715},"(lines):\n",{"type":993,"tag":1026,"props":1717,"children":1718},{"class":1028,"line":311},[1719,1724,1728,1733],{"type":993,"tag":1026,"props":1720,"children":1721},{"style":1057},[1722],{"type":998,"value":1723},"        word_count ",{"type":993,"tag":1026,"props":1725,"children":1726},{"style":1063},[1727],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1729,"children":1730},{"style":1130},[1731],{"type":998,"value":1732}," len",{"type":993,"tag":1026,"props":1734,"children":1735},{"style":1057},[1736],{"type":998,"value":1737},"(line.strip().split())\n",{"type":993,"tag":1026,"props":1739,"children":1740},{"class":1028,"line":320},[1741,1745,1749,1753,1757,1761,1766,1771,1776,1780,1784,1789,1793,1798],{"type":993,"tag":1026,"props":1742,"children":1743},{"style":1130},[1744],{"type":998,"value":1488},{"type":993,"tag":1026,"props":1746,"children":1747},{"style":1057},[1748],{"type":998,"value":1138},{"type":993,"tag":1026,"props":1750,"children":1751},{"style":1063},[1752],{"type":998,"value":1318},{"type":993,"tag":1026,"props":1754,"children":1755},{"style":1069},[1756],{"type":998,"value":1501},{"type":993,"tag":1026,"props":1758,"children":1759},{"style":1130},[1760],{"type":998,"value":1506},{"type":993,"tag":1026,"props":1762,"children":1763},{"style":1057},[1764],{"type":998,"value":1765},"i",{"type":993,"tag":1026,"props":1767,"children":1768},{"style":1063},[1769],{"type":998,"value":1770},"+",{"type":993,"tag":1026,"props":1772,"children":1773},{"style":1130},[1774],{"type":998,"value":1775},"1}",{"type":993,"tag":1026,"props":1777,"children":1778},{"style":1069},[1779],{"type":998,"value":1520},{"type":993,"tag":1026,"props":1781,"children":1782},{"style":1130},[1783],{"type":998,"value":1506},{"type":993,"tag":1026,"props":1785,"children":1786},{"style":1057},[1787],{"type":998,"value":1788},"word_count",{"type":993,"tag":1026,"props":1790,"children":1791},{"style":1130},[1792],{"type":998,"value":1338},{"type":993,"tag":1026,"props":1794,"children":1795},{"style":1069},[1796],{"type":998,"value":1797}," words\"",{"type":993,"tag":1026,"props":1799,"children":1800},{"style":1057},[1801],{"type":998,"value":1224},{"type":993,"tag":1803,"props":1804,"children":1806},"h2",{"id":1805},"understanding-file-reading-methods",[1807],{"type":998,"value":1808},"🎯 Understanding File Reading Methods",{"type":993,"tag":1001,"props":1810,"children":1811},{},[1812],{"type":998,"value":1813},"Python offers several ways to read files, each suited for different situations and file sizes.",{"type":993,"tag":1815,"props":1816,"children":1820},"info-box",{"emoji":1817,"title":1818,"type":1819},"📚","File Reading Methods","info",[1821,1830,1838,1883,1891,1932,1940,1971,1979],{"type":993,"tag":1001,"props":1822,"children":1823},{},[1824],{"type":993,"tag":1825,"props":1826,"children":1827},"strong",{},[1828],{"type":998,"value":1829},"Reading Approaches:",{"type":993,"tag":1001,"props":1831,"children":1832},{},[1833],{"type":993,"tag":1825,"props":1834,"children":1835},{},[1836],{"type":998,"value":1837},"📖 Complete File Reading:",{"type":993,"tag":1839,"props":1840,"children":1841},"ul",{},[1842,1853,1863,1873],{"type":993,"tag":1843,"props":1844,"children":1845},"li",{},[1846,1851],{"type":993,"tag":1825,"props":1847,"children":1848},{},[1849],{"type":998,"value":1850},"read()",{"type":998,"value":1852}," - Read entire file as one string",{"type":993,"tag":1843,"props":1854,"children":1855},{},[1856,1861],{"type":993,"tag":1825,"props":1857,"children":1858},{},[1859],{"type":998,"value":1860},"readlines()",{"type":998,"value":1862}," - Read all lines into a list",{"type":993,"tag":1843,"props":1864,"children":1865},{},[1866,1871],{"type":993,"tag":1825,"props":1867,"children":1868},{},[1869],{"type":998,"value":1870},"Best for:",{"type":998,"value":1872}," Small to medium files (under 100MB)",{"type":993,"tag":1843,"props":1874,"children":1875},{},[1876,1881],{"type":993,"tag":1825,"props":1877,"children":1878},{},[1879],{"type":998,"value":1880},"Memory usage:",{"type":998,"value":1882}," Loads entire file into memory",{"type":993,"tag":1001,"props":1884,"children":1885},{},[1886],{"type":993,"tag":1825,"props":1887,"children":1888},{},[1889],{"type":998,"value":1890},"📝 Line-by-Line Reading:",{"type":993,"tag":1839,"props":1892,"children":1893},{},[1894,1904,1914,1923],{"type":993,"tag":1843,"props":1895,"children":1896},{},[1897,1902],{"type":993,"tag":1825,"props":1898,"children":1899},{},[1900],{"type":998,"value":1901},"for line in file:",{"type":998,"value":1903}," - Most efficient iterator approach",{"type":993,"tag":1843,"props":1905,"children":1906},{},[1907,1912],{"type":993,"tag":1825,"props":1908,"children":1909},{},[1910],{"type":998,"value":1911},"readline()",{"type":998,"value":1913}," - Read one line at a time",{"type":993,"tag":1843,"props":1915,"children":1916},{},[1917,1921],{"type":993,"tag":1825,"props":1918,"children":1919},{},[1920],{"type":998,"value":1870},{"type":998,"value":1922}," Large files, streaming data",{"type":993,"tag":1843,"props":1924,"children":1925},{},[1926,1930],{"type":993,"tag":1825,"props":1927,"children":1928},{},[1929],{"type":998,"value":1880},{"type":998,"value":1931}," Only current line in memory",{"type":993,"tag":1001,"props":1933,"children":1934},{},[1935],{"type":993,"tag":1825,"props":1936,"children":1937},{},[1938],{"type":998,"value":1939},"⚡ Controlled Reading:",{"type":993,"tag":1839,"props":1941,"children":1942},{},[1943,1953,1962],{"type":993,"tag":1843,"props":1944,"children":1945},{},[1946,1951],{"type":993,"tag":1825,"props":1947,"children":1948},{},[1949],{"type":998,"value":1950},"read(size)",{"type":998,"value":1952}," - Read specific number of characters",{"type":993,"tag":1843,"props":1954,"children":1955},{},[1956,1960],{"type":993,"tag":1825,"props":1957,"children":1958},{},[1959],{"type":998,"value":1870},{"type":998,"value":1961}," Binary files, precise control",{"type":993,"tag":1843,"props":1963,"children":1964},{},[1965,1969],{"type":993,"tag":1825,"props":1966,"children":1967},{},[1968],{"type":998,"value":1880},{"type":998,"value":1970}," Only specified amount",{"type":993,"tag":1001,"props":1972,"children":1973},{},[1974],{"type":993,"tag":1825,"props":1975,"children":1976},{},[1977],{"type":998,"value":1978},"🎯 When to Use Each:",{"type":993,"tag":1839,"props":1980,"children":1981},{},[1982,1992,2002,2012],{"type":993,"tag":1843,"props":1983,"children":1984},{},[1985,1990],{"type":993,"tag":1825,"props":1986,"children":1987},{},[1988],{"type":998,"value":1989},"Small files (\u003C 1MB):",{"type":998,"value":1991}," Use read() or readlines()",{"type":993,"tag":1843,"props":1993,"children":1994},{},[1995,2000],{"type":993,"tag":1825,"props":1996,"children":1997},{},[1998],{"type":998,"value":1999},"Large files (> 1MB):",{"type":998,"value":2001}," Use line-by-line iteration",{"type":993,"tag":1843,"props":2003,"children":2004},{},[2005,2010],{"type":993,"tag":1825,"props":2006,"children":2007},{},[2008],{"type":998,"value":2009},"Structured data:",{"type":998,"value":2011}," Parse each line as you read it",{"type":993,"tag":1843,"props":2013,"children":2014},{},[2015,2020],{"type":993,"tag":1825,"props":2016,"children":2017},{},[2018],{"type":998,"value":2019},"CSV/Log files:",{"type":998,"value":2021}," Line-by-line with error handling",{"type":993,"tag":2023,"props":2024,"children":2026},"h3",{"id":2025},"text-file-processing",[2027],{"type":998,"value":2028},"📄 Text File Processing",{"type":993,"tag":1001,"props":2030,"children":2031},{},[2032],{"type":998,"value":2033},"Text files are the most common type you'll work with - from configuration files to user data.",{"type":993,"tag":1012,"props":2035,"children":2036},{},[2037],{"type":993,"tag":1016,"props":2038,"children":2040},{"className":1018,"code":2039,"language":6,"meta":8,"style":8},"# 📝 Text File Processing Examples\n\n# Create a sample diary file\ndiary_content = \"\"\"January 15, 2024\nToday I learned Python file reading.\nThe weather was sunny and warm.\nI coded for 2 hours.\n\nJanuary 16, 2024\nWorked on file processing project.\nFile handling is very useful.\nExcited to learn more!\"\"\"\n\nwith open(\"diary.txt\", \"w\") as file:\n    file.write(diary_content)\n\n# Example 1: Count words and lines\nprint(\"📊 File Statistics:\")\nwith open(\"diary.txt\", \"r\") as file:\n    content = file.read()\n    words = content.split()\n    lines = content.split('\\n')\n    \n    print(f\"   Total words: {len(words)}\")\n    print(f\"   Total lines: {len(lines)}\")\n    print(f\"   Characters: {len(content)}\")\n\n# Example 2: Find specific content\nprint(\"\\n🔍 Search for dates:\")\nwith open(\"diary.txt\", \"r\") as file:\n    for line_num, line in enumerate(file, 1):\n        if \"2024\" in line:\n            print(f\"   Line {line_num}: {line.strip()}\")\n\n# Example 3: Process diary entries\nprint(\"\\n📖 Extract entries:\")\nwith open(\"diary.txt\", \"r\") as file:\n    current_entry = []\n    entries = []\n    \n    for line in file:\n        line = line.strip()\n        if line and (\"January\" in line or \"February\" in line):\n            if current_entry:\n                entries.append(current_entry)\n            current_entry = [line]\n        elif line:\n            current_entry.append(line)\n    \n    if current_entry:\n        entries.append(current_entry)\n    \n    for i, entry in enumerate(entries, 1):\n        print(f\"   Entry {i}: {entry[0]}\")\n",[2041],{"type":993,"tag":1022,"props":2042,"children":2043},{"__ignoreMap":8},[2044,2052,2059,2067,2084,2092,2100,2108,2115,2123,2131,2139,2147,2154,2198,2210,2217,2225,2245,2288,2307,2324,2357,2365,2406,2446,2486,2493,2501,2529,2572,2612,2635,2693,2700,2708,2736,2779,2796,2812,2819,2843,2860,2913,2926,2934,2951,2963,2971,2978,2990,2998,3005,3038],{"type":993,"tag":1026,"props":2045,"children":2046},{"class":1028,"line":12},[2047],{"type":993,"tag":1026,"props":2048,"children":2049},{"style":1032},[2050],{"type":998,"value":2051},"# 📝 Text File Processing Examples\n",{"type":993,"tag":1026,"props":2053,"children":2054},{"class":1028,"line":27},[2055],{"type":993,"tag":1026,"props":2056,"children":2057},{"emptyLinePlaceholder":13},[2058],{"type":998,"value":1043},{"type":993,"tag":1026,"props":2060,"children":2061},{"class":1028,"line":36},[2062],{"type":993,"tag":1026,"props":2063,"children":2064},{"style":1032},[2065],{"type":998,"value":2066},"# Create a sample diary file\n",{"type":993,"tag":1026,"props":2068,"children":2069},{"class":1028,"line":45},[2070,2075,2079],{"type":993,"tag":1026,"props":2071,"children":2072},{"style":1057},[2073],{"type":998,"value":2074},"diary_content ",{"type":993,"tag":1026,"props":2076,"children":2077},{"style":1063},[2078],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2080,"children":2081},{"style":1069},[2082],{"type":998,"value":2083}," \"\"\"January 15, 2024\n",{"type":993,"tag":1026,"props":2085,"children":2086},{"class":1028,"line":54},[2087],{"type":993,"tag":1026,"props":2088,"children":2089},{"style":1069},[2090],{"type":998,"value":2091},"Today I learned Python file reading.\n",{"type":993,"tag":1026,"props":2093,"children":2094},{"class":1028,"line":63},[2095],{"type":993,"tag":1026,"props":2096,"children":2097},{"style":1069},[2098],{"type":998,"value":2099},"The weather was sunny and warm.\n",{"type":993,"tag":1026,"props":2101,"children":2102},{"class":1028,"line":72},[2103],{"type":993,"tag":1026,"props":2104,"children":2105},{"style":1069},[2106],{"type":998,"value":2107},"I coded for 2 hours.\n",{"type":993,"tag":1026,"props":2109,"children":2110},{"class":1028,"line":81},[2111],{"type":993,"tag":1026,"props":2112,"children":2113},{"emptyLinePlaceholder":13},[2114],{"type":998,"value":1043},{"type":993,"tag":1026,"props":2116,"children":2117},{"class":1028,"line":91},[2118],{"type":993,"tag":1026,"props":2119,"children":2120},{"style":1069},[2121],{"type":998,"value":2122},"January 16, 2024\n",{"type":993,"tag":1026,"props":2124,"children":2125},{"class":1028,"line":100},[2126],{"type":993,"tag":1026,"props":2127,"children":2128},{"style":1069},[2129],{"type":998,"value":2130},"Worked on file processing project.\n",{"type":993,"tag":1026,"props":2132,"children":2133},{"class":1028,"line":109},[2134],{"type":993,"tag":1026,"props":2135,"children":2136},{"style":1069},[2137],{"type":998,"value":2138},"File handling is very useful.\n",{"type":993,"tag":1026,"props":2140,"children":2141},{"class":1028,"line":118},[2142],{"type":993,"tag":1026,"props":2143,"children":2144},{"style":1069},[2145],{"type":998,"value":2146},"Excited to learn more!\"\"\"\n",{"type":993,"tag":1026,"props":2148,"children":2149},{"class":1028,"line":127},[2150],{"type":993,"tag":1026,"props":2151,"children":2152},{"emptyLinePlaceholder":13},[2153],{"type":998,"value":1043},{"type":993,"tag":1026,"props":2155,"children":2156},{"class":1028,"line":136},[2157,2161,2165,2169,2174,2178,2182,2186,2190,2194],{"type":993,"tag":1026,"props":2158,"children":2159},{"style":1063},[2160],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2162,"children":2163},{"style":1130},[2164],{"type":998,"value":1133},{"type":993,"tag":1026,"props":2166,"children":2167},{"style":1057},[2168],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2170,"children":2171},{"style":1069},[2172],{"type":998,"value":2173},"\"diary.txt\"",{"type":993,"tag":1026,"props":2175,"children":2176},{"style":1057},[2177],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2179,"children":2180},{"style":1069},[2181],{"type":998,"value":1153},{"type":993,"tag":1026,"props":2183,"children":2184},{"style":1057},[2185],{"type":998,"value":1158},{"type":993,"tag":1026,"props":2187,"children":2188},{"style":1063},[2189],{"type":998,"value":1163},{"type":993,"tag":1026,"props":2191,"children":2192},{"style":1166},[2193],{"type":998,"value":1169},{"type":993,"tag":1026,"props":2195,"children":2196},{"style":1057},[2197],{"type":998,"value":1174},{"type":993,"tag":1026,"props":2199,"children":2200},{"class":1028,"line":146},[2201,2205],{"type":993,"tag":1026,"props":2202,"children":2203},{"style":1166},[2204],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2206,"children":2207},{"style":1057},[2208],{"type":998,"value":2209},".write(diary_content)\n",{"type":993,"tag":1026,"props":2211,"children":2212},{"class":1028,"line":155},[2213],{"type":993,"tag":1026,"props":2214,"children":2215},{"emptyLinePlaceholder":13},[2216],{"type":998,"value":1043},{"type":993,"tag":1026,"props":2218,"children":2219},{"class":1028,"line":164},[2220],{"type":993,"tag":1026,"props":2221,"children":2222},{"style":1032},[2223],{"type":998,"value":2224},"# Example 1: Count words and lines\n",{"type":993,"tag":1026,"props":2226,"children":2227},{"class":1028,"line":173},[2228,2232,2236,2241],{"type":993,"tag":1026,"props":2229,"children":2230},{"style":1130},[2231],{"type":998,"value":1210},{"type":993,"tag":1026,"props":2233,"children":2234},{"style":1057},[2235],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2237,"children":2238},{"style":1069},[2239],{"type":998,"value":2240},"\"📊 File Statistics:\"",{"type":993,"tag":1026,"props":2242,"children":2243},{"style":1057},[2244],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2246,"children":2247},{"class":1028,"line":182},[2248,2252,2256,2260,2264,2268,2272,2276,2280,2284],{"type":993,"tag":1026,"props":2249,"children":2250},{"style":1063},[2251],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2253,"children":2254},{"style":1130},[2255],{"type":998,"value":1133},{"type":993,"tag":1026,"props":2257,"children":2258},{"style":1057},[2259],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2261,"children":2262},{"style":1069},[2263],{"type":998,"value":2173},{"type":993,"tag":1026,"props":2265,"children":2266},{"style":1057},[2267],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2269,"children":2270},{"style":1069},[2271],{"type":998,"value":1252},{"type":993,"tag":1026,"props":2273,"children":2274},{"style":1057},[2275],{"type":998,"value":1158},{"type":993,"tag":1026,"props":2277,"children":2278},{"style":1063},[2279],{"type":998,"value":1163},{"type":993,"tag":1026,"props":2281,"children":2282},{"style":1166},[2283],{"type":998,"value":1169},{"type":993,"tag":1026,"props":2285,"children":2286},{"style":1057},[2287],{"type":998,"value":1174},{"type":993,"tag":1026,"props":2289,"children":2290},{"class":1028,"line":191},[2291,2295,2299,2303],{"type":993,"tag":1026,"props":2292,"children":2293},{"style":1057},[2294],{"type":998,"value":1276},{"type":993,"tag":1026,"props":2296,"children":2297},{"style":1063},[2298],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2300,"children":2301},{"style":1166},[2302],{"type":998,"value":1169},{"type":993,"tag":1026,"props":2304,"children":2305},{"style":1057},[2306],{"type":998,"value":1289},{"type":993,"tag":1026,"props":2308,"children":2309},{"class":1028,"line":201},[2310,2315,2319],{"type":993,"tag":1026,"props":2311,"children":2312},{"style":1057},[2313],{"type":998,"value":2314},"    words ",{"type":993,"tag":1026,"props":2316,"children":2317},{"style":1063},[2318],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2320,"children":2321},{"style":1057},[2322],{"type":998,"value":2323}," content.split()\n",{"type":993,"tag":1026,"props":2325,"children":2326},{"class":1028,"line":210},[2327,2331,2335,2340,2345,2349,2353],{"type":993,"tag":1026,"props":2328,"children":2329},{"style":1057},[2330],{"type":998,"value":1635},{"type":993,"tag":1026,"props":2332,"children":2333},{"style":1063},[2334],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2336,"children":2337},{"style":1057},[2338],{"type":998,"value":2339}," content.split(",{"type":993,"tag":1026,"props":2341,"children":2342},{"style":1069},[2343],{"type":998,"value":2344},"'",{"type":993,"tag":1026,"props":2346,"children":2347},{"style":1130},[2348],{"type":998,"value":1382},{"type":993,"tag":1026,"props":2350,"children":2351},{"style":1069},[2352],{"type":998,"value":2344},{"type":993,"tag":1026,"props":2354,"children":2355},{"style":1057},[2356],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2358,"children":2359},{"class":1028,"line":219},[2360],{"type":993,"tag":1026,"props":2361,"children":2362},{"style":1057},[2363],{"type":998,"value":2364},"    \n",{"type":993,"tag":1026,"props":2366,"children":2367},{"class":1028,"line":228},[2368,2372,2376,2380,2385,2389,2394,2398,2402],{"type":993,"tag":1026,"props":2369,"children":2370},{"style":1130},[2371],{"type":998,"value":1297},{"type":993,"tag":1026,"props":2373,"children":2374},{"style":1057},[2375],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2377,"children":2378},{"style":1063},[2379],{"type":998,"value":1318},{"type":993,"tag":1026,"props":2381,"children":2382},{"style":1069},[2383],{"type":998,"value":2384},"\"   Total words: ",{"type":993,"tag":1026,"props":2386,"children":2387},{"style":1130},[2388],{"type":998,"value":1328},{"type":993,"tag":1026,"props":2390,"children":2391},{"style":1057},[2392],{"type":998,"value":2393},"(words)",{"type":993,"tag":1026,"props":2395,"children":2396},{"style":1130},[2397],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2399,"children":2400},{"style":1069},[2401],{"type":998,"value":1343},{"type":993,"tag":1026,"props":2403,"children":2404},{"style":1057},[2405],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2407,"children":2408},{"class":1028,"line":238},[2409,2413,2417,2421,2426,2430,2434,2438,2442],{"type":993,"tag":1026,"props":2410,"children":2411},{"style":1130},[2412],{"type":998,"value":1297},{"type":993,"tag":1026,"props":2414,"children":2415},{"style":1057},[2416],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2418,"children":2419},{"style":1063},[2420],{"type":998,"value":1318},{"type":993,"tag":1026,"props":2422,"children":2423},{"style":1069},[2424],{"type":998,"value":2425},"\"   Total lines: ",{"type":993,"tag":1026,"props":2427,"children":2428},{"style":1130},[2429],{"type":998,"value":1328},{"type":993,"tag":1026,"props":2431,"children":2432},{"style":1057},[2433],{"type":998,"value":1677},{"type":993,"tag":1026,"props":2435,"children":2436},{"style":1130},[2437],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2439,"children":2440},{"style":1069},[2441],{"type":998,"value":1343},{"type":993,"tag":1026,"props":2443,"children":2444},{"style":1057},[2445],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2447,"children":2448},{"class":1028,"line":247},[2449,2453,2457,2461,2466,2470,2474,2478,2482],{"type":993,"tag":1026,"props":2450,"children":2451},{"style":1130},[2452],{"type":998,"value":1297},{"type":993,"tag":1026,"props":2454,"children":2455},{"style":1057},[2456],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2458,"children":2459},{"style":1063},[2460],{"type":998,"value":1318},{"type":993,"tag":1026,"props":2462,"children":2463},{"style":1069},[2464],{"type":998,"value":2465},"\"   Characters: ",{"type":993,"tag":1026,"props":2467,"children":2468},{"style":1130},[2469],{"type":998,"value":1328},{"type":993,"tag":1026,"props":2471,"children":2472},{"style":1057},[2473],{"type":998,"value":1333},{"type":993,"tag":1026,"props":2475,"children":2476},{"style":1130},[2477],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2479,"children":2480},{"style":1069},[2481],{"type":998,"value":1343},{"type":993,"tag":1026,"props":2483,"children":2484},{"style":1057},[2485],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2487,"children":2488},{"class":1028,"line":256},[2489],{"type":993,"tag":1026,"props":2490,"children":2491},{"emptyLinePlaceholder":13},[2492],{"type":998,"value":1043},{"type":993,"tag":1026,"props":2494,"children":2495},{"class":1028,"line":265},[2496],{"type":993,"tag":1026,"props":2497,"children":2498},{"style":1032},[2499],{"type":998,"value":2500},"# Example 2: Find specific content\n",{"type":993,"tag":1026,"props":2502,"children":2503},{"class":1028,"line":274},[2504,2508,2512,2516,2520,2525],{"type":993,"tag":1026,"props":2505,"children":2506},{"style":1130},[2507],{"type":998,"value":1210},{"type":993,"tag":1026,"props":2509,"children":2510},{"style":1057},[2511],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2513,"children":2514},{"style":1069},[2515],{"type":998,"value":1343},{"type":993,"tag":1026,"props":2517,"children":2518},{"style":1130},[2519],{"type":998,"value":1382},{"type":993,"tag":1026,"props":2521,"children":2522},{"style":1069},[2523],{"type":998,"value":2524},"🔍 Search for dates:\"",{"type":993,"tag":1026,"props":2526,"children":2527},{"style":1057},[2528],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2530,"children":2531},{"class":1028,"line":284},[2532,2536,2540,2544,2548,2552,2556,2560,2564,2568],{"type":993,"tag":1026,"props":2533,"children":2534},{"style":1063},[2535],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2537,"children":2538},{"style":1130},[2539],{"type":998,"value":1133},{"type":993,"tag":1026,"props":2541,"children":2542},{"style":1057},[2543],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2545,"children":2546},{"style":1069},[2547],{"type":998,"value":2173},{"type":993,"tag":1026,"props":2549,"children":2550},{"style":1057},[2551],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2553,"children":2554},{"style":1069},[2555],{"type":998,"value":1252},{"type":993,"tag":1026,"props":2557,"children":2558},{"style":1057},[2559],{"type":998,"value":1158},{"type":993,"tag":1026,"props":2561,"children":2562},{"style":1063},[2563],{"type":998,"value":1163},{"type":993,"tag":1026,"props":2565,"children":2566},{"style":1166},[2567],{"type":998,"value":1169},{"type":993,"tag":1026,"props":2569,"children":2570},{"style":1057},[2571],{"type":998,"value":1174},{"type":993,"tag":1026,"props":2573,"children":2574},{"class":1028,"line":293},[2575,2579,2584,2588,2592,2596,2600,2604,2608],{"type":993,"tag":1026,"props":2576,"children":2577},{"style":1063},[2578],{"type":998,"value":1442},{"type":993,"tag":1026,"props":2580,"children":2581},{"style":1057},[2582],{"type":998,"value":2583}," line_num, line ",{"type":993,"tag":1026,"props":2585,"children":2586},{"style":1063},[2587],{"type":998,"value":1452},{"type":993,"tag":1026,"props":2589,"children":2590},{"style":1130},[2591],{"type":998,"value":1457},{"type":993,"tag":1026,"props":2593,"children":2594},{"style":1057},[2595],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2597,"children":2598},{"style":1166},[2599],{"type":998,"value":1466},{"type":993,"tag":1026,"props":2601,"children":2602},{"style":1057},[2603],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2605,"children":2606},{"style":1130},[2607],{"type":998,"value":1475},{"type":993,"tag":1026,"props":2609,"children":2610},{"style":1057},[2611],{"type":998,"value":1480},{"type":993,"tag":1026,"props":2613,"children":2614},{"class":1028,"line":302},[2615,2620,2625,2630],{"type":993,"tag":1026,"props":2616,"children":2617},{"style":1063},[2618],{"type":998,"value":2619},"        if",{"type":993,"tag":1026,"props":2621,"children":2622},{"style":1069},[2623],{"type":998,"value":2624}," \"2024\"",{"type":993,"tag":1026,"props":2626,"children":2627},{"style":1063},[2628],{"type":998,"value":2629}," in",{"type":993,"tag":1026,"props":2631,"children":2632},{"style":1057},[2633],{"type":998,"value":2634}," line:\n",{"type":993,"tag":1026,"props":2636,"children":2637},{"class":1028,"line":311},[2638,2643,2647,2651,2656,2660,2665,2669,2673,2677,2681,2685,2689],{"type":993,"tag":1026,"props":2639,"children":2640},{"style":1130},[2641],{"type":998,"value":2642},"            print",{"type":993,"tag":1026,"props":2644,"children":2645},{"style":1057},[2646],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2648,"children":2649},{"style":1063},[2650],{"type":998,"value":1318},{"type":993,"tag":1026,"props":2652,"children":2653},{"style":1069},[2654],{"type":998,"value":2655},"\"   Line ",{"type":993,"tag":1026,"props":2657,"children":2658},{"style":1130},[2659],{"type":998,"value":1506},{"type":993,"tag":1026,"props":2661,"children":2662},{"style":1057},[2663],{"type":998,"value":2664},"line_num",{"type":993,"tag":1026,"props":2666,"children":2667},{"style":1130},[2668],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2670,"children":2671},{"style":1069},[2672],{"type":998,"value":1520},{"type":993,"tag":1026,"props":2674,"children":2675},{"style":1130},[2676],{"type":998,"value":1506},{"type":993,"tag":1026,"props":2678,"children":2679},{"style":1057},[2680],{"type":998,"value":1529},{"type":993,"tag":1026,"props":2682,"children":2683},{"style":1130},[2684],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2686,"children":2687},{"style":1069},[2688],{"type":998,"value":1343},{"type":993,"tag":1026,"props":2690,"children":2691},{"style":1057},[2692],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2694,"children":2695},{"class":1028,"line":320},[2696],{"type":993,"tag":1026,"props":2697,"children":2698},{"emptyLinePlaceholder":13},[2699],{"type":998,"value":1043},{"type":993,"tag":1026,"props":2701,"children":2702},{"class":1028,"line":329},[2703],{"type":993,"tag":1026,"props":2704,"children":2705},{"style":1032},[2706],{"type":998,"value":2707},"# Example 3: Process diary entries\n",{"type":993,"tag":1026,"props":2709,"children":2710},{"class":1028,"line":338},[2711,2715,2719,2723,2727,2732],{"type":993,"tag":1026,"props":2712,"children":2713},{"style":1130},[2714],{"type":998,"value":1210},{"type":993,"tag":1026,"props":2716,"children":2717},{"style":1057},[2718],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2720,"children":2721},{"style":1069},[2722],{"type":998,"value":1343},{"type":993,"tag":1026,"props":2724,"children":2725},{"style":1130},[2726],{"type":998,"value":1382},{"type":993,"tag":1026,"props":2728,"children":2729},{"style":1069},[2730],{"type":998,"value":2731},"📖 Extract entries:\"",{"type":993,"tag":1026,"props":2733,"children":2734},{"style":1057},[2735],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2737,"children":2738},{"class":1028,"line":347},[2739,2743,2747,2751,2755,2759,2763,2767,2771,2775],{"type":993,"tag":1026,"props":2740,"children":2741},{"style":1063},[2742],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2744,"children":2745},{"style":1130},[2746],{"type":998,"value":1133},{"type":993,"tag":1026,"props":2748,"children":2749},{"style":1057},[2750],{"type":998,"value":1138},{"type":993,"tag":1026,"props":2752,"children":2753},{"style":1069},[2754],{"type":998,"value":2173},{"type":993,"tag":1026,"props":2756,"children":2757},{"style":1057},[2758],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2760,"children":2761},{"style":1069},[2762],{"type":998,"value":1252},{"type":993,"tag":1026,"props":2764,"children":2765},{"style":1057},[2766],{"type":998,"value":1158},{"type":993,"tag":1026,"props":2768,"children":2769},{"style":1063},[2770],{"type":998,"value":1163},{"type":993,"tag":1026,"props":2772,"children":2773},{"style":1166},[2774],{"type":998,"value":1169},{"type":993,"tag":1026,"props":2776,"children":2777},{"style":1057},[2778],{"type":998,"value":1174},{"type":993,"tag":1026,"props":2780,"children":2781},{"class":1028,"line":356},[2782,2787,2791],{"type":993,"tag":1026,"props":2783,"children":2784},{"style":1057},[2785],{"type":998,"value":2786},"    current_entry ",{"type":993,"tag":1026,"props":2788,"children":2789},{"style":1063},[2790],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2792,"children":2793},{"style":1057},[2794],{"type":998,"value":2795}," []\n",{"type":993,"tag":1026,"props":2797,"children":2798},{"class":1028,"line":365},[2799,2804,2808],{"type":993,"tag":1026,"props":2800,"children":2801},{"style":1057},[2802],{"type":998,"value":2803},"    entries ",{"type":993,"tag":1026,"props":2805,"children":2806},{"style":1063},[2807],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2809,"children":2810},{"style":1057},[2811],{"type":998,"value":2795},{"type":993,"tag":1026,"props":2813,"children":2814},{"class":1028,"line":374},[2815],{"type":993,"tag":1026,"props":2816,"children":2817},{"style":1057},[2818],{"type":998,"value":2364},{"type":993,"tag":1026,"props":2820,"children":2821},{"class":1028,"line":384},[2822,2826,2831,2835,2839],{"type":993,"tag":1026,"props":2823,"children":2824},{"style":1063},[2825],{"type":998,"value":1442},{"type":993,"tag":1026,"props":2827,"children":2828},{"style":1057},[2829],{"type":998,"value":2830}," line ",{"type":993,"tag":1026,"props":2832,"children":2833},{"style":1063},[2834],{"type":998,"value":1452},{"type":993,"tag":1026,"props":2836,"children":2837},{"style":1166},[2838],{"type":998,"value":1169},{"type":993,"tag":1026,"props":2840,"children":2841},{"style":1057},[2842],{"type":998,"value":1174},{"type":993,"tag":1026,"props":2844,"children":2845},{"class":1028,"line":393},[2846,2851,2855],{"type":993,"tag":1026,"props":2847,"children":2848},{"style":1057},[2849],{"type":998,"value":2850},"        line ",{"type":993,"tag":1026,"props":2852,"children":2853},{"style":1063},[2854],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2856,"children":2857},{"style":1057},[2858],{"type":998,"value":2859}," line.strip()\n",{"type":993,"tag":1026,"props":2861,"children":2862},{"class":1028,"line":402},[2863,2867,2871,2876,2881,2886,2890,2894,2899,2904,2908],{"type":993,"tag":1026,"props":2864,"children":2865},{"style":1063},[2866],{"type":998,"value":2619},{"type":993,"tag":1026,"props":2868,"children":2869},{"style":1057},[2870],{"type":998,"value":2830},{"type":993,"tag":1026,"props":2872,"children":2873},{"style":1063},[2874],{"type":998,"value":2875},"and",{"type":993,"tag":1026,"props":2877,"children":2878},{"style":1057},[2879],{"type":998,"value":2880}," (",{"type":993,"tag":1026,"props":2882,"children":2883},{"style":1069},[2884],{"type":998,"value":2885},"\"January\"",{"type":993,"tag":1026,"props":2887,"children":2888},{"style":1063},[2889],{"type":998,"value":2629},{"type":993,"tag":1026,"props":2891,"children":2892},{"style":1057},[2893],{"type":998,"value":2830},{"type":993,"tag":1026,"props":2895,"children":2896},{"style":1063},[2897],{"type":998,"value":2898},"or",{"type":993,"tag":1026,"props":2900,"children":2901},{"style":1069},[2902],{"type":998,"value":2903}," \"February\"",{"type":993,"tag":1026,"props":2905,"children":2906},{"style":1063},[2907],{"type":998,"value":2629},{"type":993,"tag":1026,"props":2909,"children":2910},{"style":1057},[2911],{"type":998,"value":2912}," line):\n",{"type":993,"tag":1026,"props":2914,"children":2915},{"class":1028,"line":411},[2916,2921],{"type":993,"tag":1026,"props":2917,"children":2918},{"style":1063},[2919],{"type":998,"value":2920},"            if",{"type":993,"tag":1026,"props":2922,"children":2923},{"style":1057},[2924],{"type":998,"value":2925}," current_entry:\n",{"type":993,"tag":1026,"props":2927,"children":2928},{"class":1028,"line":420},[2929],{"type":993,"tag":1026,"props":2930,"children":2931},{"style":1057},[2932],{"type":998,"value":2933},"                entries.append(current_entry)\n",{"type":993,"tag":1026,"props":2935,"children":2936},{"class":1028,"line":429},[2937,2942,2946],{"type":993,"tag":1026,"props":2938,"children":2939},{"style":1057},[2940],{"type":998,"value":2941},"            current_entry ",{"type":993,"tag":1026,"props":2943,"children":2944},{"style":1063},[2945],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2947,"children":2948},{"style":1057},[2949],{"type":998,"value":2950}," [line]\n",{"type":993,"tag":1026,"props":2952,"children":2953},{"class":1028,"line":438},[2954,2959],{"type":993,"tag":1026,"props":2955,"children":2956},{"style":1063},[2957],{"type":998,"value":2958},"        elif",{"type":993,"tag":1026,"props":2960,"children":2961},{"style":1057},[2962],{"type":998,"value":2634},{"type":993,"tag":1026,"props":2964,"children":2965},{"class":1028,"line":447},[2966],{"type":993,"tag":1026,"props":2967,"children":2968},{"style":1057},[2969],{"type":998,"value":2970},"            current_entry.append(line)\n",{"type":993,"tag":1026,"props":2972,"children":2973},{"class":1028,"line":457},[2974],{"type":993,"tag":1026,"props":2975,"children":2976},{"style":1057},[2977],{"type":998,"value":2364},{"type":993,"tag":1026,"props":2979,"children":2980},{"class":1028,"line":466},[2981,2986],{"type":993,"tag":1026,"props":2982,"children":2983},{"style":1063},[2984],{"type":998,"value":2985},"    if",{"type":993,"tag":1026,"props":2987,"children":2988},{"style":1057},[2989],{"type":998,"value":2925},{"type":993,"tag":1026,"props":2991,"children":2992},{"class":1028,"line":475},[2993],{"type":993,"tag":1026,"props":2994,"children":2995},{"style":1057},[2996],{"type":998,"value":2997},"        entries.append(current_entry)\n",{"type":993,"tag":1026,"props":2999,"children":3000},{"class":1028,"line":484},[3001],{"type":993,"tag":1026,"props":3002,"children":3003},{"style":1057},[3004],{"type":998,"value":2364},{"type":993,"tag":1026,"props":3006,"children":3007},{"class":1028,"line":493},[3008,3012,3017,3021,3025,3030,3034],{"type":993,"tag":1026,"props":3009,"children":3010},{"style":1063},[3011],{"type":998,"value":1442},{"type":993,"tag":1026,"props":3013,"children":3014},{"style":1057},[3015],{"type":998,"value":3016}," i, entry ",{"type":993,"tag":1026,"props":3018,"children":3019},{"style":1063},[3020],{"type":998,"value":1452},{"type":993,"tag":1026,"props":3022,"children":3023},{"style":1130},[3024],{"type":998,"value":1457},{"type":993,"tag":1026,"props":3026,"children":3027},{"style":1057},[3028],{"type":998,"value":3029},"(entries, ",{"type":993,"tag":1026,"props":3031,"children":3032},{"style":1130},[3033],{"type":998,"value":1475},{"type":993,"tag":1026,"props":3035,"children":3036},{"style":1057},[3037],{"type":998,"value":1480},{"type":993,"tag":1026,"props":3039,"children":3040},{"class":1028,"line":502},[3041,3045,3049,3053,3058,3062,3066,3070,3074,3078,3083,3088,3093,3097,3101],{"type":993,"tag":1026,"props":3042,"children":3043},{"style":1130},[3044],{"type":998,"value":1488},{"type":993,"tag":1026,"props":3046,"children":3047},{"style":1057},[3048],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3050,"children":3051},{"style":1063},[3052],{"type":998,"value":1318},{"type":993,"tag":1026,"props":3054,"children":3055},{"style":1069},[3056],{"type":998,"value":3057},"\"   Entry ",{"type":993,"tag":1026,"props":3059,"children":3060},{"style":1130},[3061],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3063,"children":3064},{"style":1057},[3065],{"type":998,"value":1765},{"type":993,"tag":1026,"props":3067,"children":3068},{"style":1130},[3069],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3071,"children":3072},{"style":1069},[3073],{"type":998,"value":1520},{"type":993,"tag":1026,"props":3075,"children":3076},{"style":1130},[3077],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3079,"children":3080},{"style":1057},[3081],{"type":998,"value":3082},"entry[",{"type":993,"tag":1026,"props":3084,"children":3085},{"style":1130},[3086],{"type":998,"value":3087},"0",{"type":993,"tag":1026,"props":3089,"children":3090},{"style":1057},[3091],{"type":998,"value":3092},"]",{"type":993,"tag":1026,"props":3094,"children":3095},{"style":1130},[3096],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3098,"children":3099},{"style":1069},[3100],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3102,"children":3103},{"style":1057},[3104],{"type":998,"value":1224},{"type":993,"tag":2023,"props":3106,"children":3108},{"id":3107},"structured-text-files",[3109],{"type":998,"value":3110},"📊 Structured Text Files",{"type":993,"tag":1001,"props":3112,"children":3113},{},[3114],{"type":998,"value":3115},"CSV files and other structured formats need special handling to extract data properly.",{"type":993,"tag":1012,"props":3117,"children":3118},{},[3119],{"type":993,"tag":1016,"props":3120,"children":3122},{"className":1018,"code":3121,"language":6,"meta":8,"style":8},"# 📊 CSV File Processing\n\n# Create sample employee data\ncsv_content = \"\"\"Name,Age,City,Job\nAlice Johnson,28,New York,Engineer\nBob Smith,34,Los Angeles,Designer\nCarol Davis,26,Chicago,Teacher\nDavid Wilson,31,Houston,Analyst\"\"\"\n\nwith open(\"employees.csv\", \"w\") as file:\n    file.write(csv_content)\n\nprint(\"👥 Processing Employee Data:\")\nprint(\"-\" * 35)\n\nwith open(\"employees.csv\", \"r\") as file:\n    # Read header line\n    header = file.readline().strip().split(',')\n    print(f\"📋 Columns: {', '.join(header)}\")\n    \n    # Process data lines\n    employees = []\n    for line_num, line in enumerate(file, 2):\n        if line.strip():  # Skip empty lines\n            data = line.strip().split(',')\n            if len(data) == len(header):\n                employee = dict(zip(header, data))\n                employees.append(employee)\n            else:\n                print(f\"⚠️ Line {line_num}: Wrong number of fields\")\n\nprint(f\"\\n✅ Loaded {len(employees)} employees:\")\nfor emp in employees:\n    print(f\"   {emp['Name']} ({emp['Age']}) - {emp['Job']} in {emp['City']}\")\n\n# Simple analysis\nages = [int(emp['Age']) for emp in employees]\nprint(f\"\\n📈 Average age: {sum(ages) / len(ages):.1f} years\")\n",[3123],{"type":993,"tag":1022,"props":3124,"children":3125},{"__ignoreMap":8},[3126,3134,3141,3149,3166,3174,3182,3190,3198,3205,3249,3261,3268,3288,3318,3325,3368,3376,3406,3452,3459,3467,3483,3523,3540,3565,3595,3626,3634,3646,3688,3695,3745,3767,3894,3901,3909,3962],{"type":993,"tag":1026,"props":3127,"children":3128},{"class":1028,"line":12},[3129],{"type":993,"tag":1026,"props":3130,"children":3131},{"style":1032},[3132],{"type":998,"value":3133},"# 📊 CSV File Processing\n",{"type":993,"tag":1026,"props":3135,"children":3136},{"class":1028,"line":27},[3137],{"type":993,"tag":1026,"props":3138,"children":3139},{"emptyLinePlaceholder":13},[3140],{"type":998,"value":1043},{"type":993,"tag":1026,"props":3142,"children":3143},{"class":1028,"line":36},[3144],{"type":993,"tag":1026,"props":3145,"children":3146},{"style":1032},[3147],{"type":998,"value":3148},"# Create sample employee data\n",{"type":993,"tag":1026,"props":3150,"children":3151},{"class":1028,"line":45},[3152,3157,3161],{"type":993,"tag":1026,"props":3153,"children":3154},{"style":1057},[3155],{"type":998,"value":3156},"csv_content ",{"type":993,"tag":1026,"props":3158,"children":3159},{"style":1063},[3160],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3162,"children":3163},{"style":1069},[3164],{"type":998,"value":3165}," \"\"\"Name,Age,City,Job\n",{"type":993,"tag":1026,"props":3167,"children":3168},{"class":1028,"line":54},[3169],{"type":993,"tag":1026,"props":3170,"children":3171},{"style":1069},[3172],{"type":998,"value":3173},"Alice Johnson,28,New York,Engineer\n",{"type":993,"tag":1026,"props":3175,"children":3176},{"class":1028,"line":63},[3177],{"type":993,"tag":1026,"props":3178,"children":3179},{"style":1069},[3180],{"type":998,"value":3181},"Bob Smith,34,Los Angeles,Designer\n",{"type":993,"tag":1026,"props":3183,"children":3184},{"class":1028,"line":72},[3185],{"type":993,"tag":1026,"props":3186,"children":3187},{"style":1069},[3188],{"type":998,"value":3189},"Carol Davis,26,Chicago,Teacher\n",{"type":993,"tag":1026,"props":3191,"children":3192},{"class":1028,"line":81},[3193],{"type":993,"tag":1026,"props":3194,"children":3195},{"style":1069},[3196],{"type":998,"value":3197},"David Wilson,31,Houston,Analyst\"\"\"\n",{"type":993,"tag":1026,"props":3199,"children":3200},{"class":1028,"line":91},[3201],{"type":993,"tag":1026,"props":3202,"children":3203},{"emptyLinePlaceholder":13},[3204],{"type":998,"value":1043},{"type":993,"tag":1026,"props":3206,"children":3207},{"class":1028,"line":100},[3208,3212,3216,3220,3225,3229,3233,3237,3241,3245],{"type":993,"tag":1026,"props":3209,"children":3210},{"style":1063},[3211],{"type":998,"value":1127},{"type":993,"tag":1026,"props":3213,"children":3214},{"style":1130},[3215],{"type":998,"value":1133},{"type":993,"tag":1026,"props":3217,"children":3218},{"style":1057},[3219],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3221,"children":3222},{"style":1069},[3223],{"type":998,"value":3224},"\"employees.csv\"",{"type":993,"tag":1026,"props":3226,"children":3227},{"style":1057},[3228],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3230,"children":3231},{"style":1069},[3232],{"type":998,"value":1153},{"type":993,"tag":1026,"props":3234,"children":3235},{"style":1057},[3236],{"type":998,"value":1158},{"type":993,"tag":1026,"props":3238,"children":3239},{"style":1063},[3240],{"type":998,"value":1163},{"type":993,"tag":1026,"props":3242,"children":3243},{"style":1166},[3244],{"type":998,"value":1169},{"type":993,"tag":1026,"props":3246,"children":3247},{"style":1057},[3248],{"type":998,"value":1174},{"type":993,"tag":1026,"props":3250,"children":3251},{"class":1028,"line":109},[3252,3256],{"type":993,"tag":1026,"props":3253,"children":3254},{"style":1166},[3255],{"type":998,"value":1182},{"type":993,"tag":1026,"props":3257,"children":3258},{"style":1057},[3259],{"type":998,"value":3260},".write(csv_content)\n",{"type":993,"tag":1026,"props":3262,"children":3263},{"class":1028,"line":118},[3264],{"type":993,"tag":1026,"props":3265,"children":3266},{"emptyLinePlaceholder":13},[3267],{"type":998,"value":1043},{"type":993,"tag":1026,"props":3269,"children":3270},{"class":1028,"line":127},[3271,3275,3279,3284],{"type":993,"tag":1026,"props":3272,"children":3273},{"style":1130},[3274],{"type":998,"value":1210},{"type":993,"tag":1026,"props":3276,"children":3277},{"style":1057},[3278],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3280,"children":3281},{"style":1069},[3282],{"type":998,"value":3283},"\"👥 Processing Employee Data:\"",{"type":993,"tag":1026,"props":3285,"children":3286},{"style":1057},[3287],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3289,"children":3290},{"class":1028,"line":136},[3291,3295,3299,3304,3309,3314],{"type":993,"tag":1026,"props":3292,"children":3293},{"style":1130},[3294],{"type":998,"value":1210},{"type":993,"tag":1026,"props":3296,"children":3297},{"style":1057},[3298],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3300,"children":3301},{"style":1069},[3302],{"type":998,"value":3303},"\"-\"",{"type":993,"tag":1026,"props":3305,"children":3306},{"style":1063},[3307],{"type":998,"value":3308}," *",{"type":993,"tag":1026,"props":3310,"children":3311},{"style":1130},[3312],{"type":998,"value":3313}," 35",{"type":993,"tag":1026,"props":3315,"children":3316},{"style":1057},[3317],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3319,"children":3320},{"class":1028,"line":146},[3321],{"type":993,"tag":1026,"props":3322,"children":3323},{"emptyLinePlaceholder":13},[3324],{"type":998,"value":1043},{"type":993,"tag":1026,"props":3326,"children":3327},{"class":1028,"line":155},[3328,3332,3336,3340,3344,3348,3352,3356,3360,3364],{"type":993,"tag":1026,"props":3329,"children":3330},{"style":1063},[3331],{"type":998,"value":1127},{"type":993,"tag":1026,"props":3333,"children":3334},{"style":1130},[3335],{"type":998,"value":1133},{"type":993,"tag":1026,"props":3337,"children":3338},{"style":1057},[3339],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3341,"children":3342},{"style":1069},[3343],{"type":998,"value":3224},{"type":993,"tag":1026,"props":3345,"children":3346},{"style":1057},[3347],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3349,"children":3350},{"style":1069},[3351],{"type":998,"value":1252},{"type":993,"tag":1026,"props":3353,"children":3354},{"style":1057},[3355],{"type":998,"value":1158},{"type":993,"tag":1026,"props":3357,"children":3358},{"style":1063},[3359],{"type":998,"value":1163},{"type":993,"tag":1026,"props":3361,"children":3362},{"style":1166},[3363],{"type":998,"value":1169},{"type":993,"tag":1026,"props":3365,"children":3366},{"style":1057},[3367],{"type":998,"value":1174},{"type":993,"tag":1026,"props":3369,"children":3370},{"class":1028,"line":164},[3371],{"type":993,"tag":1026,"props":3372,"children":3373},{"style":1032},[3374],{"type":998,"value":3375},"    # Read header line\n",{"type":993,"tag":1026,"props":3377,"children":3378},{"class":1028,"line":173},[3379,3384,3388,3392,3397,3402],{"type":993,"tag":1026,"props":3380,"children":3381},{"style":1057},[3382],{"type":998,"value":3383},"    header ",{"type":993,"tag":1026,"props":3385,"children":3386},{"style":1063},[3387],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3389,"children":3390},{"style":1166},[3391],{"type":998,"value":1169},{"type":993,"tag":1026,"props":3393,"children":3394},{"style":1057},[3395],{"type":998,"value":3396},".readline().strip().split(",{"type":993,"tag":1026,"props":3398,"children":3399},{"style":1069},[3400],{"type":998,"value":3401},"','",{"type":993,"tag":1026,"props":3403,"children":3404},{"style":1057},[3405],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3407,"children":3408},{"class":1028,"line":182},[3409,3413,3417,3421,3426,3430,3435,3440,3444,3448],{"type":993,"tag":1026,"props":3410,"children":3411},{"style":1130},[3412],{"type":998,"value":1297},{"type":993,"tag":1026,"props":3414,"children":3415},{"style":1057},[3416],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3418,"children":3419},{"style":1063},[3420],{"type":998,"value":1318},{"type":993,"tag":1026,"props":3422,"children":3423},{"style":1069},[3424],{"type":998,"value":3425},"\"📋 Columns: ",{"type":993,"tag":1026,"props":3427,"children":3428},{"style":1130},[3429],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3431,"children":3432},{"style":1069},[3433],{"type":998,"value":3434},"', '",{"type":993,"tag":1026,"props":3436,"children":3437},{"style":1057},[3438],{"type":998,"value":3439},".join(header)",{"type":993,"tag":1026,"props":3441,"children":3442},{"style":1130},[3443],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3445,"children":3446},{"style":1069},[3447],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3449,"children":3450},{"style":1057},[3451],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3453,"children":3454},{"class":1028,"line":191},[3455],{"type":993,"tag":1026,"props":3456,"children":3457},{"style":1057},[3458],{"type":998,"value":2364},{"type":993,"tag":1026,"props":3460,"children":3461},{"class":1028,"line":201},[3462],{"type":993,"tag":1026,"props":3463,"children":3464},{"style":1032},[3465],{"type":998,"value":3466},"    # Process data lines\n",{"type":993,"tag":1026,"props":3468,"children":3469},{"class":1028,"line":210},[3470,3475,3479],{"type":993,"tag":1026,"props":3471,"children":3472},{"style":1057},[3473],{"type":998,"value":3474},"    employees ",{"type":993,"tag":1026,"props":3476,"children":3477},{"style":1063},[3478],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3480,"children":3481},{"style":1057},[3482],{"type":998,"value":2795},{"type":993,"tag":1026,"props":3484,"children":3485},{"class":1028,"line":219},[3486,3490,3494,3498,3502,3506,3510,3514,3519],{"type":993,"tag":1026,"props":3487,"children":3488},{"style":1063},[3489],{"type":998,"value":1442},{"type":993,"tag":1026,"props":3491,"children":3492},{"style":1057},[3493],{"type":998,"value":2583},{"type":993,"tag":1026,"props":3495,"children":3496},{"style":1063},[3497],{"type":998,"value":1452},{"type":993,"tag":1026,"props":3499,"children":3500},{"style":1130},[3501],{"type":998,"value":1457},{"type":993,"tag":1026,"props":3503,"children":3504},{"style":1057},[3505],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3507,"children":3508},{"style":1166},[3509],{"type":998,"value":1466},{"type":993,"tag":1026,"props":3511,"children":3512},{"style":1057},[3513],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3515,"children":3516},{"style":1130},[3517],{"type":998,"value":3518},"2",{"type":993,"tag":1026,"props":3520,"children":3521},{"style":1057},[3522],{"type":998,"value":1480},{"type":993,"tag":1026,"props":3524,"children":3525},{"class":1028,"line":228},[3526,3530,3535],{"type":993,"tag":1026,"props":3527,"children":3528},{"style":1063},[3529],{"type":998,"value":2619},{"type":993,"tag":1026,"props":3531,"children":3532},{"style":1057},[3533],{"type":998,"value":3534}," line.strip():  ",{"type":993,"tag":1026,"props":3536,"children":3537},{"style":1032},[3538],{"type":998,"value":3539},"# Skip empty lines\n",{"type":993,"tag":1026,"props":3541,"children":3542},{"class":1028,"line":238},[3543,3548,3552,3557,3561],{"type":993,"tag":1026,"props":3544,"children":3545},{"style":1057},[3546],{"type":998,"value":3547},"            data ",{"type":993,"tag":1026,"props":3549,"children":3550},{"style":1063},[3551],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3553,"children":3554},{"style":1057},[3555],{"type":998,"value":3556}," line.strip().split(",{"type":993,"tag":1026,"props":3558,"children":3559},{"style":1069},[3560],{"type":998,"value":3401},{"type":993,"tag":1026,"props":3562,"children":3563},{"style":1057},[3564],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3566,"children":3567},{"class":1028,"line":247},[3568,3572,3576,3581,3586,3590],{"type":993,"tag":1026,"props":3569,"children":3570},{"style":1063},[3571],{"type":998,"value":2920},{"type":993,"tag":1026,"props":3573,"children":3574},{"style":1130},[3575],{"type":998,"value":1732},{"type":993,"tag":1026,"props":3577,"children":3578},{"style":1057},[3579],{"type":998,"value":3580},"(data) ",{"type":993,"tag":1026,"props":3582,"children":3583},{"style":1063},[3584],{"type":998,"value":3585},"==",{"type":993,"tag":1026,"props":3587,"children":3588},{"style":1130},[3589],{"type":998,"value":1732},{"type":993,"tag":1026,"props":3591,"children":3592},{"style":1057},[3593],{"type":998,"value":3594},"(header):\n",{"type":993,"tag":1026,"props":3596,"children":3597},{"class":1028,"line":256},[3598,3603,3607,3612,3616,3621],{"type":993,"tag":1026,"props":3599,"children":3600},{"style":1057},[3601],{"type":998,"value":3602},"                employee ",{"type":993,"tag":1026,"props":3604,"children":3605},{"style":1063},[3606],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3608,"children":3609},{"style":1130},[3610],{"type":998,"value":3611}," dict",{"type":993,"tag":1026,"props":3613,"children":3614},{"style":1057},[3615],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3617,"children":3618},{"style":1130},[3619],{"type":998,"value":3620},"zip",{"type":993,"tag":1026,"props":3622,"children":3623},{"style":1057},[3624],{"type":998,"value":3625},"(header, data))\n",{"type":993,"tag":1026,"props":3627,"children":3628},{"class":1028,"line":265},[3629],{"type":993,"tag":1026,"props":3630,"children":3631},{"style":1057},[3632],{"type":998,"value":3633},"                employees.append(employee)\n",{"type":993,"tag":1026,"props":3635,"children":3636},{"class":1028,"line":274},[3637,3642],{"type":993,"tag":1026,"props":3638,"children":3639},{"style":1063},[3640],{"type":998,"value":3641},"            else",{"type":993,"tag":1026,"props":3643,"children":3644},{"style":1057},[3645],{"type":998,"value":1174},{"type":993,"tag":1026,"props":3647,"children":3648},{"class":1028,"line":284},[3649,3654,3658,3662,3667,3671,3675,3679,3684],{"type":993,"tag":1026,"props":3650,"children":3651},{"style":1130},[3652],{"type":998,"value":3653},"                print",{"type":993,"tag":1026,"props":3655,"children":3656},{"style":1057},[3657],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3659,"children":3660},{"style":1063},[3661],{"type":998,"value":1318},{"type":993,"tag":1026,"props":3663,"children":3664},{"style":1069},[3665],{"type":998,"value":3666},"\"⚠️ Line ",{"type":993,"tag":1026,"props":3668,"children":3669},{"style":1130},[3670],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3672,"children":3673},{"style":1057},[3674],{"type":998,"value":2664},{"type":993,"tag":1026,"props":3676,"children":3677},{"style":1130},[3678],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3680,"children":3681},{"style":1069},[3682],{"type":998,"value":3683},": Wrong number of fields\"",{"type":993,"tag":1026,"props":3685,"children":3686},{"style":1057},[3687],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3689,"children":3690},{"class":1028,"line":293},[3691],{"type":993,"tag":1026,"props":3692,"children":3693},{"emptyLinePlaceholder":13},[3694],{"type":998,"value":1043},{"type":993,"tag":1026,"props":3696,"children":3697},{"class":1028,"line":302},[3698,3702,3706,3710,3714,3718,3723,3727,3732,3736,3741],{"type":993,"tag":1026,"props":3699,"children":3700},{"style":1130},[3701],{"type":998,"value":1210},{"type":993,"tag":1026,"props":3703,"children":3704},{"style":1057},[3705],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3707,"children":3708},{"style":1063},[3709],{"type":998,"value":1318},{"type":993,"tag":1026,"props":3711,"children":3712},{"style":1069},[3713],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3715,"children":3716},{"style":1130},[3717],{"type":998,"value":1382},{"type":993,"tag":1026,"props":3719,"children":3720},{"style":1069},[3721],{"type":998,"value":3722},"✅ Loaded ",{"type":993,"tag":1026,"props":3724,"children":3725},{"style":1130},[3726],{"type":998,"value":1328},{"type":993,"tag":1026,"props":3728,"children":3729},{"style":1057},[3730],{"type":998,"value":3731},"(employees)",{"type":993,"tag":1026,"props":3733,"children":3734},{"style":1130},[3735],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3737,"children":3738},{"style":1069},[3739],{"type":998,"value":3740}," employees:\"",{"type":993,"tag":1026,"props":3742,"children":3743},{"style":1057},[3744],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3746,"children":3747},{"class":1028,"line":311},[3748,3753,3758,3762],{"type":993,"tag":1026,"props":3749,"children":3750},{"style":1063},[3751],{"type":998,"value":3752},"for",{"type":993,"tag":1026,"props":3754,"children":3755},{"style":1057},[3756],{"type":998,"value":3757}," emp ",{"type":993,"tag":1026,"props":3759,"children":3760},{"style":1063},[3761],{"type":998,"value":1452},{"type":993,"tag":1026,"props":3763,"children":3764},{"style":1057},[3765],{"type":998,"value":3766}," employees:\n",{"type":993,"tag":1026,"props":3768,"children":3769},{"class":1028,"line":320},[3770,3774,3778,3782,3787,3791,3796,3801,3805,3809,3813,3817,3821,3826,3830,3834,3839,3843,3847,3852,3856,3860,3865,3869,3873,3878,3882,3886,3890],{"type":993,"tag":1026,"props":3771,"children":3772},{"style":1130},[3773],{"type":998,"value":1297},{"type":993,"tag":1026,"props":3775,"children":3776},{"style":1057},[3777],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3779,"children":3780},{"style":1063},[3781],{"type":998,"value":1318},{"type":993,"tag":1026,"props":3783,"children":3784},{"style":1069},[3785],{"type":998,"value":3786},"\"   ",{"type":993,"tag":1026,"props":3788,"children":3789},{"style":1130},[3790],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3792,"children":3793},{"style":1057},[3794],{"type":998,"value":3795},"emp[",{"type":993,"tag":1026,"props":3797,"children":3798},{"style":1069},[3799],{"type":998,"value":3800},"'Name'",{"type":993,"tag":1026,"props":3802,"children":3803},{"style":1057},[3804],{"type":998,"value":3092},{"type":993,"tag":1026,"props":3806,"children":3807},{"style":1130},[3808],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3810,"children":3811},{"style":1069},[3812],{"type":998,"value":2880},{"type":993,"tag":1026,"props":3814,"children":3815},{"style":1130},[3816],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3818,"children":3819},{"style":1057},[3820],{"type":998,"value":3795},{"type":993,"tag":1026,"props":3822,"children":3823},{"style":1069},[3824],{"type":998,"value":3825},"'Age'",{"type":993,"tag":1026,"props":3827,"children":3828},{"style":1057},[3829],{"type":998,"value":3092},{"type":993,"tag":1026,"props":3831,"children":3832},{"style":1130},[3833],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3835,"children":3836},{"style":1069},[3837],{"type":998,"value":3838},") - ",{"type":993,"tag":1026,"props":3840,"children":3841},{"style":1130},[3842],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3844,"children":3845},{"style":1057},[3846],{"type":998,"value":3795},{"type":993,"tag":1026,"props":3848,"children":3849},{"style":1069},[3850],{"type":998,"value":3851},"'Job'",{"type":993,"tag":1026,"props":3853,"children":3854},{"style":1057},[3855],{"type":998,"value":3092},{"type":993,"tag":1026,"props":3857,"children":3858},{"style":1130},[3859],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3861,"children":3862},{"style":1069},[3863],{"type":998,"value":3864}," in ",{"type":993,"tag":1026,"props":3866,"children":3867},{"style":1130},[3868],{"type":998,"value":1506},{"type":993,"tag":1026,"props":3870,"children":3871},{"style":1057},[3872],{"type":998,"value":3795},{"type":993,"tag":1026,"props":3874,"children":3875},{"style":1069},[3876],{"type":998,"value":3877},"'City'",{"type":993,"tag":1026,"props":3879,"children":3880},{"style":1057},[3881],{"type":998,"value":3092},{"type":993,"tag":1026,"props":3883,"children":3884},{"style":1130},[3885],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3887,"children":3888},{"style":1069},[3889],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3891,"children":3892},{"style":1057},[3893],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3895,"children":3896},{"class":1028,"line":329},[3897],{"type":993,"tag":1026,"props":3898,"children":3899},{"emptyLinePlaceholder":13},[3900],{"type":998,"value":1043},{"type":993,"tag":1026,"props":3902,"children":3903},{"class":1028,"line":338},[3904],{"type":993,"tag":1026,"props":3905,"children":3906},{"style":1032},[3907],{"type":998,"value":3908},"# Simple analysis\n",{"type":993,"tag":1026,"props":3910,"children":3911},{"class":1028,"line":347},[3912,3917,3921,3926,3931,3936,3940,3945,3949,3953,3957],{"type":993,"tag":1026,"props":3913,"children":3914},{"style":1057},[3915],{"type":998,"value":3916},"ages ",{"type":993,"tag":1026,"props":3918,"children":3919},{"style":1063},[3920],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3922,"children":3923},{"style":1057},[3924],{"type":998,"value":3925}," [",{"type":993,"tag":1026,"props":3927,"children":3928},{"style":1130},[3929],{"type":998,"value":3930},"int",{"type":993,"tag":1026,"props":3932,"children":3933},{"style":1057},[3934],{"type":998,"value":3935},"(emp[",{"type":993,"tag":1026,"props":3937,"children":3938},{"style":1069},[3939],{"type":998,"value":3825},{"type":993,"tag":1026,"props":3941,"children":3942},{"style":1057},[3943],{"type":998,"value":3944},"]) ",{"type":993,"tag":1026,"props":3946,"children":3947},{"style":1063},[3948],{"type":998,"value":3752},{"type":993,"tag":1026,"props":3950,"children":3951},{"style":1057},[3952],{"type":998,"value":3757},{"type":993,"tag":1026,"props":3954,"children":3955},{"style":1063},[3956],{"type":998,"value":1452},{"type":993,"tag":1026,"props":3958,"children":3959},{"style":1057},[3960],{"type":998,"value":3961}," employees]\n",{"type":993,"tag":1026,"props":3963,"children":3964},{"class":1028,"line":356},[3965,3969,3973,3977,3981,3985,3990,3995,4000,4005,4009,4014,4019,4023,4028],{"type":993,"tag":1026,"props":3966,"children":3967},{"style":1130},[3968],{"type":998,"value":1210},{"type":993,"tag":1026,"props":3970,"children":3971},{"style":1057},[3972],{"type":998,"value":1138},{"type":993,"tag":1026,"props":3974,"children":3975},{"style":1063},[3976],{"type":998,"value":1318},{"type":993,"tag":1026,"props":3978,"children":3979},{"style":1069},[3980],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3982,"children":3983},{"style":1130},[3984],{"type":998,"value":1382},{"type":993,"tag":1026,"props":3986,"children":3987},{"style":1069},[3988],{"type":998,"value":3989},"📈 Average age: ",{"type":993,"tag":1026,"props":3991,"children":3992},{"style":1130},[3993],{"type":998,"value":3994},"{sum",{"type":993,"tag":1026,"props":3996,"children":3997},{"style":1057},[3998],{"type":998,"value":3999},"(ages) ",{"type":993,"tag":1026,"props":4001,"children":4002},{"style":1063},[4003],{"type":998,"value":4004},"/",{"type":993,"tag":1026,"props":4006,"children":4007},{"style":1130},[4008],{"type":998,"value":1732},{"type":993,"tag":1026,"props":4010,"children":4011},{"style":1057},[4012],{"type":998,"value":4013},"(ages)",{"type":993,"tag":1026,"props":4015,"children":4016},{"style":1063},[4017],{"type":998,"value":4018},":.1f",{"type":993,"tag":1026,"props":4020,"children":4021},{"style":1130},[4022],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4024,"children":4025},{"style":1069},[4026],{"type":998,"value":4027}," years\"",{"type":993,"tag":1026,"props":4029,"children":4030},{"style":1057},[4031],{"type":998,"value":1224},{"type":993,"tag":2023,"props":4033,"children":4035},{"id":4034},"large-file-handling",[4036],{"type":998,"value":4037},"🔍 Large File Handling",{"type":993,"tag":1001,"props":4039,"children":4040},{},[4041],{"type":998,"value":4042},"For large files, memory-efficient reading is crucial to prevent your program from using too much RAM.",{"type":993,"tag":1012,"props":4044,"children":4045},{},[4046],{"type":993,"tag":1016,"props":4047,"children":4049},{"className":1018,"code":4048,"language":6,"meta":8,"style":8},"# 🗂️ Memory-Efficient Large File Processing\n\n# Create a larger sample file\nprint(\"📝 Creating sample log file...\")\nwith open(\"large_log.txt\", \"w\") as file:\n    for i in range(1000):\n        file.write(f\"2024-01-15 10:{i:02d}:30 INFO User {i%10} logged in\\n\")\n        file.write(f\"2024-01-15 10:{i:02d}:45 DEBUG Processing request {i}\\n\")\n\nprint(\"📊 Processing large file efficiently:\")\n\n# Method 1: Memory-efficient counting\nline_count = 0\nerror_count = 0\nuser_logins = {}\n\nwith open(\"large_log.txt\", \"r\") as file:\n    for line in file:\n        line_count += 1\n        \n        if \"ERROR\" in line:\n            error_count += 1\n        \n        if \"logged in\" in line:\n            # Extract user number\n            parts = line.split()\n            if len(parts) > 4:\n                user = parts[4]\n                user_logins[user] = user_logins.get(user, 0) + 1\n\nprint(f\"   📈 Total lines: {line_count}\")\nprint(f\"   ❌ Errors found: {error_count}\")\nprint(f\"   👤 Unique users: {len(user_logins)}\")\nprint(f\"   🔄 Most active user: {max(user_logins.items(), key=lambda x: x[1])}\")\n\n# Method 2: Process in chunks\nprint(\"\\n🔍 Finding specific patterns:\")\nsearch_term = \"User 5\"\nmatches = []\n\nwith open(\"large_log.txt\", \"r\") as file:\n    for line_num, line in enumerate(file, 1):\n        if search_term in line:\n            matches.append((line_num, line.strip()))\n        \n        # Stop after finding 5 matches for demo\n        if len(matches) >= 5:\n            break\n\nprint(f\"   Found {len(matches)} matches for '{search_term}':\")\nfor line_num, content in matches:\n    print(f\"   Line {line_num}: {content}\")\n",[4050],{"type":993,"tag":1022,"props":4051,"children":4052},{"__ignoreMap":8},[4053,4061,4068,4076,4096,4140,4174,4253,4314,4321,4341,4348,4356,4373,4389,4406,4413,4456,4479,4497,4505,4525,4541,4548,4568,4576,4593,4623,4650,4683,4690,4731,4772,4813,4879,4886,4894,4922,4939,4955,4962,5005,5044,5064,5072,5079,5087,5117,5125,5132,5192,5213],{"type":993,"tag":1026,"props":4054,"children":4055},{"class":1028,"line":12},[4056],{"type":993,"tag":1026,"props":4057,"children":4058},{"style":1032},[4059],{"type":998,"value":4060},"# 🗂️ Memory-Efficient Large File Processing\n",{"type":993,"tag":1026,"props":4062,"children":4063},{"class":1028,"line":27},[4064],{"type":993,"tag":1026,"props":4065,"children":4066},{"emptyLinePlaceholder":13},[4067],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4069,"children":4070},{"class":1028,"line":36},[4071],{"type":993,"tag":1026,"props":4072,"children":4073},{"style":1032},[4074],{"type":998,"value":4075},"# Create a larger sample file\n",{"type":993,"tag":1026,"props":4077,"children":4078},{"class":1028,"line":45},[4079,4083,4087,4092],{"type":993,"tag":1026,"props":4080,"children":4081},{"style":1130},[4082],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4084,"children":4085},{"style":1057},[4086],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4088,"children":4089},{"style":1069},[4090],{"type":998,"value":4091},"\"📝 Creating sample log file...\"",{"type":993,"tag":1026,"props":4093,"children":4094},{"style":1057},[4095],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4097,"children":4098},{"class":1028,"line":54},[4099,4103,4107,4111,4116,4120,4124,4128,4132,4136],{"type":993,"tag":1026,"props":4100,"children":4101},{"style":1063},[4102],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4104,"children":4105},{"style":1130},[4106],{"type":998,"value":1133},{"type":993,"tag":1026,"props":4108,"children":4109},{"style":1057},[4110],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4112,"children":4113},{"style":1069},[4114],{"type":998,"value":4115},"\"large_log.txt\"",{"type":993,"tag":1026,"props":4117,"children":4118},{"style":1057},[4119],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4121,"children":4122},{"style":1069},[4123],{"type":998,"value":1153},{"type":993,"tag":1026,"props":4125,"children":4126},{"style":1057},[4127],{"type":998,"value":1158},{"type":993,"tag":1026,"props":4129,"children":4130},{"style":1063},[4131],{"type":998,"value":1163},{"type":993,"tag":1026,"props":4133,"children":4134},{"style":1166},[4135],{"type":998,"value":1169},{"type":993,"tag":1026,"props":4137,"children":4138},{"style":1057},[4139],{"type":998,"value":1174},{"type":993,"tag":1026,"props":4141,"children":4142},{"class":1028,"line":63},[4143,4147,4152,4156,4161,4165,4170],{"type":993,"tag":1026,"props":4144,"children":4145},{"style":1063},[4146],{"type":998,"value":1442},{"type":993,"tag":1026,"props":4148,"children":4149},{"style":1057},[4150],{"type":998,"value":4151}," i ",{"type":993,"tag":1026,"props":4153,"children":4154},{"style":1063},[4155],{"type":998,"value":1452},{"type":993,"tag":1026,"props":4157,"children":4158},{"style":1130},[4159],{"type":998,"value":4160}," range",{"type":993,"tag":1026,"props":4162,"children":4163},{"style":1057},[4164],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4166,"children":4167},{"style":1130},[4168],{"type":998,"value":4169},"1000",{"type":993,"tag":1026,"props":4171,"children":4172},{"style":1057},[4173],{"type":998,"value":1480},{"type":993,"tag":1026,"props":4175,"children":4176},{"class":1028,"line":72},[4177,4182,4187,4191,4196,4200,4204,4209,4213,4218,4222,4226,4231,4236,4241,4245,4249],{"type":993,"tag":1026,"props":4178,"children":4179},{"style":1166},[4180],{"type":998,"value":4181},"        file",{"type":993,"tag":1026,"props":4183,"children":4184},{"style":1057},[4185],{"type":998,"value":4186},".write(",{"type":993,"tag":1026,"props":4188,"children":4189},{"style":1063},[4190],{"type":998,"value":1318},{"type":993,"tag":1026,"props":4192,"children":4193},{"style":1069},[4194],{"type":998,"value":4195},"\"2024-01-15 10:",{"type":993,"tag":1026,"props":4197,"children":4198},{"style":1130},[4199],{"type":998,"value":1506},{"type":993,"tag":1026,"props":4201,"children":4202},{"style":1057},[4203],{"type":998,"value":1765},{"type":993,"tag":1026,"props":4205,"children":4206},{"style":1063},[4207],{"type":998,"value":4208},":02d",{"type":993,"tag":1026,"props":4210,"children":4211},{"style":1130},[4212],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4214,"children":4215},{"style":1069},[4216],{"type":998,"value":4217},":30 INFO User ",{"type":993,"tag":1026,"props":4219,"children":4220},{"style":1130},[4221],{"type":998,"value":1506},{"type":993,"tag":1026,"props":4223,"children":4224},{"style":1057},[4225],{"type":998,"value":1765},{"type":993,"tag":1026,"props":4227,"children":4228},{"style":1063},[4229],{"type":998,"value":4230},"%",{"type":993,"tag":1026,"props":4232,"children":4233},{"style":1130},[4234],{"type":998,"value":4235},"10}",{"type":993,"tag":1026,"props":4237,"children":4238},{"style":1069},[4239],{"type":998,"value":4240}," logged in",{"type":993,"tag":1026,"props":4242,"children":4243},{"style":1130},[4244],{"type":998,"value":1382},{"type":993,"tag":1026,"props":4246,"children":4247},{"style":1069},[4248],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4250,"children":4251},{"style":1057},[4252],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4254,"children":4255},{"class":1028,"line":81},[4256,4260,4264,4268,4272,4276,4280,4284,4288,4293,4297,4301,4306,4310],{"type":993,"tag":1026,"props":4257,"children":4258},{"style":1166},[4259],{"type":998,"value":4181},{"type":993,"tag":1026,"props":4261,"children":4262},{"style":1057},[4263],{"type":998,"value":4186},{"type":993,"tag":1026,"props":4265,"children":4266},{"style":1063},[4267],{"type":998,"value":1318},{"type":993,"tag":1026,"props":4269,"children":4270},{"style":1069},[4271],{"type":998,"value":4195},{"type":993,"tag":1026,"props":4273,"children":4274},{"style":1130},[4275],{"type":998,"value":1506},{"type":993,"tag":1026,"props":4277,"children":4278},{"style":1057},[4279],{"type":998,"value":1765},{"type":993,"tag":1026,"props":4281,"children":4282},{"style":1063},[4283],{"type":998,"value":4208},{"type":993,"tag":1026,"props":4285,"children":4286},{"style":1130},[4287],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4289,"children":4290},{"style":1069},[4291],{"type":998,"value":4292},":45 DEBUG Processing request ",{"type":993,"tag":1026,"props":4294,"children":4295},{"style":1130},[4296],{"type":998,"value":1506},{"type":993,"tag":1026,"props":4298,"children":4299},{"style":1057},[4300],{"type":998,"value":1765},{"type":993,"tag":1026,"props":4302,"children":4303},{"style":1130},[4304],{"type":998,"value":4305},"}\\n",{"type":993,"tag":1026,"props":4307,"children":4308},{"style":1069},[4309],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4311,"children":4312},{"style":1057},[4313],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4315,"children":4316},{"class":1028,"line":91},[4317],{"type":993,"tag":1026,"props":4318,"children":4319},{"emptyLinePlaceholder":13},[4320],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4322,"children":4323},{"class":1028,"line":100},[4324,4328,4332,4337],{"type":993,"tag":1026,"props":4325,"children":4326},{"style":1130},[4327],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4329,"children":4330},{"style":1057},[4331],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4333,"children":4334},{"style":1069},[4335],{"type":998,"value":4336},"\"📊 Processing large file efficiently:\"",{"type":993,"tag":1026,"props":4338,"children":4339},{"style":1057},[4340],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4342,"children":4343},{"class":1028,"line":109},[4344],{"type":993,"tag":1026,"props":4345,"children":4346},{"emptyLinePlaceholder":13},[4347],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4349,"children":4350},{"class":1028,"line":118},[4351],{"type":993,"tag":1026,"props":4352,"children":4353},{"style":1032},[4354],{"type":998,"value":4355},"# Method 1: Memory-efficient counting\n",{"type":993,"tag":1026,"props":4357,"children":4358},{"class":1028,"line":127},[4359,4364,4368],{"type":993,"tag":1026,"props":4360,"children":4361},{"style":1057},[4362],{"type":998,"value":4363},"line_count ",{"type":993,"tag":1026,"props":4365,"children":4366},{"style":1063},[4367],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4369,"children":4370},{"style":1130},[4371],{"type":998,"value":4372}," 0\n",{"type":993,"tag":1026,"props":4374,"children":4375},{"class":1028,"line":136},[4376,4381,4385],{"type":993,"tag":1026,"props":4377,"children":4378},{"style":1057},[4379],{"type":998,"value":4380},"error_count ",{"type":993,"tag":1026,"props":4382,"children":4383},{"style":1063},[4384],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4386,"children":4387},{"style":1130},[4388],{"type":998,"value":4372},{"type":993,"tag":1026,"props":4390,"children":4391},{"class":1028,"line":146},[4392,4397,4401],{"type":993,"tag":1026,"props":4393,"children":4394},{"style":1057},[4395],{"type":998,"value":4396},"user_logins ",{"type":993,"tag":1026,"props":4398,"children":4399},{"style":1063},[4400],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4402,"children":4403},{"style":1057},[4404],{"type":998,"value":4405}," {}\n",{"type":993,"tag":1026,"props":4407,"children":4408},{"class":1028,"line":155},[4409],{"type":993,"tag":1026,"props":4410,"children":4411},{"emptyLinePlaceholder":13},[4412],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4414,"children":4415},{"class":1028,"line":164},[4416,4420,4424,4428,4432,4436,4440,4444,4448,4452],{"type":993,"tag":1026,"props":4417,"children":4418},{"style":1063},[4419],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4421,"children":4422},{"style":1130},[4423],{"type":998,"value":1133},{"type":993,"tag":1026,"props":4425,"children":4426},{"style":1057},[4427],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4429,"children":4430},{"style":1069},[4431],{"type":998,"value":4115},{"type":993,"tag":1026,"props":4433,"children":4434},{"style":1057},[4435],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4437,"children":4438},{"style":1069},[4439],{"type":998,"value":1252},{"type":993,"tag":1026,"props":4441,"children":4442},{"style":1057},[4443],{"type":998,"value":1158},{"type":993,"tag":1026,"props":4445,"children":4446},{"style":1063},[4447],{"type":998,"value":1163},{"type":993,"tag":1026,"props":4449,"children":4450},{"style":1166},[4451],{"type":998,"value":1169},{"type":993,"tag":1026,"props":4453,"children":4454},{"style":1057},[4455],{"type":998,"value":1174},{"type":993,"tag":1026,"props":4457,"children":4458},{"class":1028,"line":173},[4459,4463,4467,4471,4475],{"type":993,"tag":1026,"props":4460,"children":4461},{"style":1063},[4462],{"type":998,"value":1442},{"type":993,"tag":1026,"props":4464,"children":4465},{"style":1057},[4466],{"type":998,"value":2830},{"type":993,"tag":1026,"props":4468,"children":4469},{"style":1063},[4470],{"type":998,"value":1452},{"type":993,"tag":1026,"props":4472,"children":4473},{"style":1166},[4474],{"type":998,"value":1169},{"type":993,"tag":1026,"props":4476,"children":4477},{"style":1057},[4478],{"type":998,"value":1174},{"type":993,"tag":1026,"props":4480,"children":4481},{"class":1028,"line":182},[4482,4487,4492],{"type":993,"tag":1026,"props":4483,"children":4484},{"style":1057},[4485],{"type":998,"value":4486},"        line_count ",{"type":993,"tag":1026,"props":4488,"children":4489},{"style":1063},[4490],{"type":998,"value":4491},"+=",{"type":993,"tag":1026,"props":4493,"children":4494},{"style":1130},[4495],{"type":998,"value":4496}," 1\n",{"type":993,"tag":1026,"props":4498,"children":4499},{"class":1028,"line":191},[4500],{"type":993,"tag":1026,"props":4501,"children":4502},{"style":1057},[4503],{"type":998,"value":4504},"        \n",{"type":993,"tag":1026,"props":4506,"children":4507},{"class":1028,"line":201},[4508,4512,4517,4521],{"type":993,"tag":1026,"props":4509,"children":4510},{"style":1063},[4511],{"type":998,"value":2619},{"type":993,"tag":1026,"props":4513,"children":4514},{"style":1069},[4515],{"type":998,"value":4516}," \"ERROR\"",{"type":993,"tag":1026,"props":4518,"children":4519},{"style":1063},[4520],{"type":998,"value":2629},{"type":993,"tag":1026,"props":4522,"children":4523},{"style":1057},[4524],{"type":998,"value":2634},{"type":993,"tag":1026,"props":4526,"children":4527},{"class":1028,"line":210},[4528,4533,4537],{"type":993,"tag":1026,"props":4529,"children":4530},{"style":1057},[4531],{"type":998,"value":4532},"            error_count ",{"type":993,"tag":1026,"props":4534,"children":4535},{"style":1063},[4536],{"type":998,"value":4491},{"type":993,"tag":1026,"props":4538,"children":4539},{"style":1130},[4540],{"type":998,"value":4496},{"type":993,"tag":1026,"props":4542,"children":4543},{"class":1028,"line":219},[4544],{"type":993,"tag":1026,"props":4545,"children":4546},{"style":1057},[4547],{"type":998,"value":4504},{"type":993,"tag":1026,"props":4549,"children":4550},{"class":1028,"line":228},[4551,4555,4560,4564],{"type":993,"tag":1026,"props":4552,"children":4553},{"style":1063},[4554],{"type":998,"value":2619},{"type":993,"tag":1026,"props":4556,"children":4557},{"style":1069},[4558],{"type":998,"value":4559}," \"logged in\"",{"type":993,"tag":1026,"props":4561,"children":4562},{"style":1063},[4563],{"type":998,"value":2629},{"type":993,"tag":1026,"props":4565,"children":4566},{"style":1057},[4567],{"type":998,"value":2634},{"type":993,"tag":1026,"props":4569,"children":4570},{"class":1028,"line":238},[4571],{"type":993,"tag":1026,"props":4572,"children":4573},{"style":1032},[4574],{"type":998,"value":4575},"            # Extract user number\n",{"type":993,"tag":1026,"props":4577,"children":4578},{"class":1028,"line":247},[4579,4584,4588],{"type":993,"tag":1026,"props":4580,"children":4581},{"style":1057},[4582],{"type":998,"value":4583},"            parts ",{"type":993,"tag":1026,"props":4585,"children":4586},{"style":1063},[4587],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4589,"children":4590},{"style":1057},[4591],{"type":998,"value":4592}," line.split()\n",{"type":993,"tag":1026,"props":4594,"children":4595},{"class":1028,"line":256},[4596,4600,4604,4609,4614,4619],{"type":993,"tag":1026,"props":4597,"children":4598},{"style":1063},[4599],{"type":998,"value":2920},{"type":993,"tag":1026,"props":4601,"children":4602},{"style":1130},[4603],{"type":998,"value":1732},{"type":993,"tag":1026,"props":4605,"children":4606},{"style":1057},[4607],{"type":998,"value":4608},"(parts) ",{"type":993,"tag":1026,"props":4610,"children":4611},{"style":1063},[4612],{"type":998,"value":4613},">",{"type":993,"tag":1026,"props":4615,"children":4616},{"style":1130},[4617],{"type":998,"value":4618}," 4",{"type":993,"tag":1026,"props":4620,"children":4621},{"style":1057},[4622],{"type":998,"value":1174},{"type":993,"tag":1026,"props":4624,"children":4625},{"class":1028,"line":265},[4626,4631,4635,4640,4645],{"type":993,"tag":1026,"props":4627,"children":4628},{"style":1057},[4629],{"type":998,"value":4630},"                user ",{"type":993,"tag":1026,"props":4632,"children":4633},{"style":1063},[4634],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4636,"children":4637},{"style":1057},[4638],{"type":998,"value":4639}," parts[",{"type":993,"tag":1026,"props":4641,"children":4642},{"style":1130},[4643],{"type":998,"value":4644},"4",{"type":993,"tag":1026,"props":4646,"children":4647},{"style":1057},[4648],{"type":998,"value":4649},"]\n",{"type":993,"tag":1026,"props":4651,"children":4652},{"class":1028,"line":274},[4653,4658,4662,4667,4671,4675,4679],{"type":993,"tag":1026,"props":4654,"children":4655},{"style":1057},[4656],{"type":998,"value":4657},"                user_logins[user] ",{"type":993,"tag":1026,"props":4659,"children":4660},{"style":1063},[4661],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4663,"children":4664},{"style":1057},[4665],{"type":998,"value":4666}," user_logins.get(user, ",{"type":993,"tag":1026,"props":4668,"children":4669},{"style":1130},[4670],{"type":998,"value":3087},{"type":993,"tag":1026,"props":4672,"children":4673},{"style":1057},[4674],{"type":998,"value":1158},{"type":993,"tag":1026,"props":4676,"children":4677},{"style":1063},[4678],{"type":998,"value":1770},{"type":993,"tag":1026,"props":4680,"children":4681},{"style":1130},[4682],{"type":998,"value":4496},{"type":993,"tag":1026,"props":4684,"children":4685},{"class":1028,"line":284},[4686],{"type":993,"tag":1026,"props":4687,"children":4688},{"emptyLinePlaceholder":13},[4689],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4691,"children":4692},{"class":1028,"line":293},[4693,4697,4701,4705,4710,4714,4719,4723,4727],{"type":993,"tag":1026,"props":4694,"children":4695},{"style":1130},[4696],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4698,"children":4699},{"style":1057},[4700],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4702,"children":4703},{"style":1063},[4704],{"type":998,"value":1318},{"type":993,"tag":1026,"props":4706,"children":4707},{"style":1069},[4708],{"type":998,"value":4709},"\"   📈 Total lines: ",{"type":993,"tag":1026,"props":4711,"children":4712},{"style":1130},[4713],{"type":998,"value":1506},{"type":993,"tag":1026,"props":4715,"children":4716},{"style":1057},[4717],{"type":998,"value":4718},"line_count",{"type":993,"tag":1026,"props":4720,"children":4721},{"style":1130},[4722],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4724,"children":4725},{"style":1069},[4726],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4728,"children":4729},{"style":1057},[4730],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4732,"children":4733},{"class":1028,"line":302},[4734,4738,4742,4746,4751,4755,4760,4764,4768],{"type":993,"tag":1026,"props":4735,"children":4736},{"style":1130},[4737],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4739,"children":4740},{"style":1057},[4741],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4743,"children":4744},{"style":1063},[4745],{"type":998,"value":1318},{"type":993,"tag":1026,"props":4747,"children":4748},{"style":1069},[4749],{"type":998,"value":4750},"\"   ❌ Errors found: ",{"type":993,"tag":1026,"props":4752,"children":4753},{"style":1130},[4754],{"type":998,"value":1506},{"type":993,"tag":1026,"props":4756,"children":4757},{"style":1057},[4758],{"type":998,"value":4759},"error_count",{"type":993,"tag":1026,"props":4761,"children":4762},{"style":1130},[4763],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4765,"children":4766},{"style":1069},[4767],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4769,"children":4770},{"style":1057},[4771],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4773,"children":4774},{"class":1028,"line":311},[4775,4779,4783,4787,4792,4796,4801,4805,4809],{"type":993,"tag":1026,"props":4776,"children":4777},{"style":1130},[4778],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4780,"children":4781},{"style":1057},[4782],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4784,"children":4785},{"style":1063},[4786],{"type":998,"value":1318},{"type":993,"tag":1026,"props":4788,"children":4789},{"style":1069},[4790],{"type":998,"value":4791},"\"   👤 Unique users: ",{"type":993,"tag":1026,"props":4793,"children":4794},{"style":1130},[4795],{"type":998,"value":1328},{"type":993,"tag":1026,"props":4797,"children":4798},{"style":1057},[4799],{"type":998,"value":4800},"(user_logins)",{"type":993,"tag":1026,"props":4802,"children":4803},{"style":1130},[4804],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4806,"children":4807},{"style":1069},[4808],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4810,"children":4811},{"style":1057},[4812],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4814,"children":4815},{"class":1028,"line":320},[4816,4820,4824,4828,4833,4838,4843,4848,4853,4858,4862,4867,4871,4875],{"type":993,"tag":1026,"props":4817,"children":4818},{"style":1130},[4819],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4821,"children":4822},{"style":1057},[4823],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4825,"children":4826},{"style":1063},[4827],{"type":998,"value":1318},{"type":993,"tag":1026,"props":4829,"children":4830},{"style":1069},[4831],{"type":998,"value":4832},"\"   🔄 Most active user: ",{"type":993,"tag":1026,"props":4834,"children":4835},{"style":1130},[4836],{"type":998,"value":4837},"{max",{"type":993,"tag":1026,"props":4839,"children":4840},{"style":1057},[4841],{"type":998,"value":4842},"(user_logins.items(), ",{"type":993,"tag":1026,"props":4844,"children":4845},{"style":1166},[4846],{"type":998,"value":4847},"key",{"type":993,"tag":1026,"props":4849,"children":4850},{"style":1063},[4851],{"type":998,"value":4852},"=lambda",{"type":993,"tag":1026,"props":4854,"children":4855},{"style":1057},[4856],{"type":998,"value":4857}," x: x[",{"type":993,"tag":1026,"props":4859,"children":4860},{"style":1130},[4861],{"type":998,"value":1475},{"type":993,"tag":1026,"props":4863,"children":4864},{"style":1057},[4865],{"type":998,"value":4866},"])",{"type":993,"tag":1026,"props":4868,"children":4869},{"style":1130},[4870],{"type":998,"value":1338},{"type":993,"tag":1026,"props":4872,"children":4873},{"style":1069},[4874],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4876,"children":4877},{"style":1057},[4878],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4880,"children":4881},{"class":1028,"line":329},[4882],{"type":993,"tag":1026,"props":4883,"children":4884},{"emptyLinePlaceholder":13},[4885],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4887,"children":4888},{"class":1028,"line":338},[4889],{"type":993,"tag":1026,"props":4890,"children":4891},{"style":1032},[4892],{"type":998,"value":4893},"# Method 2: Process in chunks\n",{"type":993,"tag":1026,"props":4895,"children":4896},{"class":1028,"line":347},[4897,4901,4905,4909,4913,4918],{"type":993,"tag":1026,"props":4898,"children":4899},{"style":1130},[4900],{"type":998,"value":1210},{"type":993,"tag":1026,"props":4902,"children":4903},{"style":1057},[4904],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4906,"children":4907},{"style":1069},[4908],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4910,"children":4911},{"style":1130},[4912],{"type":998,"value":1382},{"type":993,"tag":1026,"props":4914,"children":4915},{"style":1069},[4916],{"type":998,"value":4917},"🔍 Finding specific patterns:\"",{"type":993,"tag":1026,"props":4919,"children":4920},{"style":1057},[4921],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4923,"children":4924},{"class":1028,"line":356},[4925,4930,4934],{"type":993,"tag":1026,"props":4926,"children":4927},{"style":1057},[4928],{"type":998,"value":4929},"search_term ",{"type":993,"tag":1026,"props":4931,"children":4932},{"style":1063},[4933],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4935,"children":4936},{"style":1069},[4937],{"type":998,"value":4938}," \"User 5\"\n",{"type":993,"tag":1026,"props":4940,"children":4941},{"class":1028,"line":365},[4942,4947,4951],{"type":993,"tag":1026,"props":4943,"children":4944},{"style":1057},[4945],{"type":998,"value":4946},"matches ",{"type":993,"tag":1026,"props":4948,"children":4949},{"style":1063},[4950],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4952,"children":4953},{"style":1057},[4954],{"type":998,"value":2795},{"type":993,"tag":1026,"props":4956,"children":4957},{"class":1028,"line":374},[4958],{"type":993,"tag":1026,"props":4959,"children":4960},{"emptyLinePlaceholder":13},[4961],{"type":998,"value":1043},{"type":993,"tag":1026,"props":4963,"children":4964},{"class":1028,"line":384},[4965,4969,4973,4977,4981,4985,4989,4993,4997,5001],{"type":993,"tag":1026,"props":4966,"children":4967},{"style":1063},[4968],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4970,"children":4971},{"style":1130},[4972],{"type":998,"value":1133},{"type":993,"tag":1026,"props":4974,"children":4975},{"style":1057},[4976],{"type":998,"value":1138},{"type":993,"tag":1026,"props":4978,"children":4979},{"style":1069},[4980],{"type":998,"value":4115},{"type":993,"tag":1026,"props":4982,"children":4983},{"style":1057},[4984],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4986,"children":4987},{"style":1069},[4988],{"type":998,"value":1252},{"type":993,"tag":1026,"props":4990,"children":4991},{"style":1057},[4992],{"type":998,"value":1158},{"type":993,"tag":1026,"props":4994,"children":4995},{"style":1063},[4996],{"type":998,"value":1163},{"type":993,"tag":1026,"props":4998,"children":4999},{"style":1166},[5000],{"type":998,"value":1169},{"type":993,"tag":1026,"props":5002,"children":5003},{"style":1057},[5004],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5006,"children":5007},{"class":1028,"line":393},[5008,5012,5016,5020,5024,5028,5032,5036,5040],{"type":993,"tag":1026,"props":5009,"children":5010},{"style":1063},[5011],{"type":998,"value":1442},{"type":993,"tag":1026,"props":5013,"children":5014},{"style":1057},[5015],{"type":998,"value":2583},{"type":993,"tag":1026,"props":5017,"children":5018},{"style":1063},[5019],{"type":998,"value":1452},{"type":993,"tag":1026,"props":5021,"children":5022},{"style":1130},[5023],{"type":998,"value":1457},{"type":993,"tag":1026,"props":5025,"children":5026},{"style":1057},[5027],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5029,"children":5030},{"style":1166},[5031],{"type":998,"value":1466},{"type":993,"tag":1026,"props":5033,"children":5034},{"style":1057},[5035],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5037,"children":5038},{"style":1130},[5039],{"type":998,"value":1475},{"type":993,"tag":1026,"props":5041,"children":5042},{"style":1057},[5043],{"type":998,"value":1480},{"type":993,"tag":1026,"props":5045,"children":5046},{"class":1028,"line":402},[5047,5051,5056,5060],{"type":993,"tag":1026,"props":5048,"children":5049},{"style":1063},[5050],{"type":998,"value":2619},{"type":993,"tag":1026,"props":5052,"children":5053},{"style":1057},[5054],{"type":998,"value":5055}," search_term ",{"type":993,"tag":1026,"props":5057,"children":5058},{"style":1063},[5059],{"type":998,"value":1452},{"type":993,"tag":1026,"props":5061,"children":5062},{"style":1057},[5063],{"type":998,"value":2634},{"type":993,"tag":1026,"props":5065,"children":5066},{"class":1028,"line":411},[5067],{"type":993,"tag":1026,"props":5068,"children":5069},{"style":1057},[5070],{"type":998,"value":5071},"            matches.append((line_num, line.strip()))\n",{"type":993,"tag":1026,"props":5073,"children":5074},{"class":1028,"line":420},[5075],{"type":993,"tag":1026,"props":5076,"children":5077},{"style":1057},[5078],{"type":998,"value":4504},{"type":993,"tag":1026,"props":5080,"children":5081},{"class":1028,"line":429},[5082],{"type":993,"tag":1026,"props":5083,"children":5084},{"style":1032},[5085],{"type":998,"value":5086},"        # Stop after finding 5 matches for demo\n",{"type":993,"tag":1026,"props":5088,"children":5089},{"class":1028,"line":438},[5090,5094,5098,5103,5108,5113],{"type":993,"tag":1026,"props":5091,"children":5092},{"style":1063},[5093],{"type":998,"value":2619},{"type":993,"tag":1026,"props":5095,"children":5096},{"style":1130},[5097],{"type":998,"value":1732},{"type":993,"tag":1026,"props":5099,"children":5100},{"style":1057},[5101],{"type":998,"value":5102},"(matches) ",{"type":993,"tag":1026,"props":5104,"children":5105},{"style":1063},[5106],{"type":998,"value":5107},">=",{"type":993,"tag":1026,"props":5109,"children":5110},{"style":1130},[5111],{"type":998,"value":5112}," 5",{"type":993,"tag":1026,"props":5114,"children":5115},{"style":1057},[5116],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5118,"children":5119},{"class":1028,"line":447},[5120],{"type":993,"tag":1026,"props":5121,"children":5122},{"style":1063},[5123],{"type":998,"value":5124},"            break\n",{"type":993,"tag":1026,"props":5126,"children":5127},{"class":1028,"line":457},[5128],{"type":993,"tag":1026,"props":5129,"children":5130},{"emptyLinePlaceholder":13},[5131],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5133,"children":5134},{"class":1028,"line":466},[5135,5139,5143,5147,5152,5156,5161,5165,5170,5174,5179,5183,5188],{"type":993,"tag":1026,"props":5136,"children":5137},{"style":1130},[5138],{"type":998,"value":1210},{"type":993,"tag":1026,"props":5140,"children":5141},{"style":1057},[5142],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5144,"children":5145},{"style":1063},[5146],{"type":998,"value":1318},{"type":993,"tag":1026,"props":5148,"children":5149},{"style":1069},[5150],{"type":998,"value":5151},"\"   Found ",{"type":993,"tag":1026,"props":5153,"children":5154},{"style":1130},[5155],{"type":998,"value":1328},{"type":993,"tag":1026,"props":5157,"children":5158},{"style":1057},[5159],{"type":998,"value":5160},"(matches)",{"type":993,"tag":1026,"props":5162,"children":5163},{"style":1130},[5164],{"type":998,"value":1338},{"type":993,"tag":1026,"props":5166,"children":5167},{"style":1069},[5168],{"type":998,"value":5169}," matches for '",{"type":993,"tag":1026,"props":5171,"children":5172},{"style":1130},[5173],{"type":998,"value":1506},{"type":993,"tag":1026,"props":5175,"children":5176},{"style":1057},[5177],{"type":998,"value":5178},"search_term",{"type":993,"tag":1026,"props":5180,"children":5181},{"style":1130},[5182],{"type":998,"value":1338},{"type":993,"tag":1026,"props":5184,"children":5185},{"style":1069},[5186],{"type":998,"value":5187},"':\"",{"type":993,"tag":1026,"props":5189,"children":5190},{"style":1057},[5191],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5193,"children":5194},{"class":1028,"line":475},[5195,5199,5204,5208],{"type":993,"tag":1026,"props":5196,"children":5197},{"style":1063},[5198],{"type":998,"value":3752},{"type":993,"tag":1026,"props":5200,"children":5201},{"style":1057},[5202],{"type":998,"value":5203}," line_num, content ",{"type":993,"tag":1026,"props":5205,"children":5206},{"style":1063},[5207],{"type":998,"value":1452},{"type":993,"tag":1026,"props":5209,"children":5210},{"style":1057},[5211],{"type":998,"value":5212}," matches:\n",{"type":993,"tag":1026,"props":5214,"children":5215},{"class":1028,"line":484},[5216,5220,5224,5228,5232,5236,5240,5244,5248,5252,5256,5260,5264],{"type":993,"tag":1026,"props":5217,"children":5218},{"style":1130},[5219],{"type":998,"value":1297},{"type":993,"tag":1026,"props":5221,"children":5222},{"style":1057},[5223],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5225,"children":5226},{"style":1063},[5227],{"type":998,"value":1318},{"type":993,"tag":1026,"props":5229,"children":5230},{"style":1069},[5231],{"type":998,"value":2655},{"type":993,"tag":1026,"props":5233,"children":5234},{"style":1130},[5235],{"type":998,"value":1506},{"type":993,"tag":1026,"props":5237,"children":5238},{"style":1057},[5239],{"type":998,"value":2664},{"type":993,"tag":1026,"props":5241,"children":5242},{"style":1130},[5243],{"type":998,"value":1338},{"type":993,"tag":1026,"props":5245,"children":5246},{"style":1069},[5247],{"type":998,"value":1520},{"type":993,"tag":1026,"props":5249,"children":5250},{"style":1130},[5251],{"type":998,"value":1506},{"type":993,"tag":1026,"props":5253,"children":5254},{"style":1057},[5255],{"type":998,"value":17},{"type":993,"tag":1026,"props":5257,"children":5258},{"style":1130},[5259],{"type":998,"value":1338},{"type":993,"tag":1026,"props":5261,"children":5262},{"style":1069},[5263],{"type":998,"value":1343},{"type":993,"tag":1026,"props":5265,"children":5266},{"style":1057},[5267],{"type":998,"value":1224},{"type":993,"tag":1803,"props":5269,"children":5271},{"id":5270},"configuration-file-reading",[5272],{"type":998,"value":5273},"📋 Configuration File Reading",{"type":993,"tag":1001,"props":5275,"children":5276},{},[5277],{"type":998,"value":5278},"Configuration files are common in applications - here's how to read them properly.",{"type":993,"tag":1012,"props":5280,"children":5281},{},[5282],{"type":993,"tag":1016,"props":5283,"children":5285},{"className":1018,"code":5284,"language":6,"meta":8,"style":8},"# ⚙️ Configuration File Processing\n\n# Create a sample config file\nconfig_text = \"\"\"# My App Configuration\n# Database settings\ndatabase_host = localhost\ndatabase_port = 5432\ndatabase_name = myapp\n\n# User interface\ntheme = dark\nlanguage = english\nmax_items = 50\n\n# Features (true/false)\ndebug_mode = true\nauto_save = false\"\"\"\n\nwith open(\"app.config\", \"w\") as file:\n    file.write(config_text)\n\nprint(\"⚙️ Loading configuration:\")\n\nconfig = {}\nwith open(\"app.config\", \"r\") as file:\n    for line_num, line in enumerate(file, 1):\n        line = line.strip()\n        \n        # Skip empty lines and comments\n        if not line or line.startswith('#'):\n            continue\n        \n        # Parse key = value pairs\n        if '=' in line:\n            key, value = line.split('=', 1)\n            key = key.strip()\n            value = value.strip()\n            \n            # Convert boolean strings\n            if value.lower() == 'true':\n                value = True\n            elif value.lower() == 'false':\n                value = False\n            # Convert numbers\n            elif value.isdigit():\n                value = int(value)\n            \n            config[key] = value\n        else:\n            print(f\"⚠️ Line {line_num}: Invalid format\")\n\nprint(\"📋 Configuration loaded:\")\nfor key, value in config.items():\n    print(f\"   {key}: {value} ({type(value).__name__})\")\n",[5286],{"type":993,"tag":1022,"props":5287,"children":5288},{"__ignoreMap":8},[5289,5297,5304,5312,5329,5337,5345,5353,5361,5368,5376,5384,5392,5400,5407,5415,5423,5431,5438,5482,5494,5501,5521,5528,5544,5587,5626,5641,5648,5656,5690,5698,5705,5713,5733,5767,5784,5801,5809,5817,5842,5859,5884,5900,5908,5920,5941,5948,5965,5977,6017,6024,6044,6065],{"type":993,"tag":1026,"props":5290,"children":5291},{"class":1028,"line":12},[5292],{"type":993,"tag":1026,"props":5293,"children":5294},{"style":1032},[5295],{"type":998,"value":5296},"# ⚙️ Configuration File Processing\n",{"type":993,"tag":1026,"props":5298,"children":5299},{"class":1028,"line":27},[5300],{"type":993,"tag":1026,"props":5301,"children":5302},{"emptyLinePlaceholder":13},[5303],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5305,"children":5306},{"class":1028,"line":36},[5307],{"type":993,"tag":1026,"props":5308,"children":5309},{"style":1032},[5310],{"type":998,"value":5311},"# Create a sample config file\n",{"type":993,"tag":1026,"props":5313,"children":5314},{"class":1028,"line":45},[5315,5320,5324],{"type":993,"tag":1026,"props":5316,"children":5317},{"style":1057},[5318],{"type":998,"value":5319},"config_text ",{"type":993,"tag":1026,"props":5321,"children":5322},{"style":1063},[5323],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5325,"children":5326},{"style":1069},[5327],{"type":998,"value":5328}," \"\"\"# My App Configuration\n",{"type":993,"tag":1026,"props":5330,"children":5331},{"class":1028,"line":54},[5332],{"type":993,"tag":1026,"props":5333,"children":5334},{"style":1069},[5335],{"type":998,"value":5336},"# Database settings\n",{"type":993,"tag":1026,"props":5338,"children":5339},{"class":1028,"line":63},[5340],{"type":993,"tag":1026,"props":5341,"children":5342},{"style":1069},[5343],{"type":998,"value":5344},"database_host = localhost\n",{"type":993,"tag":1026,"props":5346,"children":5347},{"class":1028,"line":72},[5348],{"type":993,"tag":1026,"props":5349,"children":5350},{"style":1069},[5351],{"type":998,"value":5352},"database_port = 5432\n",{"type":993,"tag":1026,"props":5354,"children":5355},{"class":1028,"line":81},[5356],{"type":993,"tag":1026,"props":5357,"children":5358},{"style":1069},[5359],{"type":998,"value":5360},"database_name = myapp\n",{"type":993,"tag":1026,"props":5362,"children":5363},{"class":1028,"line":91},[5364],{"type":993,"tag":1026,"props":5365,"children":5366},{"emptyLinePlaceholder":13},[5367],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5369,"children":5370},{"class":1028,"line":100},[5371],{"type":993,"tag":1026,"props":5372,"children":5373},{"style":1069},[5374],{"type":998,"value":5375},"# User interface\n",{"type":993,"tag":1026,"props":5377,"children":5378},{"class":1028,"line":109},[5379],{"type":993,"tag":1026,"props":5380,"children":5381},{"style":1069},[5382],{"type":998,"value":5383},"theme = dark\n",{"type":993,"tag":1026,"props":5385,"children":5386},{"class":1028,"line":118},[5387],{"type":993,"tag":1026,"props":5388,"children":5389},{"style":1069},[5390],{"type":998,"value":5391},"language = english\n",{"type":993,"tag":1026,"props":5393,"children":5394},{"class":1028,"line":127},[5395],{"type":993,"tag":1026,"props":5396,"children":5397},{"style":1069},[5398],{"type":998,"value":5399},"max_items = 50\n",{"type":993,"tag":1026,"props":5401,"children":5402},{"class":1028,"line":136},[5403],{"type":993,"tag":1026,"props":5404,"children":5405},{"emptyLinePlaceholder":13},[5406],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5408,"children":5409},{"class":1028,"line":146},[5410],{"type":993,"tag":1026,"props":5411,"children":5412},{"style":1069},[5413],{"type":998,"value":5414},"# Features (true/false)\n",{"type":993,"tag":1026,"props":5416,"children":5417},{"class":1028,"line":155},[5418],{"type":993,"tag":1026,"props":5419,"children":5420},{"style":1069},[5421],{"type":998,"value":5422},"debug_mode = true\n",{"type":993,"tag":1026,"props":5424,"children":5425},{"class":1028,"line":164},[5426],{"type":993,"tag":1026,"props":5427,"children":5428},{"style":1069},[5429],{"type":998,"value":5430},"auto_save = false\"\"\"\n",{"type":993,"tag":1026,"props":5432,"children":5433},{"class":1028,"line":173},[5434],{"type":993,"tag":1026,"props":5435,"children":5436},{"emptyLinePlaceholder":13},[5437],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5439,"children":5440},{"class":1028,"line":182},[5441,5445,5449,5453,5458,5462,5466,5470,5474,5478],{"type":993,"tag":1026,"props":5442,"children":5443},{"style":1063},[5444],{"type":998,"value":1127},{"type":993,"tag":1026,"props":5446,"children":5447},{"style":1130},[5448],{"type":998,"value":1133},{"type":993,"tag":1026,"props":5450,"children":5451},{"style":1057},[5452],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5454,"children":5455},{"style":1069},[5456],{"type":998,"value":5457},"\"app.config\"",{"type":993,"tag":1026,"props":5459,"children":5460},{"style":1057},[5461],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5463,"children":5464},{"style":1069},[5465],{"type":998,"value":1153},{"type":993,"tag":1026,"props":5467,"children":5468},{"style":1057},[5469],{"type":998,"value":1158},{"type":993,"tag":1026,"props":5471,"children":5472},{"style":1063},[5473],{"type":998,"value":1163},{"type":993,"tag":1026,"props":5475,"children":5476},{"style":1166},[5477],{"type":998,"value":1169},{"type":993,"tag":1026,"props":5479,"children":5480},{"style":1057},[5481],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5483,"children":5484},{"class":1028,"line":191},[5485,5489],{"type":993,"tag":1026,"props":5486,"children":5487},{"style":1166},[5488],{"type":998,"value":1182},{"type":993,"tag":1026,"props":5490,"children":5491},{"style":1057},[5492],{"type":998,"value":5493},".write(config_text)\n",{"type":993,"tag":1026,"props":5495,"children":5496},{"class":1028,"line":201},[5497],{"type":993,"tag":1026,"props":5498,"children":5499},{"emptyLinePlaceholder":13},[5500],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5502,"children":5503},{"class":1028,"line":210},[5504,5508,5512,5517],{"type":993,"tag":1026,"props":5505,"children":5506},{"style":1130},[5507],{"type":998,"value":1210},{"type":993,"tag":1026,"props":5509,"children":5510},{"style":1057},[5511],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5513,"children":5514},{"style":1069},[5515],{"type":998,"value":5516},"\"⚙️ Loading configuration:\"",{"type":993,"tag":1026,"props":5518,"children":5519},{"style":1057},[5520],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5522,"children":5523},{"class":1028,"line":219},[5524],{"type":993,"tag":1026,"props":5525,"children":5526},{"emptyLinePlaceholder":13},[5527],{"type":998,"value":1043},{"type":993,"tag":1026,"props":5529,"children":5530},{"class":1028,"line":228},[5531,5536,5540],{"type":993,"tag":1026,"props":5532,"children":5533},{"style":1057},[5534],{"type":998,"value":5535},"config ",{"type":993,"tag":1026,"props":5537,"children":5538},{"style":1063},[5539],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5541,"children":5542},{"style":1057},[5543],{"type":998,"value":4405},{"type":993,"tag":1026,"props":5545,"children":5546},{"class":1028,"line":238},[5547,5551,5555,5559,5563,5567,5571,5575,5579,5583],{"type":993,"tag":1026,"props":5548,"children":5549},{"style":1063},[5550],{"type":998,"value":1127},{"type":993,"tag":1026,"props":5552,"children":5553},{"style":1130},[5554],{"type":998,"value":1133},{"type":993,"tag":1026,"props":5556,"children":5557},{"style":1057},[5558],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5560,"children":5561},{"style":1069},[5562],{"type":998,"value":5457},{"type":993,"tag":1026,"props":5564,"children":5565},{"style":1057},[5566],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5568,"children":5569},{"style":1069},[5570],{"type":998,"value":1252},{"type":993,"tag":1026,"props":5572,"children":5573},{"style":1057},[5574],{"type":998,"value":1158},{"type":993,"tag":1026,"props":5576,"children":5577},{"style":1063},[5578],{"type":998,"value":1163},{"type":993,"tag":1026,"props":5580,"children":5581},{"style":1166},[5582],{"type":998,"value":1169},{"type":993,"tag":1026,"props":5584,"children":5585},{"style":1057},[5586],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5588,"children":5589},{"class":1028,"line":247},[5590,5594,5598,5602,5606,5610,5614,5618,5622],{"type":993,"tag":1026,"props":5591,"children":5592},{"style":1063},[5593],{"type":998,"value":1442},{"type":993,"tag":1026,"props":5595,"children":5596},{"style":1057},[5597],{"type":998,"value":2583},{"type":993,"tag":1026,"props":5599,"children":5600},{"style":1063},[5601],{"type":998,"value":1452},{"type":993,"tag":1026,"props":5603,"children":5604},{"style":1130},[5605],{"type":998,"value":1457},{"type":993,"tag":1026,"props":5607,"children":5608},{"style":1057},[5609],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5611,"children":5612},{"style":1166},[5613],{"type":998,"value":1466},{"type":993,"tag":1026,"props":5615,"children":5616},{"style":1057},[5617],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5619,"children":5620},{"style":1130},[5621],{"type":998,"value":1475},{"type":993,"tag":1026,"props":5623,"children":5624},{"style":1057},[5625],{"type":998,"value":1480},{"type":993,"tag":1026,"props":5627,"children":5628},{"class":1028,"line":256},[5629,5633,5637],{"type":993,"tag":1026,"props":5630,"children":5631},{"style":1057},[5632],{"type":998,"value":2850},{"type":993,"tag":1026,"props":5634,"children":5635},{"style":1063},[5636],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5638,"children":5639},{"style":1057},[5640],{"type":998,"value":2859},{"type":993,"tag":1026,"props":5642,"children":5643},{"class":1028,"line":265},[5644],{"type":993,"tag":1026,"props":5645,"children":5646},{"style":1057},[5647],{"type":998,"value":4504},{"type":993,"tag":1026,"props":5649,"children":5650},{"class":1028,"line":274},[5651],{"type":993,"tag":1026,"props":5652,"children":5653},{"style":1032},[5654],{"type":998,"value":5655},"        # Skip empty lines and comments\n",{"type":993,"tag":1026,"props":5657,"children":5658},{"class":1028,"line":284},[5659,5663,5668,5672,5676,5681,5686],{"type":993,"tag":1026,"props":5660,"children":5661},{"style":1063},[5662],{"type":998,"value":2619},{"type":993,"tag":1026,"props":5664,"children":5665},{"style":1063},[5666],{"type":998,"value":5667}," not",{"type":993,"tag":1026,"props":5669,"children":5670},{"style":1057},[5671],{"type":998,"value":2830},{"type":993,"tag":1026,"props":5673,"children":5674},{"style":1063},[5675],{"type":998,"value":2898},{"type":993,"tag":1026,"props":5677,"children":5678},{"style":1057},[5679],{"type":998,"value":5680}," line.startswith(",{"type":993,"tag":1026,"props":5682,"children":5683},{"style":1069},[5684],{"type":998,"value":5685},"'#'",{"type":993,"tag":1026,"props":5687,"children":5688},{"style":1057},[5689],{"type":998,"value":1480},{"type":993,"tag":1026,"props":5691,"children":5692},{"class":1028,"line":293},[5693],{"type":993,"tag":1026,"props":5694,"children":5695},{"style":1063},[5696],{"type":998,"value":5697},"            continue\n",{"type":993,"tag":1026,"props":5699,"children":5700},{"class":1028,"line":302},[5701],{"type":993,"tag":1026,"props":5702,"children":5703},{"style":1057},[5704],{"type":998,"value":4504},{"type":993,"tag":1026,"props":5706,"children":5707},{"class":1028,"line":311},[5708],{"type":993,"tag":1026,"props":5709,"children":5710},{"style":1032},[5711],{"type":998,"value":5712},"        # Parse key = value pairs\n",{"type":993,"tag":1026,"props":5714,"children":5715},{"class":1028,"line":320},[5716,5720,5725,5729],{"type":993,"tag":1026,"props":5717,"children":5718},{"style":1063},[5719],{"type":998,"value":2619},{"type":993,"tag":1026,"props":5721,"children":5722},{"style":1069},[5723],{"type":998,"value":5724}," '='",{"type":993,"tag":1026,"props":5726,"children":5727},{"style":1063},[5728],{"type":998,"value":2629},{"type":993,"tag":1026,"props":5730,"children":5731},{"style":1057},[5732],{"type":998,"value":2634},{"type":993,"tag":1026,"props":5734,"children":5735},{"class":1028,"line":329},[5736,5741,5745,5750,5755,5759,5763],{"type":993,"tag":1026,"props":5737,"children":5738},{"style":1057},[5739],{"type":998,"value":5740},"            key, value ",{"type":993,"tag":1026,"props":5742,"children":5743},{"style":1063},[5744],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5746,"children":5747},{"style":1057},[5748],{"type":998,"value":5749}," line.split(",{"type":993,"tag":1026,"props":5751,"children":5752},{"style":1069},[5753],{"type":998,"value":5754},"'='",{"type":993,"tag":1026,"props":5756,"children":5757},{"style":1057},[5758],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5760,"children":5761},{"style":1130},[5762],{"type":998,"value":1475},{"type":993,"tag":1026,"props":5764,"children":5765},{"style":1057},[5766],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5768,"children":5769},{"class":1028,"line":338},[5770,5775,5779],{"type":993,"tag":1026,"props":5771,"children":5772},{"style":1057},[5773],{"type":998,"value":5774},"            key ",{"type":993,"tag":1026,"props":5776,"children":5777},{"style":1063},[5778],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5780,"children":5781},{"style":1057},[5782],{"type":998,"value":5783}," key.strip()\n",{"type":993,"tag":1026,"props":5785,"children":5786},{"class":1028,"line":347},[5787,5792,5796],{"type":993,"tag":1026,"props":5788,"children":5789},{"style":1057},[5790],{"type":998,"value":5791},"            value ",{"type":993,"tag":1026,"props":5793,"children":5794},{"style":1063},[5795],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5797,"children":5798},{"style":1057},[5799],{"type":998,"value":5800}," value.strip()\n",{"type":993,"tag":1026,"props":5802,"children":5803},{"class":1028,"line":356},[5804],{"type":993,"tag":1026,"props":5805,"children":5806},{"style":1057},[5807],{"type":998,"value":5808},"            \n",{"type":993,"tag":1026,"props":5810,"children":5811},{"class":1028,"line":365},[5812],{"type":993,"tag":1026,"props":5813,"children":5814},{"style":1032},[5815],{"type":998,"value":5816},"            # Convert boolean strings\n",{"type":993,"tag":1026,"props":5818,"children":5819},{"class":1028,"line":374},[5820,5824,5829,5833,5838],{"type":993,"tag":1026,"props":5821,"children":5822},{"style":1063},[5823],{"type":998,"value":2920},{"type":993,"tag":1026,"props":5825,"children":5826},{"style":1057},[5827],{"type":998,"value":5828}," value.lower() ",{"type":993,"tag":1026,"props":5830,"children":5831},{"style":1063},[5832],{"type":998,"value":3585},{"type":993,"tag":1026,"props":5834,"children":5835},{"style":1069},[5836],{"type":998,"value":5837}," 'true'",{"type":993,"tag":1026,"props":5839,"children":5840},{"style":1057},[5841],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5843,"children":5844},{"class":1028,"line":384},[5845,5850,5854],{"type":993,"tag":1026,"props":5846,"children":5847},{"style":1057},[5848],{"type":998,"value":5849},"                value ",{"type":993,"tag":1026,"props":5851,"children":5852},{"style":1063},[5853],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5855,"children":5856},{"style":1130},[5857],{"type":998,"value":5858}," True\n",{"type":993,"tag":1026,"props":5860,"children":5861},{"class":1028,"line":393},[5862,5867,5871,5875,5880],{"type":993,"tag":1026,"props":5863,"children":5864},{"style":1063},[5865],{"type":998,"value":5866},"            elif",{"type":993,"tag":1026,"props":5868,"children":5869},{"style":1057},[5870],{"type":998,"value":5828},{"type":993,"tag":1026,"props":5872,"children":5873},{"style":1063},[5874],{"type":998,"value":3585},{"type":993,"tag":1026,"props":5876,"children":5877},{"style":1069},[5878],{"type":998,"value":5879}," 'false'",{"type":993,"tag":1026,"props":5881,"children":5882},{"style":1057},[5883],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5885,"children":5886},{"class":1028,"line":402},[5887,5891,5895],{"type":993,"tag":1026,"props":5888,"children":5889},{"style":1057},[5890],{"type":998,"value":5849},{"type":993,"tag":1026,"props":5892,"children":5893},{"style":1063},[5894],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5896,"children":5897},{"style":1130},[5898],{"type":998,"value":5899}," False\n",{"type":993,"tag":1026,"props":5901,"children":5902},{"class":1028,"line":411},[5903],{"type":993,"tag":1026,"props":5904,"children":5905},{"style":1032},[5906],{"type":998,"value":5907},"            # Convert numbers\n",{"type":993,"tag":1026,"props":5909,"children":5910},{"class":1028,"line":420},[5911,5915],{"type":993,"tag":1026,"props":5912,"children":5913},{"style":1063},[5914],{"type":998,"value":5866},{"type":993,"tag":1026,"props":5916,"children":5917},{"style":1057},[5918],{"type":998,"value":5919}," value.isdigit():\n",{"type":993,"tag":1026,"props":5921,"children":5922},{"class":1028,"line":429},[5923,5927,5931,5936],{"type":993,"tag":1026,"props":5924,"children":5925},{"style":1057},[5926],{"type":998,"value":5849},{"type":993,"tag":1026,"props":5928,"children":5929},{"style":1063},[5930],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5932,"children":5933},{"style":1130},[5934],{"type":998,"value":5935}," int",{"type":993,"tag":1026,"props":5937,"children":5938},{"style":1057},[5939],{"type":998,"value":5940},"(value)\n",{"type":993,"tag":1026,"props":5942,"children":5943},{"class":1028,"line":438},[5944],{"type":993,"tag":1026,"props":5945,"children":5946},{"style":1057},[5947],{"type":998,"value":5808},{"type":993,"tag":1026,"props":5949,"children":5950},{"class":1028,"line":447},[5951,5956,5960],{"type":993,"tag":1026,"props":5952,"children":5953},{"style":1057},[5954],{"type":998,"value":5955},"            config[key] ",{"type":993,"tag":1026,"props":5957,"children":5958},{"style":1063},[5959],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5961,"children":5962},{"style":1057},[5963],{"type":998,"value":5964}," value\n",{"type":993,"tag":1026,"props":5966,"children":5967},{"class":1028,"line":457},[5968,5973],{"type":993,"tag":1026,"props":5969,"children":5970},{"style":1063},[5971],{"type":998,"value":5972},"        else",{"type":993,"tag":1026,"props":5974,"children":5975},{"style":1057},[5976],{"type":998,"value":1174},{"type":993,"tag":1026,"props":5978,"children":5979},{"class":1028,"line":466},[5980,5984,5988,5992,5996,6000,6004,6008,6013],{"type":993,"tag":1026,"props":5981,"children":5982},{"style":1130},[5983],{"type":998,"value":2642},{"type":993,"tag":1026,"props":5985,"children":5986},{"style":1057},[5987],{"type":998,"value":1138},{"type":993,"tag":1026,"props":5989,"children":5990},{"style":1063},[5991],{"type":998,"value":1318},{"type":993,"tag":1026,"props":5993,"children":5994},{"style":1069},[5995],{"type":998,"value":3666},{"type":993,"tag":1026,"props":5997,"children":5998},{"style":1130},[5999],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6001,"children":6002},{"style":1057},[6003],{"type":998,"value":2664},{"type":993,"tag":1026,"props":6005,"children":6006},{"style":1130},[6007],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6009,"children":6010},{"style":1069},[6011],{"type":998,"value":6012},": Invalid format\"",{"type":993,"tag":1026,"props":6014,"children":6015},{"style":1057},[6016],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6018,"children":6019},{"class":1028,"line":475},[6020],{"type":993,"tag":1026,"props":6021,"children":6022},{"emptyLinePlaceholder":13},[6023],{"type":998,"value":1043},{"type":993,"tag":1026,"props":6025,"children":6026},{"class":1028,"line":484},[6027,6031,6035,6040],{"type":993,"tag":1026,"props":6028,"children":6029},{"style":1130},[6030],{"type":998,"value":1210},{"type":993,"tag":1026,"props":6032,"children":6033},{"style":1057},[6034],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6036,"children":6037},{"style":1069},[6038],{"type":998,"value":6039},"\"📋 Configuration loaded:\"",{"type":993,"tag":1026,"props":6041,"children":6042},{"style":1057},[6043],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6045,"children":6046},{"class":1028,"line":493},[6047,6051,6056,6060],{"type":993,"tag":1026,"props":6048,"children":6049},{"style":1063},[6050],{"type":998,"value":3752},{"type":993,"tag":1026,"props":6052,"children":6053},{"style":1057},[6054],{"type":998,"value":6055}," key, value ",{"type":993,"tag":1026,"props":6057,"children":6058},{"style":1063},[6059],{"type":998,"value":1452},{"type":993,"tag":1026,"props":6061,"children":6062},{"style":1057},[6063],{"type":998,"value":6064}," config.items():\n",{"type":993,"tag":1026,"props":6066,"children":6067},{"class":1028,"line":502},[6068,6072,6076,6080,6084,6088,6092,6096,6100,6104,6109,6113,6117,6122,6127,6132,6137],{"type":993,"tag":1026,"props":6069,"children":6070},{"style":1130},[6071],{"type":998,"value":1297},{"type":993,"tag":1026,"props":6073,"children":6074},{"style":1057},[6075],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6077,"children":6078},{"style":1063},[6079],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6081,"children":6082},{"style":1069},[6083],{"type":998,"value":3786},{"type":993,"tag":1026,"props":6085,"children":6086},{"style":1130},[6087],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6089,"children":6090},{"style":1057},[6091],{"type":998,"value":4847},{"type":993,"tag":1026,"props":6093,"children":6094},{"style":1130},[6095],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6097,"children":6098},{"style":1069},[6099],{"type":998,"value":1520},{"type":993,"tag":1026,"props":6101,"children":6102},{"style":1130},[6103],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6105,"children":6106},{"style":1057},[6107],{"type":998,"value":6108},"value",{"type":993,"tag":1026,"props":6110,"children":6111},{"style":1130},[6112],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6114,"children":6115},{"style":1069},[6116],{"type":998,"value":2880},{"type":993,"tag":1026,"props":6118,"children":6119},{"style":1130},[6120],{"type":998,"value":6121},"{type",{"type":993,"tag":1026,"props":6123,"children":6124},{"style":1057},[6125],{"type":998,"value":6126},"(value).",{"type":993,"tag":1026,"props":6128,"children":6129},{"style":1130},[6130],{"type":998,"value":6131},"__name__}",{"type":993,"tag":1026,"props":6133,"children":6134},{"style":1069},[6135],{"type":998,"value":6136},")\"",{"type":993,"tag":1026,"props":6138,"children":6139},{"style":1057},[6140],{"type":998,"value":1224},{"type":993,"tag":1803,"props":6142,"children":6144},{"id":6143},"️-error-handling-and-file-validation",[6145],{"type":998,"value":6146},"🛠️ Error Handling and File Validation",{"type":993,"tag":1001,"props":6148,"children":6149},{},[6150],{"type":998,"value":6151},"Reading files safely means handling potential errors and validating content.",{"type":993,"tag":1815,"props":6153,"children":6157},{"emoji":6154,"title":6155,"type":6156},"⚠️","File Reading Safety","warning",[6158,6166,6219,6227],{"type":993,"tag":1001,"props":6159,"children":6160},{},[6161],{"type":993,"tag":1825,"props":6162,"children":6163},{},[6164],{"type":998,"value":6165},"Common Issues:",{"type":993,"tag":1839,"props":6167,"children":6168},{},[6169,6179,6189,6199,6209],{"type":993,"tag":1843,"props":6170,"children":6171},{},[6172,6177],{"type":993,"tag":1825,"props":6173,"children":6174},{},[6175],{"type":998,"value":6176},"File doesn't exist",{"type":998,"value":6178}," - Use try/except with FileNotFoundError",{"type":993,"tag":1843,"props":6180,"children":6181},{},[6182,6187],{"type":993,"tag":1825,"props":6183,"children":6184},{},[6185],{"type":998,"value":6186},"Permission denied",{"type":998,"value":6188}," - Handle PermissionError",{"type":993,"tag":1843,"props":6190,"children":6191},{},[6192,6197],{"type":993,"tag":1825,"props":6193,"children":6194},{},[6195],{"type":998,"value":6196},"Corrupted data",{"type":998,"value":6198}," - Validate content format",{"type":993,"tag":1843,"props":6200,"children":6201},{},[6202,6207],{"type":993,"tag":1825,"props":6203,"children":6204},{},[6205],{"type":998,"value":6206},"Encoding problems",{"type":998,"value":6208}," - Specify correct encoding",{"type":993,"tag":1843,"props":6210,"children":6211},{},[6212,6217],{"type":993,"tag":1825,"props":6213,"children":6214},{},[6215],{"type":998,"value":6216},"Large files",{"type":998,"value":6218}," - Use memory-efficient methods",{"type":993,"tag":1001,"props":6220,"children":6221},{},[6222],{"type":993,"tag":1825,"props":6223,"children":6224},{},[6225],{"type":998,"value":6226},"Best Practices:",{"type":993,"tag":1839,"props":6228,"children":6229},{},[6230,6235,6240,6245,6250],{"type":993,"tag":1843,"props":6231,"children":6232},{},[6233],{"type":998,"value":6234},"Always check if file exists first",{"type":993,"tag":1843,"props":6236,"children":6237},{},[6238],{"type":998,"value":6239},"Use appropriate encoding (UTF-8 recommended)",{"type":993,"tag":1843,"props":6241,"children":6242},{},[6243],{"type":998,"value":6244},"Handle errors gracefully with try/except",{"type":993,"tag":1843,"props":6246,"children":6247},{},[6248],{"type":998,"value":6249},"Validate data format before processing",{"type":993,"tag":1843,"props":6251,"children":6252},{},[6253],{"type":998,"value":6254},"Use context managers for automatic cleanup",{"type":993,"tag":2023,"props":6256,"children":6258},{"id":6257},"safe-file-reading",[6259],{"type":998,"value":6260},"🔒 Safe File Reading",{"type":993,"tag":1012,"props":6262,"children":6263},{},[6264],{"type":993,"tag":1016,"props":6265,"children":6267},{"className":1018,"code":6266,"language":6,"meta":8,"style":8},"import os\n\n# 🛡️ Safe File Reading Examples\n\ndef safe_file_reader(filename):\n    \"\"\"Safely read file with comprehensive error handling\"\"\"\n    \n    # Check if file exists\n    if not os.path.exists(filename):\n        print(f\"❌ File '{filename}' not found\")\n        return None\n    \n    try:\n        with open(filename, \"r\", encoding=\"utf-8\") as file:\n            content = file.read()\n            print(f\"✅ Successfully read '{filename}' ({len(content)} chars)\")\n            return content\n    \n    except PermissionError:\n        print(f\"🚫 Permission denied: '{filename}'\")\n    except UnicodeDecodeError:\n        print(f\"🔤 Encoding error: '{filename}' - try different encoding\")\n    except Exception as e:\n        print(f\"❌ Unexpected error: {e}\")\n    \n    return None\n\n# Test safe reading\ntest_files = [\"sample.txt\", \"missing.txt\", \"diary.txt\"]\n\nprint(\"🔍 Testing file reading:\")\nfor filename in test_files:\n    result = safe_file_reader(filename)\n    if result:\n        lines = len(result.split('\\n'))\n        print(f\"   📊 {filename}: {lines} lines\")\n",[6268],{"type":993,"tag":1022,"props":6269,"children":6270},{"__ignoreMap":8},[6271,6284,6291,6299,6306,6325,6333,6340,6348,6364,6406,6419,6426,6438,6493,6513,6571,6584,6591,6608,6649,6665,6706,6728,6769,6776,6788,6795,6803,6844,6851,6871,6892,6909,6921,6959],{"type":993,"tag":1026,"props":6272,"children":6273},{"class":1028,"line":12},[6274,6279],{"type":993,"tag":1026,"props":6275,"children":6276},{"style":1063},[6277],{"type":998,"value":6278},"import",{"type":993,"tag":1026,"props":6280,"children":6281},{"style":1057},[6282],{"type":998,"value":6283}," os\n",{"type":993,"tag":1026,"props":6285,"children":6286},{"class":1028,"line":27},[6287],{"type":993,"tag":1026,"props":6288,"children":6289},{"emptyLinePlaceholder":13},[6290],{"type":998,"value":1043},{"type":993,"tag":1026,"props":6292,"children":6293},{"class":1028,"line":36},[6294],{"type":993,"tag":1026,"props":6295,"children":6296},{"style":1032},[6297],{"type":998,"value":6298},"# 🛡️ Safe File Reading Examples\n",{"type":993,"tag":1026,"props":6300,"children":6301},{"class":1028,"line":45},[6302],{"type":993,"tag":1026,"props":6303,"children":6304},{"emptyLinePlaceholder":13},[6305],{"type":998,"value":1043},{"type":993,"tag":1026,"props":6307,"children":6308},{"class":1028,"line":54},[6309,6314,6320],{"type":993,"tag":1026,"props":6310,"children":6311},{"style":1063},[6312],{"type":998,"value":6313},"def",{"type":993,"tag":1026,"props":6315,"children":6317},{"style":6316},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[6318],{"type":998,"value":6319}," safe_file_reader",{"type":993,"tag":1026,"props":6321,"children":6322},{"style":1057},[6323],{"type":998,"value":6324},"(filename):\n",{"type":993,"tag":1026,"props":6326,"children":6327},{"class":1028,"line":63},[6328],{"type":993,"tag":1026,"props":6329,"children":6330},{"style":1069},[6331],{"type":998,"value":6332},"    \"\"\"Safely read file with comprehensive error handling\"\"\"\n",{"type":993,"tag":1026,"props":6334,"children":6335},{"class":1028,"line":72},[6336],{"type":993,"tag":1026,"props":6337,"children":6338},{"style":1057},[6339],{"type":998,"value":2364},{"type":993,"tag":1026,"props":6341,"children":6342},{"class":1028,"line":81},[6343],{"type":993,"tag":1026,"props":6344,"children":6345},{"style":1032},[6346],{"type":998,"value":6347},"    # Check if file exists\n",{"type":993,"tag":1026,"props":6349,"children":6350},{"class":1028,"line":91},[6351,6355,6359],{"type":993,"tag":1026,"props":6352,"children":6353},{"style":1063},[6354],{"type":998,"value":2985},{"type":993,"tag":1026,"props":6356,"children":6357},{"style":1063},[6358],{"type":998,"value":5667},{"type":993,"tag":1026,"props":6360,"children":6361},{"style":1057},[6362],{"type":998,"value":6363}," os.path.exists(filename):\n",{"type":993,"tag":1026,"props":6365,"children":6366},{"class":1028,"line":100},[6367,6371,6375,6379,6384,6388,6393,6397,6402],{"type":993,"tag":1026,"props":6368,"children":6369},{"style":1130},[6370],{"type":998,"value":1488},{"type":993,"tag":1026,"props":6372,"children":6373},{"style":1057},[6374],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6376,"children":6377},{"style":1063},[6378],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6380,"children":6381},{"style":1069},[6382],{"type":998,"value":6383},"\"❌ File '",{"type":993,"tag":1026,"props":6385,"children":6386},{"style":1130},[6387],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6389,"children":6390},{"style":1057},[6391],{"type":998,"value":6392},"filename",{"type":993,"tag":1026,"props":6394,"children":6395},{"style":1130},[6396],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6398,"children":6399},{"style":1069},[6400],{"type":998,"value":6401},"' not found\"",{"type":993,"tag":1026,"props":6403,"children":6404},{"style":1057},[6405],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6407,"children":6408},{"class":1028,"line":109},[6409,6414],{"type":993,"tag":1026,"props":6410,"children":6411},{"style":1063},[6412],{"type":998,"value":6413},"        return",{"type":993,"tag":1026,"props":6415,"children":6416},{"style":1130},[6417],{"type":998,"value":6418}," None\n",{"type":993,"tag":1026,"props":6420,"children":6421},{"class":1028,"line":118},[6422],{"type":993,"tag":1026,"props":6423,"children":6424},{"style":1057},[6425],{"type":998,"value":2364},{"type":993,"tag":1026,"props":6427,"children":6428},{"class":1028,"line":127},[6429,6434],{"type":993,"tag":1026,"props":6430,"children":6431},{"style":1063},[6432],{"type":998,"value":6433},"    try",{"type":993,"tag":1026,"props":6435,"children":6436},{"style":1057},[6437],{"type":998,"value":1174},{"type":993,"tag":1026,"props":6439,"children":6440},{"class":1028,"line":136},[6441,6446,6450,6455,6459,6463,6468,6472,6477,6481,6485,6489],{"type":993,"tag":1026,"props":6442,"children":6443},{"style":1063},[6444],{"type":998,"value":6445},"        with",{"type":993,"tag":1026,"props":6447,"children":6448},{"style":1130},[6449],{"type":998,"value":1133},{"type":993,"tag":1026,"props":6451,"children":6452},{"style":1057},[6453],{"type":998,"value":6454},"(filename, ",{"type":993,"tag":1026,"props":6456,"children":6457},{"style":1069},[6458],{"type":998,"value":1252},{"type":993,"tag":1026,"props":6460,"children":6461},{"style":1057},[6462],{"type":998,"value":1148},{"type":993,"tag":1026,"props":6464,"children":6465},{"style":1166},[6466],{"type":998,"value":6467},"encoding",{"type":993,"tag":1026,"props":6469,"children":6470},{"style":1063},[6471],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6473,"children":6474},{"style":1069},[6475],{"type":998,"value":6476},"\"utf-8\"",{"type":993,"tag":1026,"props":6478,"children":6479},{"style":1057},[6480],{"type":998,"value":1158},{"type":993,"tag":1026,"props":6482,"children":6483},{"style":1063},[6484],{"type":998,"value":1163},{"type":993,"tag":1026,"props":6486,"children":6487},{"style":1166},[6488],{"type":998,"value":1169},{"type":993,"tag":1026,"props":6490,"children":6491},{"style":1057},[6492],{"type":998,"value":1174},{"type":993,"tag":1026,"props":6494,"children":6495},{"class":1028,"line":146},[6496,6501,6505,6509],{"type":993,"tag":1026,"props":6497,"children":6498},{"style":1057},[6499],{"type":998,"value":6500},"            content ",{"type":993,"tag":1026,"props":6502,"children":6503},{"style":1063},[6504],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6506,"children":6507},{"style":1166},[6508],{"type":998,"value":1169},{"type":993,"tag":1026,"props":6510,"children":6511},{"style":1057},[6512],{"type":998,"value":1289},{"type":993,"tag":1026,"props":6514,"children":6515},{"class":1028,"line":155},[6516,6520,6524,6528,6533,6537,6541,6545,6550,6554,6558,6562,6567],{"type":993,"tag":1026,"props":6517,"children":6518},{"style":1130},[6519],{"type":998,"value":2642},{"type":993,"tag":1026,"props":6521,"children":6522},{"style":1057},[6523],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6525,"children":6526},{"style":1063},[6527],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6529,"children":6530},{"style":1069},[6531],{"type":998,"value":6532},"\"✅ Successfully read '",{"type":993,"tag":1026,"props":6534,"children":6535},{"style":1130},[6536],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6538,"children":6539},{"style":1057},[6540],{"type":998,"value":6392},{"type":993,"tag":1026,"props":6542,"children":6543},{"style":1130},[6544],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6546,"children":6547},{"style":1069},[6548],{"type":998,"value":6549},"' (",{"type":993,"tag":1026,"props":6551,"children":6552},{"style":1130},[6553],{"type":998,"value":1328},{"type":993,"tag":1026,"props":6555,"children":6556},{"style":1057},[6557],{"type":998,"value":1333},{"type":993,"tag":1026,"props":6559,"children":6560},{"style":1130},[6561],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6563,"children":6564},{"style":1069},[6565],{"type":998,"value":6566}," chars)\"",{"type":993,"tag":1026,"props":6568,"children":6569},{"style":1057},[6570],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6572,"children":6573},{"class":1028,"line":164},[6574,6579],{"type":993,"tag":1026,"props":6575,"children":6576},{"style":1063},[6577],{"type":998,"value":6578},"            return",{"type":993,"tag":1026,"props":6580,"children":6581},{"style":1057},[6582],{"type":998,"value":6583}," content\n",{"type":993,"tag":1026,"props":6585,"children":6586},{"class":1028,"line":173},[6587],{"type":993,"tag":1026,"props":6588,"children":6589},{"style":1057},[6590],{"type":998,"value":2364},{"type":993,"tag":1026,"props":6592,"children":6593},{"class":1028,"line":182},[6594,6599,6604],{"type":993,"tag":1026,"props":6595,"children":6596},{"style":1063},[6597],{"type":998,"value":6598},"    except",{"type":993,"tag":1026,"props":6600,"children":6601},{"style":1130},[6602],{"type":998,"value":6603}," PermissionError",{"type":993,"tag":1026,"props":6605,"children":6606},{"style":1057},[6607],{"type":998,"value":1174},{"type":993,"tag":1026,"props":6609,"children":6610},{"class":1028,"line":191},[6611,6615,6619,6623,6628,6632,6636,6640,6645],{"type":993,"tag":1026,"props":6612,"children":6613},{"style":1130},[6614],{"type":998,"value":1488},{"type":993,"tag":1026,"props":6616,"children":6617},{"style":1057},[6618],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6620,"children":6621},{"style":1063},[6622],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6624,"children":6625},{"style":1069},[6626],{"type":998,"value":6627},"\"🚫 Permission denied: '",{"type":993,"tag":1026,"props":6629,"children":6630},{"style":1130},[6631],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6633,"children":6634},{"style":1057},[6635],{"type":998,"value":6392},{"type":993,"tag":1026,"props":6637,"children":6638},{"style":1130},[6639],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6641,"children":6642},{"style":1069},[6643],{"type":998,"value":6644},"'\"",{"type":993,"tag":1026,"props":6646,"children":6647},{"style":1057},[6648],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6650,"children":6651},{"class":1028,"line":201},[6652,6656,6661],{"type":993,"tag":1026,"props":6653,"children":6654},{"style":1063},[6655],{"type":998,"value":6598},{"type":993,"tag":1026,"props":6657,"children":6658},{"style":1130},[6659],{"type":998,"value":6660}," UnicodeDecodeError",{"type":993,"tag":1026,"props":6662,"children":6663},{"style":1057},[6664],{"type":998,"value":1174},{"type":993,"tag":1026,"props":6666,"children":6667},{"class":1028,"line":210},[6668,6672,6676,6680,6685,6689,6693,6697,6702],{"type":993,"tag":1026,"props":6669,"children":6670},{"style":1130},[6671],{"type":998,"value":1488},{"type":993,"tag":1026,"props":6673,"children":6674},{"style":1057},[6675],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6677,"children":6678},{"style":1063},[6679],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6681,"children":6682},{"style":1069},[6683],{"type":998,"value":6684},"\"🔤 Encoding error: '",{"type":993,"tag":1026,"props":6686,"children":6687},{"style":1130},[6688],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6690,"children":6691},{"style":1057},[6692],{"type":998,"value":6392},{"type":993,"tag":1026,"props":6694,"children":6695},{"style":1130},[6696],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6698,"children":6699},{"style":1069},[6700],{"type":998,"value":6701},"' - try different encoding\"",{"type":993,"tag":1026,"props":6703,"children":6704},{"style":1057},[6705],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6707,"children":6708},{"class":1028,"line":219},[6709,6713,6718,6723],{"type":993,"tag":1026,"props":6710,"children":6711},{"style":1063},[6712],{"type":998,"value":6598},{"type":993,"tag":1026,"props":6714,"children":6715},{"style":1130},[6716],{"type":998,"value":6717}," Exception",{"type":993,"tag":1026,"props":6719,"children":6720},{"style":1063},[6721],{"type":998,"value":6722}," as",{"type":993,"tag":1026,"props":6724,"children":6725},{"style":1057},[6726],{"type":998,"value":6727}," e:\n",{"type":993,"tag":1026,"props":6729,"children":6730},{"class":1028,"line":228},[6731,6735,6739,6743,6748,6752,6757,6761,6765],{"type":993,"tag":1026,"props":6732,"children":6733},{"style":1130},[6734],{"type":998,"value":1488},{"type":993,"tag":1026,"props":6736,"children":6737},{"style":1057},[6738],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6740,"children":6741},{"style":1063},[6742],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6744,"children":6745},{"style":1069},[6746],{"type":998,"value":6747},"\"❌ Unexpected error: ",{"type":993,"tag":1026,"props":6749,"children":6750},{"style":1130},[6751],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6753,"children":6754},{"style":1057},[6755],{"type":998,"value":6756},"e",{"type":993,"tag":1026,"props":6758,"children":6759},{"style":1130},[6760],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6762,"children":6763},{"style":1069},[6764],{"type":998,"value":1343},{"type":993,"tag":1026,"props":6766,"children":6767},{"style":1057},[6768],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6770,"children":6771},{"class":1028,"line":238},[6772],{"type":993,"tag":1026,"props":6773,"children":6774},{"style":1057},[6775],{"type":998,"value":2364},{"type":993,"tag":1026,"props":6777,"children":6778},{"class":1028,"line":247},[6779,6784],{"type":993,"tag":1026,"props":6780,"children":6781},{"style":1063},[6782],{"type":998,"value":6783},"    return",{"type":993,"tag":1026,"props":6785,"children":6786},{"style":1130},[6787],{"type":998,"value":6418},{"type":993,"tag":1026,"props":6789,"children":6790},{"class":1028,"line":256},[6791],{"type":993,"tag":1026,"props":6792,"children":6793},{"emptyLinePlaceholder":13},[6794],{"type":998,"value":1043},{"type":993,"tag":1026,"props":6796,"children":6797},{"class":1028,"line":265},[6798],{"type":993,"tag":1026,"props":6799,"children":6800},{"style":1032},[6801],{"type":998,"value":6802},"# Test safe reading\n",{"type":993,"tag":1026,"props":6804,"children":6805},{"class":1028,"line":274},[6806,6811,6815,6819,6823,6827,6832,6836,6840],{"type":993,"tag":1026,"props":6807,"children":6808},{"style":1057},[6809],{"type":998,"value":6810},"test_files ",{"type":993,"tag":1026,"props":6812,"children":6813},{"style":1063},[6814],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6816,"children":6817},{"style":1057},[6818],{"type":998,"value":3925},{"type":993,"tag":1026,"props":6820,"children":6821},{"style":1069},[6822],{"type":998,"value":1143},{"type":993,"tag":1026,"props":6824,"children":6825},{"style":1057},[6826],{"type":998,"value":1148},{"type":993,"tag":1026,"props":6828,"children":6829},{"style":1069},[6830],{"type":998,"value":6831},"\"missing.txt\"",{"type":993,"tag":1026,"props":6833,"children":6834},{"style":1057},[6835],{"type":998,"value":1148},{"type":993,"tag":1026,"props":6837,"children":6838},{"style":1069},[6839],{"type":998,"value":2173},{"type":993,"tag":1026,"props":6841,"children":6842},{"style":1057},[6843],{"type":998,"value":4649},{"type":993,"tag":1026,"props":6845,"children":6846},{"class":1028,"line":284},[6847],{"type":993,"tag":1026,"props":6848,"children":6849},{"emptyLinePlaceholder":13},[6850],{"type":998,"value":1043},{"type":993,"tag":1026,"props":6852,"children":6853},{"class":1028,"line":293},[6854,6858,6862,6867],{"type":993,"tag":1026,"props":6855,"children":6856},{"style":1130},[6857],{"type":998,"value":1210},{"type":993,"tag":1026,"props":6859,"children":6860},{"style":1057},[6861],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6863,"children":6864},{"style":1069},[6865],{"type":998,"value":6866},"\"🔍 Testing file reading:\"",{"type":993,"tag":1026,"props":6868,"children":6869},{"style":1057},[6870],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6872,"children":6873},{"class":1028,"line":302},[6874,6878,6883,6887],{"type":993,"tag":1026,"props":6875,"children":6876},{"style":1063},[6877],{"type":998,"value":3752},{"type":993,"tag":1026,"props":6879,"children":6880},{"style":1057},[6881],{"type":998,"value":6882}," filename ",{"type":993,"tag":1026,"props":6884,"children":6885},{"style":1063},[6886],{"type":998,"value":1452},{"type":993,"tag":1026,"props":6888,"children":6889},{"style":1057},[6890],{"type":998,"value":6891}," test_files:\n",{"type":993,"tag":1026,"props":6893,"children":6894},{"class":1028,"line":311},[6895,6900,6904],{"type":993,"tag":1026,"props":6896,"children":6897},{"style":1057},[6898],{"type":998,"value":6899},"    result ",{"type":993,"tag":1026,"props":6901,"children":6902},{"style":1063},[6903],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6905,"children":6906},{"style":1057},[6907],{"type":998,"value":6908}," safe_file_reader(filename)\n",{"type":993,"tag":1026,"props":6910,"children":6911},{"class":1028,"line":320},[6912,6916],{"type":993,"tag":1026,"props":6913,"children":6914},{"style":1063},[6915],{"type":998,"value":2985},{"type":993,"tag":1026,"props":6917,"children":6918},{"style":1057},[6919],{"type":998,"value":6920}," result:\n",{"type":993,"tag":1026,"props":6922,"children":6923},{"class":1028,"line":329},[6924,6929,6933,6937,6942,6946,6950,6954],{"type":993,"tag":1026,"props":6925,"children":6926},{"style":1057},[6927],{"type":998,"value":6928},"        lines ",{"type":993,"tag":1026,"props":6930,"children":6931},{"style":1063},[6932],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6934,"children":6935},{"style":1130},[6936],{"type":998,"value":1732},{"type":993,"tag":1026,"props":6938,"children":6939},{"style":1057},[6940],{"type":998,"value":6941},"(result.split(",{"type":993,"tag":1026,"props":6943,"children":6944},{"style":1069},[6945],{"type":998,"value":2344},{"type":993,"tag":1026,"props":6947,"children":6948},{"style":1130},[6949],{"type":998,"value":1382},{"type":993,"tag":1026,"props":6951,"children":6952},{"style":1069},[6953],{"type":998,"value":2344},{"type":993,"tag":1026,"props":6955,"children":6956},{"style":1057},[6957],{"type":998,"value":6958},"))\n",{"type":993,"tag":1026,"props":6960,"children":6961},{"class":1028,"line":338},[6962,6966,6970,6974,6979,6983,6987,6991,6995,6999,7004,7008,7012],{"type":993,"tag":1026,"props":6963,"children":6964},{"style":1130},[6965],{"type":998,"value":1488},{"type":993,"tag":1026,"props":6967,"children":6968},{"style":1057},[6969],{"type":998,"value":1138},{"type":993,"tag":1026,"props":6971,"children":6972},{"style":1063},[6973],{"type":998,"value":1318},{"type":993,"tag":1026,"props":6975,"children":6976},{"style":1069},[6977],{"type":998,"value":6978},"\"   📊 ",{"type":993,"tag":1026,"props":6980,"children":6981},{"style":1130},[6982],{"type":998,"value":1506},{"type":993,"tag":1026,"props":6984,"children":6985},{"style":1057},[6986],{"type":998,"value":6392},{"type":993,"tag":1026,"props":6988,"children":6989},{"style":1130},[6990],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6992,"children":6993},{"style":1069},[6994],{"type":998,"value":1520},{"type":993,"tag":1026,"props":6996,"children":6997},{"style":1130},[6998],{"type":998,"value":1506},{"type":993,"tag":1026,"props":7000,"children":7001},{"style":1057},[7002],{"type":998,"value":7003},"lines",{"type":993,"tag":1026,"props":7005,"children":7006},{"style":1130},[7007],{"type":998,"value":1338},{"type":993,"tag":1026,"props":7009,"children":7010},{"style":1069},[7011],{"type":998,"value":1686},{"type":993,"tag":1026,"props":7013,"children":7014},{"style":1057},[7015],{"type":998,"value":1224},{"type":993,"tag":1803,"props":7017,"children":7019},{"id":7018},"file-reading-reference",[7020],{"type":998,"value":7021},"📚 File Reading Reference",{"type":993,"tag":1001,"props":7023,"children":7024},{},[7025],{"type":998,"value":7026},"Quick reference for common file reading patterns and methods.",{"type":993,"tag":1815,"props":7028,"children":7031},{"emoji":7029,"title":7030,"type":1819},"📖","Reading Methods Reference",[7032,7040,7267,7275,7497,7505],{"type":993,"tag":1001,"props":7033,"children":7034},{},[7035],{"type":993,"tag":1825,"props":7036,"children":7037},{},[7038],{"type":998,"value":7039},"Basic Reading:",{"type":993,"tag":1016,"props":7041,"children":7043},{"className":1018,"code":7042,"language":6,"meta":8,"style":8},"# Read entire file\nwith open(\"file.txt\", \"r\") as f:\n    content = f.read()\n\n# Read all lines\nwith open(\"file.txt\", \"r\") as f:\n    lines = f.readlines()\n\n# Read line by line (efficient)\nwith open(\"file.txt\", \"r\") as f:\n    for line in f:\n        print(line.strip())\n",[7044],{"type":993,"tag":1022,"props":7045,"children":7046},{"__ignoreMap":8},[7047,7055,7096,7112,7119,7127,7166,7182,7189,7197,7236,7255],{"type":993,"tag":1026,"props":7048,"children":7049},{"class":1028,"line":12},[7050],{"type":993,"tag":1026,"props":7051,"children":7052},{"style":1032},[7053],{"type":998,"value":7054},"# Read entire file\n",{"type":993,"tag":1026,"props":7056,"children":7057},{"class":1028,"line":27},[7058,7062,7066,7070,7075,7079,7083,7087,7091],{"type":993,"tag":1026,"props":7059,"children":7060},{"style":1063},[7061],{"type":998,"value":1127},{"type":993,"tag":1026,"props":7063,"children":7064},{"style":1130},[7065],{"type":998,"value":1133},{"type":993,"tag":1026,"props":7067,"children":7068},{"style":1057},[7069],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7071,"children":7072},{"style":1069},[7073],{"type":998,"value":7074},"\"file.txt\"",{"type":993,"tag":1026,"props":7076,"children":7077},{"style":1057},[7078],{"type":998,"value":1148},{"type":993,"tag":1026,"props":7080,"children":7081},{"style":1069},[7082],{"type":998,"value":1252},{"type":993,"tag":1026,"props":7084,"children":7085},{"style":1057},[7086],{"type":998,"value":1158},{"type":993,"tag":1026,"props":7088,"children":7089},{"style":1063},[7090],{"type":998,"value":1163},{"type":993,"tag":1026,"props":7092,"children":7093},{"style":1057},[7094],{"type":998,"value":7095}," f:\n",{"type":993,"tag":1026,"props":7097,"children":7098},{"class":1028,"line":36},[7099,7103,7107],{"type":993,"tag":1026,"props":7100,"children":7101},{"style":1057},[7102],{"type":998,"value":1276},{"type":993,"tag":1026,"props":7104,"children":7105},{"style":1063},[7106],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7108,"children":7109},{"style":1057},[7110],{"type":998,"value":7111}," f.read()\n",{"type":993,"tag":1026,"props":7113,"children":7114},{"class":1028,"line":45},[7115],{"type":993,"tag":1026,"props":7116,"children":7117},{"emptyLinePlaceholder":13},[7118],{"type":998,"value":1043},{"type":993,"tag":1026,"props":7120,"children":7121},{"class":1028,"line":54},[7122],{"type":993,"tag":1026,"props":7123,"children":7124},{"style":1032},[7125],{"type":998,"value":7126},"# Read all lines\n",{"type":993,"tag":1026,"props":7128,"children":7129},{"class":1028,"line":63},[7130,7134,7138,7142,7146,7150,7154,7158,7162],{"type":993,"tag":1026,"props":7131,"children":7132},{"style":1063},[7133],{"type":998,"value":1127},{"type":993,"tag":1026,"props":7135,"children":7136},{"style":1130},[7137],{"type":998,"value":1133},{"type":993,"tag":1026,"props":7139,"children":7140},{"style":1057},[7141],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7143,"children":7144},{"style":1069},[7145],{"type":998,"value":7074},{"type":993,"tag":1026,"props":7147,"children":7148},{"style":1057},[7149],{"type":998,"value":1148},{"type":993,"tag":1026,"props":7151,"children":7152},{"style":1069},[7153],{"type":998,"value":1252},{"type":993,"tag":1026,"props":7155,"children":7156},{"style":1057},[7157],{"type":998,"value":1158},{"type":993,"tag":1026,"props":7159,"children":7160},{"style":1063},[7161],{"type":998,"value":1163},{"type":993,"tag":1026,"props":7163,"children":7164},{"style":1057},[7165],{"type":998,"value":7095},{"type":993,"tag":1026,"props":7167,"children":7168},{"class":1028,"line":72},[7169,7173,7177],{"type":993,"tag":1026,"props":7170,"children":7171},{"style":1057},[7172],{"type":998,"value":1635},{"type":993,"tag":1026,"props":7174,"children":7175},{"style":1063},[7176],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7178,"children":7179},{"style":1057},[7180],{"type":998,"value":7181}," f.readlines()\n",{"type":993,"tag":1026,"props":7183,"children":7184},{"class":1028,"line":81},[7185],{"type":993,"tag":1026,"props":7186,"children":7187},{"emptyLinePlaceholder":13},[7188],{"type":998,"value":1043},{"type":993,"tag":1026,"props":7190,"children":7191},{"class":1028,"line":91},[7192],{"type":993,"tag":1026,"props":7193,"children":7194},{"style":1032},[7195],{"type":998,"value":7196},"# Read line by line (efficient)\n",{"type":993,"tag":1026,"props":7198,"children":7199},{"class":1028,"line":100},[7200,7204,7208,7212,7216,7220,7224,7228,7232],{"type":993,"tag":1026,"props":7201,"children":7202},{"style":1063},[7203],{"type":998,"value":1127},{"type":993,"tag":1026,"props":7205,"children":7206},{"style":1130},[7207],{"type":998,"value":1133},{"type":993,"tag":1026,"props":7209,"children":7210},{"style":1057},[7211],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7213,"children":7214},{"style":1069},[7215],{"type":998,"value":7074},{"type":993,"tag":1026,"props":7217,"children":7218},{"style":1057},[7219],{"type":998,"value":1148},{"type":993,"tag":1026,"props":7221,"children":7222},{"style":1069},[7223],{"type":998,"value":1252},{"type":993,"tag":1026,"props":7225,"children":7226},{"style":1057},[7227],{"type":998,"value":1158},{"type":993,"tag":1026,"props":7229,"children":7230},{"style":1063},[7231],{"type":998,"value":1163},{"type":993,"tag":1026,"props":7233,"children":7234},{"style":1057},[7235],{"type":998,"value":7095},{"type":993,"tag":1026,"props":7237,"children":7238},{"class":1028,"line":109},[7239,7243,7247,7251],{"type":993,"tag":1026,"props":7240,"children":7241},{"style":1063},[7242],{"type":998,"value":1442},{"type":993,"tag":1026,"props":7244,"children":7245},{"style":1057},[7246],{"type":998,"value":2830},{"type":993,"tag":1026,"props":7248,"children":7249},{"style":1063},[7250],{"type":998,"value":1452},{"type":993,"tag":1026,"props":7252,"children":7253},{"style":1057},[7254],{"type":998,"value":7095},{"type":993,"tag":1026,"props":7256,"children":7257},{"class":1028,"line":118},[7258,7262],{"type":993,"tag":1026,"props":7259,"children":7260},{"style":1130},[7261],{"type":998,"value":1488},{"type":993,"tag":1026,"props":7263,"children":7264},{"style":1057},[7265],{"type":998,"value":7266},"(line.strip())\n",{"type":993,"tag":1001,"props":7268,"children":7269},{},[7270],{"type":993,"tag":1825,"props":7271,"children":7272},{},[7273],{"type":998,"value":7274},"Safe Reading Pattern:",{"type":993,"tag":1016,"props":7276,"children":7278},{"className":1018,"code":7277,"language":6,"meta":8,"style":8},"import os\n\nif os.path.exists(\"file.txt\"):\n    try:\n        with open(\"file.txt\", \"r\", encoding=\"utf-8\") as f:\n            content = f.read()\n    except FileNotFoundError:\n        print(\"File not found\")\n    except Exception as e:\n        print(f\"Error: {e}\")\n",[7279],{"type":993,"tag":1022,"props":7280,"children":7281},{"__ignoreMap":8},[7282,7293,7300,7321,7332,7387,7402,7418,7438,7457],{"type":993,"tag":1026,"props":7283,"children":7284},{"class":1028,"line":12},[7285,7289],{"type":993,"tag":1026,"props":7286,"children":7287},{"style":1063},[7288],{"type":998,"value":6278},{"type":993,"tag":1026,"props":7290,"children":7291},{"style":1057},[7292],{"type":998,"value":6283},{"type":993,"tag":1026,"props":7294,"children":7295},{"class":1028,"line":27},[7296],{"type":993,"tag":1026,"props":7297,"children":7298},{"emptyLinePlaceholder":13},[7299],{"type":998,"value":1043},{"type":993,"tag":1026,"props":7301,"children":7302},{"class":1028,"line":36},[7303,7308,7313,7317],{"type":993,"tag":1026,"props":7304,"children":7305},{"style":1063},[7306],{"type":998,"value":7307},"if",{"type":993,"tag":1026,"props":7309,"children":7310},{"style":1057},[7311],{"type":998,"value":7312}," os.path.exists(",{"type":993,"tag":1026,"props":7314,"children":7315},{"style":1069},[7316],{"type":998,"value":7074},{"type":993,"tag":1026,"props":7318,"children":7319},{"style":1057},[7320],{"type":998,"value":1480},{"type":993,"tag":1026,"props":7322,"children":7323},{"class":1028,"line":45},[7324,7328],{"type":993,"tag":1026,"props":7325,"children":7326},{"style":1063},[7327],{"type":998,"value":6433},{"type":993,"tag":1026,"props":7329,"children":7330},{"style":1057},[7331],{"type":998,"value":1174},{"type":993,"tag":1026,"props":7333,"children":7334},{"class":1028,"line":54},[7335,7339,7343,7347,7351,7355,7359,7363,7367,7371,7375,7379,7383],{"type":993,"tag":1026,"props":7336,"children":7337},{"style":1063},[7338],{"type":998,"value":6445},{"type":993,"tag":1026,"props":7340,"children":7341},{"style":1130},[7342],{"type":998,"value":1133},{"type":993,"tag":1026,"props":7344,"children":7345},{"style":1057},[7346],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7348,"children":7349},{"style":1069},[7350],{"type":998,"value":7074},{"type":993,"tag":1026,"props":7352,"children":7353},{"style":1057},[7354],{"type":998,"value":1148},{"type":993,"tag":1026,"props":7356,"children":7357},{"style":1069},[7358],{"type":998,"value":1252},{"type":993,"tag":1026,"props":7360,"children":7361},{"style":1057},[7362],{"type":998,"value":1148},{"type":993,"tag":1026,"props":7364,"children":7365},{"style":1166},[7366],{"type":998,"value":6467},{"type":993,"tag":1026,"props":7368,"children":7369},{"style":1063},[7370],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7372,"children":7373},{"style":1069},[7374],{"type":998,"value":6476},{"type":993,"tag":1026,"props":7376,"children":7377},{"style":1057},[7378],{"type":998,"value":1158},{"type":993,"tag":1026,"props":7380,"children":7381},{"style":1063},[7382],{"type":998,"value":1163},{"type":993,"tag":1026,"props":7384,"children":7385},{"style":1057},[7386],{"type":998,"value":7095},{"type":993,"tag":1026,"props":7388,"children":7389},{"class":1028,"line":63},[7390,7394,7398],{"type":993,"tag":1026,"props":7391,"children":7392},{"style":1057},[7393],{"type":998,"value":6500},{"type":993,"tag":1026,"props":7395,"children":7396},{"style":1063},[7397],{"type":998,"value":1066},{"type":993,"tag":1026,"props":7399,"children":7400},{"style":1057},[7401],{"type":998,"value":7111},{"type":993,"tag":1026,"props":7403,"children":7404},{"class":1028,"line":72},[7405,7409,7414],{"type":993,"tag":1026,"props":7406,"children":7407},{"style":1063},[7408],{"type":998,"value":6598},{"type":993,"tag":1026,"props":7410,"children":7411},{"style":1130},[7412],{"type":998,"value":7413}," FileNotFoundError",{"type":993,"tag":1026,"props":7415,"children":7416},{"style":1057},[7417],{"type":998,"value":1174},{"type":993,"tag":1026,"props":7419,"children":7420},{"class":1028,"line":81},[7421,7425,7429,7434],{"type":993,"tag":1026,"props":7422,"children":7423},{"style":1130},[7424],{"type":998,"value":1488},{"type":993,"tag":1026,"props":7426,"children":7427},{"style":1057},[7428],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7430,"children":7431},{"style":1069},[7432],{"type":998,"value":7433},"\"File not found\"",{"type":993,"tag":1026,"props":7435,"children":7436},{"style":1057},[7437],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7439,"children":7440},{"class":1028,"line":91},[7441,7445,7449,7453],{"type":993,"tag":1026,"props":7442,"children":7443},{"style":1063},[7444],{"type":998,"value":6598},{"type":993,"tag":1026,"props":7446,"children":7447},{"style":1130},[7448],{"type":998,"value":6717},{"type":993,"tag":1026,"props":7450,"children":7451},{"style":1063},[7452],{"type":998,"value":6722},{"type":993,"tag":1026,"props":7454,"children":7455},{"style":1057},[7456],{"type":998,"value":6727},{"type":993,"tag":1026,"props":7458,"children":7459},{"class":1028,"line":100},[7460,7464,7468,7472,7477,7481,7485,7489,7493],{"type":993,"tag":1026,"props":7461,"children":7462},{"style":1130},[7463],{"type":998,"value":1488},{"type":993,"tag":1026,"props":7465,"children":7466},{"style":1057},[7467],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7469,"children":7470},{"style":1063},[7471],{"type":998,"value":1318},{"type":993,"tag":1026,"props":7473,"children":7474},{"style":1069},[7475],{"type":998,"value":7476},"\"Error: ",{"type":993,"tag":1026,"props":7478,"children":7479},{"style":1130},[7480],{"type":998,"value":1506},{"type":993,"tag":1026,"props":7482,"children":7483},{"style":1057},[7484],{"type":998,"value":6756},{"type":993,"tag":1026,"props":7486,"children":7487},{"style":1130},[7488],{"type":998,"value":1338},{"type":993,"tag":1026,"props":7490,"children":7491},{"style":1069},[7492],{"type":998,"value":1343},{"type":993,"tag":1026,"props":7494,"children":7495},{"style":1057},[7496],{"type":998,"value":1224},{"type":993,"tag":1001,"props":7498,"children":7499},{},[7500],{"type":993,"tag":1825,"props":7501,"children":7502},{},[7503],{"type":998,"value":7504},"Memory-Efficient Pattern:",{"type":993,"tag":1016,"props":7506,"children":7508},{"className":1018,"code":7507,"language":6,"meta":8,"style":8},"# For large files\nwith open(\"large_file.txt\", \"r\") as f:\n    for line_num, line in enumerate(f, 1):\n        # Process one line at a time\n        process_line(line.strip())\n",[7509],{"type":993,"tag":1022,"props":7510,"children":7511},{"__ignoreMap":8},[7512,7520,7560,7592,7600],{"type":993,"tag":1026,"props":7513,"children":7514},{"class":1028,"line":12},[7515],{"type":993,"tag":1026,"props":7516,"children":7517},{"style":1032},[7518],{"type":998,"value":7519},"# For large files\n",{"type":993,"tag":1026,"props":7521,"children":7522},{"class":1028,"line":27},[7523,7527,7531,7535,7540,7544,7548,7552,7556],{"type":993,"tag":1026,"props":7524,"children":7525},{"style":1063},[7526],{"type":998,"value":1127},{"type":993,"tag":1026,"props":7528,"children":7529},{"style":1130},[7530],{"type":998,"value":1133},{"type":993,"tag":1026,"props":7532,"children":7533},{"style":1057},[7534],{"type":998,"value":1138},{"type":993,"tag":1026,"props":7536,"children":7537},{"style":1069},[7538],{"type":998,"value":7539},"\"large_file.txt\"",{"type":993,"tag":1026,"props":7541,"children":7542},{"style":1057},[7543],{"type":998,"value":1148},{"type":993,"tag":1026,"props":7545,"children":7546},{"style":1069},[7547],{"type":998,"value":1252},{"type":993,"tag":1026,"props":7549,"children":7550},{"style":1057},[7551],{"type":998,"value":1158},{"type":993,"tag":1026,"props":7553,"children":7554},{"style":1063},[7555],{"type":998,"value":1163},{"type":993,"tag":1026,"props":7557,"children":7558},{"style":1057},[7559],{"type":998,"value":7095},{"type":993,"tag":1026,"props":7561,"children":7562},{"class":1028,"line":36},[7563,7567,7571,7575,7579,7584,7588],{"type":993,"tag":1026,"props":7564,"children":7565},{"style":1063},[7566],{"type":998,"value":1442},{"type":993,"tag":1026,"props":7568,"children":7569},{"style":1057},[7570],{"type":998,"value":2583},{"type":993,"tag":1026,"props":7572,"children":7573},{"style":1063},[7574],{"type":998,"value":1452},{"type":993,"tag":1026,"props":7576,"children":7577},{"style":1130},[7578],{"type":998,"value":1457},{"type":993,"tag":1026,"props":7580,"children":7581},{"style":1057},[7582],{"type":998,"value":7583},"(f, ",{"type":993,"tag":1026,"props":7585,"children":7586},{"style":1130},[7587],{"type":998,"value":1475},{"type":993,"tag":1026,"props":7589,"children":7590},{"style":1057},[7591],{"type":998,"value":1480},{"type":993,"tag":1026,"props":7593,"children":7594},{"class":1028,"line":45},[7595],{"type":993,"tag":1026,"props":7596,"children":7597},{"style":1032},[7598],{"type":998,"value":7599},"        # Process one line at a time\n",{"type":993,"tag":1026,"props":7601,"children":7602},{"class":1028,"line":54},[7603],{"type":993,"tag":1026,"props":7604,"children":7605},{"style":1057},[7606],{"type":998,"value":7607},"        process_line(line.strip())\n",{"type":993,"tag":1803,"props":7609,"children":7611},{"id":7610},"essential-file-reading-methods",[7612],{"type":998,"value":7613},"Essential File Reading Methods",{"type":993,"tag":1001,"props":7615,"children":7616},{},[7617],{"type":998,"value":7618},"Understanding core file reading methods enables efficient data processing and proper file handling in Python applications.",{"type":993,"tag":7620,"props":7621,"children":7622},"table",{},[7623,7652],{"type":993,"tag":7624,"props":7625,"children":7626},"thead",{},[7627],{"type":993,"tag":7628,"props":7629,"children":7630},"tr",{},[7631,7637,7642,7647],{"type":993,"tag":7632,"props":7633,"children":7634},"th",{},[7635],{"type":998,"value":7636},"Method",{"type":993,"tag":7632,"props":7638,"children":7639},{},[7640],{"type":998,"value":7641},"Purpose",{"type":993,"tag":7632,"props":7643,"children":7644},{},[7645],{"type":998,"value":7646},"Example",{"type":993,"tag":7632,"props":7648,"children":7649},{},[7650],{"type":998,"value":7651},"Best Practice",{"type":993,"tag":7653,"props":7654,"children":7655},"tbody",{},[7656,7688,7719,7750,7781,7810,7841,7872],{"type":993,"tag":7628,"props":7657,"children":7658},{},[7659,7669,7674,7683],{"type":993,"tag":7660,"props":7661,"children":7662},"td",{},[7663],{"type":993,"tag":1022,"props":7664,"children":7666},{"className":7665},[],[7667],{"type":998,"value":7668},"file.read()",{"type":993,"tag":7660,"props":7670,"children":7671},{},[7672],{"type":998,"value":7673},"Read entire file content",{"type":993,"tag":7660,"props":7675,"children":7676},{},[7677],{"type":993,"tag":1022,"props":7678,"children":7680},{"className":7679},[],[7681],{"type":998,"value":7682},"content = file.read()",{"type":993,"tag":7660,"props":7684,"children":7685},{},[7686],{"type":998,"value":7687},"Good for small files",{"type":993,"tag":7628,"props":7689,"children":7690},{},[7691,7700,7705,7714],{"type":993,"tag":7660,"props":7692,"children":7693},{},[7694],{"type":993,"tag":1022,"props":7695,"children":7697},{"className":7696},[],[7698],{"type":998,"value":7699},"file.read(size)",{"type":993,"tag":7660,"props":7701,"children":7702},{},[7703],{"type":998,"value":7704},"Read specific number of characters",{"type":993,"tag":7660,"props":7706,"children":7707},{},[7708],{"type":993,"tag":1022,"props":7709,"children":7711},{"className":7710},[],[7712],{"type":998,"value":7713},"chunk = file.read(1024)",{"type":993,"tag":7660,"props":7715,"children":7716},{},[7717],{"type":998,"value":7718},"Control memory usage",{"type":993,"tag":7628,"props":7720,"children":7721},{},[7722,7731,7736,7745],{"type":993,"tag":7660,"props":7723,"children":7724},{},[7725],{"type":993,"tag":1022,"props":7726,"children":7728},{"className":7727},[],[7729],{"type":998,"value":7730},"file.readline()",{"type":993,"tag":7660,"props":7732,"children":7733},{},[7734],{"type":998,"value":7735},"Read single line",{"type":993,"tag":7660,"props":7737,"children":7738},{},[7739],{"type":993,"tag":1022,"props":7740,"children":7742},{"className":7741},[],[7743],{"type":998,"value":7744},"line = file.readline()",{"type":993,"tag":7660,"props":7746,"children":7747},{},[7748],{"type":998,"value":7749},"Process files line by line",{"type":993,"tag":7628,"props":7751,"children":7752},{},[7753,7762,7767,7776],{"type":993,"tag":7660,"props":7754,"children":7755},{},[7756],{"type":993,"tag":1022,"props":7757,"children":7759},{"className":7758},[],[7760],{"type":998,"value":7761},"file.readlines()",{"type":993,"tag":7660,"props":7763,"children":7764},{},[7765],{"type":998,"value":7766},"Read all lines into list",{"type":993,"tag":7660,"props":7768,"children":7769},{},[7770],{"type":993,"tag":1022,"props":7771,"children":7773},{"className":7772},[],[7774],{"type":998,"value":7775},"lines = file.readlines()",{"type":993,"tag":7660,"props":7777,"children":7778},{},[7779],{"type":998,"value":7780},"Use for small to medium files",{"type":993,"tag":7628,"props":7782,"children":7783},{},[7784,7792,7797,7805],{"type":993,"tag":7660,"props":7785,"children":7786},{},[7787],{"type":993,"tag":1022,"props":7788,"children":7790},{"className":7789},[],[7791],{"type":998,"value":1901},{"type":993,"tag":7660,"props":7793,"children":7794},{},[7795],{"type":998,"value":7796},"Iterate through lines",{"type":993,"tag":7660,"props":7798,"children":7799},{},[7800],{"type":993,"tag":1022,"props":7801,"children":7803},{"className":7802},[],[7804],{"type":998,"value":1901},{"type":993,"tag":7660,"props":7806,"children":7807},{},[7808],{"type":998,"value":7809},"Most memory-efficient",{"type":993,"tag":7628,"props":7811,"children":7812},{},[7813,7822,7827,7836],{"type":993,"tag":7660,"props":7814,"children":7815},{},[7816],{"type":993,"tag":1022,"props":7817,"children":7819},{"className":7818},[],[7820],{"type":998,"value":7821},"file.seek(position)",{"type":993,"tag":7660,"props":7823,"children":7824},{},[7825],{"type":998,"value":7826},"Move to position in file",{"type":993,"tag":7660,"props":7828,"children":7829},{},[7830],{"type":993,"tag":1022,"props":7831,"children":7833},{"className":7832},[],[7834],{"type":998,"value":7835},"file.seek(0)",{"type":993,"tag":7660,"props":7837,"children":7838},{},[7839],{"type":998,"value":7840},"Reset to beginning",{"type":993,"tag":7628,"props":7842,"children":7843},{},[7844,7853,7858,7867],{"type":993,"tag":7660,"props":7845,"children":7846},{},[7847],{"type":993,"tag":1022,"props":7848,"children":7850},{"className":7849},[],[7851],{"type":998,"value":7852},"file.tell()",{"type":993,"tag":7660,"props":7854,"children":7855},{},[7856],{"type":998,"value":7857},"Get current position",{"type":993,"tag":7660,"props":7859,"children":7860},{},[7861],{"type":993,"tag":1022,"props":7862,"children":7864},{"className":7863},[],[7865],{"type":998,"value":7866},"pos = file.tell()",{"type":993,"tag":7660,"props":7868,"children":7869},{},[7870],{"type":998,"value":7871},"Track file pointer location",{"type":993,"tag":7628,"props":7873,"children":7874},{},[7875,7884,7889,7898],{"type":993,"tag":7660,"props":7876,"children":7877},{},[7878],{"type":993,"tag":1022,"props":7879,"children":7881},{"className":7880},[],[7882],{"type":998,"value":7883},"file.readable()",{"type":993,"tag":7660,"props":7885,"children":7886},{},[7887],{"type":998,"value":7888},"Check if file is readable",{"type":993,"tag":7660,"props":7890,"children":7891},{},[7892],{"type":993,"tag":1022,"props":7893,"children":7895},{"className":7894},[],[7896],{"type":998,"value":7897},"can_read = file.readable()",{"type":993,"tag":7660,"props":7899,"children":7900},{},[7901],{"type":998,"value":7902},"Verify before reading",{"type":993,"tag":1001,"props":7904,"children":7905},{},[7906],{"type":998,"value":7907},"Reading files effectively is a fundamental skill for Python programmers. Whether you're processing configuration files, analyzing log data, or reading user input, these techniques will help you handle files safely and efficiently.",{"type":993,"tag":7909,"props":7910,"children":7912},"content-exercise",{":widget-view":7911,"category":6,"id":830},"true",[],{"type":993,"tag":1803,"props":7914,"children":7916},{"id":7915},"test-your-knowledge",[7917],{"type":998,"value":7918},"Test Your Knowledge",{"type":993,"tag":1001,"props":7920,"children":7921},{},[7922],{"type":998,"value":7923},"Test your understanding of file reading techniques:",{"type":993,"tag":7925,"props":7926,"children":7930},"redirect-button",{"icon":7927,"label":7928,"url":7929},"pi pi-send","Take Quiz","/tutorial-quiz/python/reading-files",[],{"type":993,"tag":1803,"props":7932,"children":7934},{"id":7933},"whats-next",[7935],{"type":998,"value":7936},"What's Next?",{"type":993,"tag":1001,"props":7938,"children":7939},{},[7940],{"type":998,"value":7941},"Now that you've mastered reading files, you're ready to learn about writing files. Discover how to create new files, save data, and update existing content effectively.",{"type":993,"tag":1001,"props":7943,"children":7944},{},[7945,7947,7952],{"type":998,"value":7946},"Ready to continue? Check out our lesson on ",{"type":993,"tag":7948,"props":7949,"children":7950},"a",{"href":836},[7951],{"type":998,"value":837},{"type":998,"value":7953},".",{"type":993,"tag":7955,"props":7956,"children":7957},"style",{},[7958],{"type":998,"value":7959},"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":7961},[7962,7967,7968,7971,7972,7973,7974],{"id":1805,"depth":27,"text":1808,"children":7963},[7964,7965,7966],{"id":2025,"depth":36,"text":2028},{"id":3107,"depth":36,"text":3110},{"id":4034,"depth":36,"text":4037},{"id":5270,"depth":27,"text":5273},{"id":6143,"depth":27,"text":6146,"children":7969},[7970],{"id":6257,"depth":36,"text":6260},{"id":7018,"depth":27,"text":7021},{"id":7610,"depth":27,"text":7613},{"id":7915,"depth":27,"text":7918},{"id":7933,"depth":27,"text":7936},1782373750527]