[{"data":1,"prerenderedAt":6420},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/returning-values":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},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[634],{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"body":989,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},{"type":990,"children":991,"toc":6405},"root",[992,1000,1006,1416,1423,1428,1828,1834,1839,2297,2303,2308,2991,3049,3055,3247,3253,3258,3844,3850,3855,4677,4683,4690,4695,5126,5132,5137,5732,5786,5791,6018,6024,6346,6359,6365,6370,6377,6383,6388,6399],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":638},[997],{"type":998,"value":999},"text","🔄 Returning Values",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Return statements are how functions communicate results back to the code that calls them. Python functions can return single values, multiple values, or different values based on conditions, making them powerful tools for data processing and decision-making workflows.",{"type":993,"tag":1007,"props":1008,"children":1009},"code-try",{},[1010],{"type":993,"tag":1011,"props":1012,"children":1015},"pre",{"className":1013,"code":1014,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Different types of return values\ndef calculate_stats(numbers):\n    \"\"\"Return multiple statistics about a list of numbers\"\"\"\n    if not numbers:\n        return None, None, None  # Handle empty list\n    \n    total = sum(numbers)\n    average = total / len(numbers)\n    maximum = max(numbers)\n    \n    return total, average, maximum  # Return multiple values\n\n# Use the returned values\nscores = [85, 92, 78, 96, 88]\ntotal, avg, max_score = calculate_stats(scores)\n\nprint(f\"Total: {total}, Average: {avg:.1f}, Max: {max_score}\")\n",[1016],{"type":993,"tag":1017,"props":1018,"children":1019},"code",{"__ignoreMap":8},[1020,1031,1052,1061,1079,1116,1124,1147,1178,1199,1206,1224,1232,1240,1303,1320,1327],{"type":993,"tag":1021,"props":1022,"children":1024},"span",{"class":1023,"line":12},"line",[1025],{"type":993,"tag":1021,"props":1026,"children":1028},{"style":1027},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1029],{"type":998,"value":1030},"# Different types of return values\n",{"type":993,"tag":1021,"props":1032,"children":1033},{"class":1023,"line":27},[1034,1040,1046],{"type":993,"tag":1021,"props":1035,"children":1037},{"style":1036},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1038],{"type":998,"value":1039},"def",{"type":993,"tag":1021,"props":1041,"children":1043},{"style":1042},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1044],{"type":998,"value":1045}," calculate_stats",{"type":993,"tag":1021,"props":1047,"children":1049},{"style":1048},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1050],{"type":998,"value":1051},"(numbers):\n",{"type":993,"tag":1021,"props":1053,"children":1054},{"class":1023,"line":36},[1055],{"type":993,"tag":1021,"props":1056,"children":1058},{"style":1057},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1059],{"type":998,"value":1060},"    \"\"\"Return multiple statistics about a list of numbers\"\"\"\n",{"type":993,"tag":1021,"props":1062,"children":1063},{"class":1023,"line":45},[1064,1069,1074],{"type":993,"tag":1021,"props":1065,"children":1066},{"style":1036},[1067],{"type":998,"value":1068},"    if",{"type":993,"tag":1021,"props":1070,"children":1071},{"style":1036},[1072],{"type":998,"value":1073}," not",{"type":993,"tag":1021,"props":1075,"children":1076},{"style":1048},[1077],{"type":998,"value":1078}," numbers:\n",{"type":993,"tag":1021,"props":1080,"children":1081},{"class":1023,"line":54},[1082,1087,1093,1098,1103,1107,1111],{"type":993,"tag":1021,"props":1083,"children":1084},{"style":1036},[1085],{"type":998,"value":1086},"        return",{"type":993,"tag":1021,"props":1088,"children":1090},{"style":1089},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1091],{"type":998,"value":1092}," None",{"type":993,"tag":1021,"props":1094,"children":1095},{"style":1048},[1096],{"type":998,"value":1097},", ",{"type":993,"tag":1021,"props":1099,"children":1100},{"style":1089},[1101],{"type":998,"value":1102},"None",{"type":993,"tag":1021,"props":1104,"children":1105},{"style":1048},[1106],{"type":998,"value":1097},{"type":993,"tag":1021,"props":1108,"children":1109},{"style":1089},[1110],{"type":998,"value":1102},{"type":993,"tag":1021,"props":1112,"children":1113},{"style":1027},[1114],{"type":998,"value":1115},"  # Handle empty list\n",{"type":993,"tag":1021,"props":1117,"children":1118},{"class":1023,"line":63},[1119],{"type":993,"tag":1021,"props":1120,"children":1121},{"style":1048},[1122],{"type":998,"value":1123},"    \n",{"type":993,"tag":1021,"props":1125,"children":1126},{"class":1023,"line":72},[1127,1132,1137,1142],{"type":993,"tag":1021,"props":1128,"children":1129},{"style":1048},[1130],{"type":998,"value":1131},"    total ",{"type":993,"tag":1021,"props":1133,"children":1134},{"style":1036},[1135],{"type":998,"value":1136},"=",{"type":993,"tag":1021,"props":1138,"children":1139},{"style":1089},[1140],{"type":998,"value":1141}," sum",{"type":993,"tag":1021,"props":1143,"children":1144},{"style":1048},[1145],{"type":998,"value":1146},"(numbers)\n",{"type":993,"tag":1021,"props":1148,"children":1149},{"class":1023,"line":81},[1150,1155,1159,1164,1169,1174],{"type":993,"tag":1021,"props":1151,"children":1152},{"style":1048},[1153],{"type":998,"value":1154},"    average ",{"type":993,"tag":1021,"props":1156,"children":1157},{"style":1036},[1158],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1160,"children":1161},{"style":1048},[1162],{"type":998,"value":1163}," total ",{"type":993,"tag":1021,"props":1165,"children":1166},{"style":1036},[1167],{"type":998,"value":1168},"/",{"type":993,"tag":1021,"props":1170,"children":1171},{"style":1089},[1172],{"type":998,"value":1173}," len",{"type":993,"tag":1021,"props":1175,"children":1176},{"style":1048},[1177],{"type":998,"value":1146},{"type":993,"tag":1021,"props":1179,"children":1180},{"class":1023,"line":91},[1181,1186,1190,1195],{"type":993,"tag":1021,"props":1182,"children":1183},{"style":1048},[1184],{"type":998,"value":1185},"    maximum ",{"type":993,"tag":1021,"props":1187,"children":1188},{"style":1036},[1189],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1191,"children":1192},{"style":1089},[1193],{"type":998,"value":1194}," max",{"type":993,"tag":1021,"props":1196,"children":1197},{"style":1048},[1198],{"type":998,"value":1146},{"type":993,"tag":1021,"props":1200,"children":1201},{"class":1023,"line":100},[1202],{"type":993,"tag":1021,"props":1203,"children":1204},{"style":1048},[1205],{"type":998,"value":1123},{"type":993,"tag":1021,"props":1207,"children":1208},{"class":1023,"line":109},[1209,1214,1219],{"type":993,"tag":1021,"props":1210,"children":1211},{"style":1036},[1212],{"type":998,"value":1213},"    return",{"type":993,"tag":1021,"props":1215,"children":1216},{"style":1048},[1217],{"type":998,"value":1218}," total, average, maximum  ",{"type":993,"tag":1021,"props":1220,"children":1221},{"style":1027},[1222],{"type":998,"value":1223},"# Return multiple values\n",{"type":993,"tag":1021,"props":1225,"children":1226},{"class":1023,"line":118},[1227],{"type":993,"tag":1021,"props":1228,"children":1229},{"emptyLinePlaceholder":13},[1230],{"type":998,"value":1231},"\n",{"type":993,"tag":1021,"props":1233,"children":1234},{"class":1023,"line":127},[1235],{"type":993,"tag":1021,"props":1236,"children":1237},{"style":1027},[1238],{"type":998,"value":1239},"# Use the returned values\n",{"type":993,"tag":1021,"props":1241,"children":1242},{"class":1023,"line":136},[1243,1248,1252,1257,1262,1266,1271,1275,1280,1284,1289,1293,1298],{"type":993,"tag":1021,"props":1244,"children":1245},{"style":1048},[1246],{"type":998,"value":1247},"scores ",{"type":993,"tag":1021,"props":1249,"children":1250},{"style":1036},[1251],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1253,"children":1254},{"style":1048},[1255],{"type":998,"value":1256}," [",{"type":993,"tag":1021,"props":1258,"children":1259},{"style":1089},[1260],{"type":998,"value":1261},"85",{"type":993,"tag":1021,"props":1263,"children":1264},{"style":1048},[1265],{"type":998,"value":1097},{"type":993,"tag":1021,"props":1267,"children":1268},{"style":1089},[1269],{"type":998,"value":1270},"92",{"type":993,"tag":1021,"props":1272,"children":1273},{"style":1048},[1274],{"type":998,"value":1097},{"type":993,"tag":1021,"props":1276,"children":1277},{"style":1089},[1278],{"type":998,"value":1279},"78",{"type":993,"tag":1021,"props":1281,"children":1282},{"style":1048},[1283],{"type":998,"value":1097},{"type":993,"tag":1021,"props":1285,"children":1286},{"style":1089},[1287],{"type":998,"value":1288},"96",{"type":993,"tag":1021,"props":1290,"children":1291},{"style":1048},[1292],{"type":998,"value":1097},{"type":993,"tag":1021,"props":1294,"children":1295},{"style":1089},[1296],{"type":998,"value":1297},"88",{"type":993,"tag":1021,"props":1299,"children":1300},{"style":1048},[1301],{"type":998,"value":1302},"]\n",{"type":993,"tag":1021,"props":1304,"children":1305},{"class":1023,"line":146},[1306,1311,1315],{"type":993,"tag":1021,"props":1307,"children":1308},{"style":1048},[1309],{"type":998,"value":1310},"total, avg, max_score ",{"type":993,"tag":1021,"props":1312,"children":1313},{"style":1036},[1314],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1316,"children":1317},{"style":1048},[1318],{"type":998,"value":1319}," calculate_stats(scores)\n",{"type":993,"tag":1021,"props":1321,"children":1322},{"class":1023,"line":155},[1323],{"type":993,"tag":1021,"props":1324,"children":1325},{"emptyLinePlaceholder":13},[1326],{"type":998,"value":1231},{"type":993,"tag":1021,"props":1328,"children":1329},{"class":1023,"line":164},[1330,1335,1340,1345,1350,1355,1360,1365,1370,1374,1379,1384,1388,1393,1397,1402,1406,1411],{"type":993,"tag":1021,"props":1331,"children":1332},{"style":1089},[1333],{"type":998,"value":1334},"print",{"type":993,"tag":1021,"props":1336,"children":1337},{"style":1048},[1338],{"type":998,"value":1339},"(",{"type":993,"tag":1021,"props":1341,"children":1342},{"style":1036},[1343],{"type":998,"value":1344},"f",{"type":993,"tag":1021,"props":1346,"children":1347},{"style":1057},[1348],{"type":998,"value":1349},"\"Total: ",{"type":993,"tag":1021,"props":1351,"children":1352},{"style":1089},[1353],{"type":998,"value":1354},"{",{"type":993,"tag":1021,"props":1356,"children":1357},{"style":1048},[1358],{"type":998,"value":1359},"total",{"type":993,"tag":1021,"props":1361,"children":1362},{"style":1089},[1363],{"type":998,"value":1364},"}",{"type":993,"tag":1021,"props":1366,"children":1367},{"style":1057},[1368],{"type":998,"value":1369},", Average: ",{"type":993,"tag":1021,"props":1371,"children":1372},{"style":1089},[1373],{"type":998,"value":1354},{"type":993,"tag":1021,"props":1375,"children":1376},{"style":1048},[1377],{"type":998,"value":1378},"avg",{"type":993,"tag":1021,"props":1380,"children":1381},{"style":1036},[1382],{"type":998,"value":1383},":.1f",{"type":993,"tag":1021,"props":1385,"children":1386},{"style":1089},[1387],{"type":998,"value":1364},{"type":993,"tag":1021,"props":1389,"children":1390},{"style":1057},[1391],{"type":998,"value":1392},", Max: ",{"type":993,"tag":1021,"props":1394,"children":1395},{"style":1089},[1396],{"type":998,"value":1354},{"type":993,"tag":1021,"props":1398,"children":1399},{"style":1048},[1400],{"type":998,"value":1401},"max_score",{"type":993,"tag":1021,"props":1403,"children":1404},{"style":1089},[1405],{"type":998,"value":1364},{"type":993,"tag":1021,"props":1407,"children":1408},{"style":1057},[1409],{"type":998,"value":1410},"\"",{"type":993,"tag":1021,"props":1412,"children":1413},{"style":1048},[1414],{"type":998,"value":1415},")\n",{"type":993,"tag":1417,"props":1418,"children":1420},"h2",{"id":1419},"single-value-returns",[1421],{"type":998,"value":1422},"🎯 Single Value Returns",{"type":993,"tag":1001,"props":1424,"children":1425},{},[1426],{"type":998,"value":1427},"Returning single values is the most common pattern, where functions perform calculations or operations and send back one result to the caller.",{"type":993,"tag":1007,"props":1429,"children":1430},{},[1431],{"type":993,"tag":1011,"props":1432,"children":1434},{"className":1013,"code":1433,"language":6,"meta":8,"style":8},"def calculate_discount(price, discount_percent):\n    \"\"\"Calculate discounted price\"\"\"\n    discount_amount = price * (discount_percent / 100)\n    return price - discount_amount\n\ndef validate_password(password):\n    \"\"\"Check if password meets requirements\"\"\"\n    if len(password) \u003C 8:\n        return False\n    if not any(char.isdigit() for char in password):\n        return False\n    return True\n\n# Single value returns\ndiscounted_price = calculate_discount(100, 15)\nis_valid = validate_password(\"mypass123\")\n\nprint(f\"Discounted price: ${discounted_price}\")\nprint(f\"Password valid: {is_valid}\")\n",[1435],{"type":993,"tag":1017,"props":1436,"children":1437},{"__ignoreMap":8},[1438,1455,1463,1503,1524,1531,1548,1556,1587,1599,1640,1651,1663,1670,1678,1713,1739,1746,1787],{"type":993,"tag":1021,"props":1439,"children":1440},{"class":1023,"line":12},[1441,1445,1450],{"type":993,"tag":1021,"props":1442,"children":1443},{"style":1036},[1444],{"type":998,"value":1039},{"type":993,"tag":1021,"props":1446,"children":1447},{"style":1042},[1448],{"type":998,"value":1449}," calculate_discount",{"type":993,"tag":1021,"props":1451,"children":1452},{"style":1048},[1453],{"type":998,"value":1454},"(price, discount_percent):\n",{"type":993,"tag":1021,"props":1456,"children":1457},{"class":1023,"line":27},[1458],{"type":993,"tag":1021,"props":1459,"children":1460},{"style":1057},[1461],{"type":998,"value":1462},"    \"\"\"Calculate discounted price\"\"\"\n",{"type":993,"tag":1021,"props":1464,"children":1465},{"class":1023,"line":36},[1466,1471,1475,1480,1485,1490,1494,1499],{"type":993,"tag":1021,"props":1467,"children":1468},{"style":1048},[1469],{"type":998,"value":1470},"    discount_amount ",{"type":993,"tag":1021,"props":1472,"children":1473},{"style":1036},[1474],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1476,"children":1477},{"style":1048},[1478],{"type":998,"value":1479}," price ",{"type":993,"tag":1021,"props":1481,"children":1482},{"style":1036},[1483],{"type":998,"value":1484},"*",{"type":993,"tag":1021,"props":1486,"children":1487},{"style":1048},[1488],{"type":998,"value":1489}," (discount_percent ",{"type":993,"tag":1021,"props":1491,"children":1492},{"style":1036},[1493],{"type":998,"value":1168},{"type":993,"tag":1021,"props":1495,"children":1496},{"style":1089},[1497],{"type":998,"value":1498}," 100",{"type":993,"tag":1021,"props":1500,"children":1501},{"style":1048},[1502],{"type":998,"value":1415},{"type":993,"tag":1021,"props":1504,"children":1505},{"class":1023,"line":45},[1506,1510,1514,1519],{"type":993,"tag":1021,"props":1507,"children":1508},{"style":1036},[1509],{"type":998,"value":1213},{"type":993,"tag":1021,"props":1511,"children":1512},{"style":1048},[1513],{"type":998,"value":1479},{"type":993,"tag":1021,"props":1515,"children":1516},{"style":1036},[1517],{"type":998,"value":1518},"-",{"type":993,"tag":1021,"props":1520,"children":1521},{"style":1048},[1522],{"type":998,"value":1523}," discount_amount\n",{"type":993,"tag":1021,"props":1525,"children":1526},{"class":1023,"line":54},[1527],{"type":993,"tag":1021,"props":1528,"children":1529},{"emptyLinePlaceholder":13},[1530],{"type":998,"value":1231},{"type":993,"tag":1021,"props":1532,"children":1533},{"class":1023,"line":63},[1534,1538,1543],{"type":993,"tag":1021,"props":1535,"children":1536},{"style":1036},[1537],{"type":998,"value":1039},{"type":993,"tag":1021,"props":1539,"children":1540},{"style":1042},[1541],{"type":998,"value":1542}," validate_password",{"type":993,"tag":1021,"props":1544,"children":1545},{"style":1048},[1546],{"type":998,"value":1547},"(password):\n",{"type":993,"tag":1021,"props":1549,"children":1550},{"class":1023,"line":72},[1551],{"type":993,"tag":1021,"props":1552,"children":1553},{"style":1057},[1554],{"type":998,"value":1555},"    \"\"\"Check if password meets requirements\"\"\"\n",{"type":993,"tag":1021,"props":1557,"children":1558},{"class":1023,"line":81},[1559,1563,1567,1572,1577,1582],{"type":993,"tag":1021,"props":1560,"children":1561},{"style":1036},[1562],{"type":998,"value":1068},{"type":993,"tag":1021,"props":1564,"children":1565},{"style":1089},[1566],{"type":998,"value":1173},{"type":993,"tag":1021,"props":1568,"children":1569},{"style":1048},[1570],{"type":998,"value":1571},"(password) ",{"type":993,"tag":1021,"props":1573,"children":1574},{"style":1036},[1575],{"type":998,"value":1576},"\u003C",{"type":993,"tag":1021,"props":1578,"children":1579},{"style":1089},[1580],{"type":998,"value":1581}," 8",{"type":993,"tag":1021,"props":1583,"children":1584},{"style":1048},[1585],{"type":998,"value":1586},":\n",{"type":993,"tag":1021,"props":1588,"children":1589},{"class":1023,"line":91},[1590,1594],{"type":993,"tag":1021,"props":1591,"children":1592},{"style":1036},[1593],{"type":998,"value":1086},{"type":993,"tag":1021,"props":1595,"children":1596},{"style":1089},[1597],{"type":998,"value":1598}," False\n",{"type":993,"tag":1021,"props":1600,"children":1601},{"class":1023,"line":100},[1602,1606,1610,1615,1620,1625,1630,1635],{"type":993,"tag":1021,"props":1603,"children":1604},{"style":1036},[1605],{"type":998,"value":1068},{"type":993,"tag":1021,"props":1607,"children":1608},{"style":1036},[1609],{"type":998,"value":1073},{"type":993,"tag":1021,"props":1611,"children":1612},{"style":1089},[1613],{"type":998,"value":1614}," any",{"type":993,"tag":1021,"props":1616,"children":1617},{"style":1048},[1618],{"type":998,"value":1619},"(char.isdigit() ",{"type":993,"tag":1021,"props":1621,"children":1622},{"style":1036},[1623],{"type":998,"value":1624},"for",{"type":993,"tag":1021,"props":1626,"children":1627},{"style":1048},[1628],{"type":998,"value":1629}," char ",{"type":993,"tag":1021,"props":1631,"children":1632},{"style":1036},[1633],{"type":998,"value":1634},"in",{"type":993,"tag":1021,"props":1636,"children":1637},{"style":1048},[1638],{"type":998,"value":1639}," password):\n",{"type":993,"tag":1021,"props":1641,"children":1642},{"class":1023,"line":109},[1643,1647],{"type":993,"tag":1021,"props":1644,"children":1645},{"style":1036},[1646],{"type":998,"value":1086},{"type":993,"tag":1021,"props":1648,"children":1649},{"style":1089},[1650],{"type":998,"value":1598},{"type":993,"tag":1021,"props":1652,"children":1653},{"class":1023,"line":118},[1654,1658],{"type":993,"tag":1021,"props":1655,"children":1656},{"style":1036},[1657],{"type":998,"value":1213},{"type":993,"tag":1021,"props":1659,"children":1660},{"style":1089},[1661],{"type":998,"value":1662}," True\n",{"type":993,"tag":1021,"props":1664,"children":1665},{"class":1023,"line":127},[1666],{"type":993,"tag":1021,"props":1667,"children":1668},{"emptyLinePlaceholder":13},[1669],{"type":998,"value":1231},{"type":993,"tag":1021,"props":1671,"children":1672},{"class":1023,"line":136},[1673],{"type":993,"tag":1021,"props":1674,"children":1675},{"style":1027},[1676],{"type":998,"value":1677},"# Single value returns\n",{"type":993,"tag":1021,"props":1679,"children":1680},{"class":1023,"line":146},[1681,1686,1690,1695,1700,1704,1709],{"type":993,"tag":1021,"props":1682,"children":1683},{"style":1048},[1684],{"type":998,"value":1685},"discounted_price ",{"type":993,"tag":1021,"props":1687,"children":1688},{"style":1036},[1689],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1691,"children":1692},{"style":1048},[1693],{"type":998,"value":1694}," calculate_discount(",{"type":993,"tag":1021,"props":1696,"children":1697},{"style":1089},[1698],{"type":998,"value":1699},"100",{"type":993,"tag":1021,"props":1701,"children":1702},{"style":1048},[1703],{"type":998,"value":1097},{"type":993,"tag":1021,"props":1705,"children":1706},{"style":1089},[1707],{"type":998,"value":1708},"15",{"type":993,"tag":1021,"props":1710,"children":1711},{"style":1048},[1712],{"type":998,"value":1415},{"type":993,"tag":1021,"props":1714,"children":1715},{"class":1023,"line":155},[1716,1721,1725,1730,1735],{"type":993,"tag":1021,"props":1717,"children":1718},{"style":1048},[1719],{"type":998,"value":1720},"is_valid ",{"type":993,"tag":1021,"props":1722,"children":1723},{"style":1036},[1724],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1726,"children":1727},{"style":1048},[1728],{"type":998,"value":1729}," validate_password(",{"type":993,"tag":1021,"props":1731,"children":1732},{"style":1057},[1733],{"type":998,"value":1734},"\"mypass123\"",{"type":993,"tag":1021,"props":1736,"children":1737},{"style":1048},[1738],{"type":998,"value":1415},{"type":993,"tag":1021,"props":1740,"children":1741},{"class":1023,"line":164},[1742],{"type":993,"tag":1021,"props":1743,"children":1744},{"emptyLinePlaceholder":13},[1745],{"type":998,"value":1231},{"type":993,"tag":1021,"props":1747,"children":1748},{"class":1023,"line":173},[1749,1753,1757,1761,1766,1770,1775,1779,1783],{"type":993,"tag":1021,"props":1750,"children":1751},{"style":1089},[1752],{"type":998,"value":1334},{"type":993,"tag":1021,"props":1754,"children":1755},{"style":1048},[1756],{"type":998,"value":1339},{"type":993,"tag":1021,"props":1758,"children":1759},{"style":1036},[1760],{"type":998,"value":1344},{"type":993,"tag":1021,"props":1762,"children":1763},{"style":1057},[1764],{"type":998,"value":1765},"\"Discounted price: $",{"type":993,"tag":1021,"props":1767,"children":1768},{"style":1089},[1769],{"type":998,"value":1354},{"type":993,"tag":1021,"props":1771,"children":1772},{"style":1048},[1773],{"type":998,"value":1774},"discounted_price",{"type":993,"tag":1021,"props":1776,"children":1777},{"style":1089},[1778],{"type":998,"value":1364},{"type":993,"tag":1021,"props":1780,"children":1781},{"style":1057},[1782],{"type":998,"value":1410},{"type":993,"tag":1021,"props":1784,"children":1785},{"style":1048},[1786],{"type":998,"value":1415},{"type":993,"tag":1021,"props":1788,"children":1789},{"class":1023,"line":182},[1790,1794,1798,1802,1807,1811,1816,1820,1824],{"type":993,"tag":1021,"props":1791,"children":1792},{"style":1089},[1793],{"type":998,"value":1334},{"type":993,"tag":1021,"props":1795,"children":1796},{"style":1048},[1797],{"type":998,"value":1339},{"type":993,"tag":1021,"props":1799,"children":1800},{"style":1036},[1801],{"type":998,"value":1344},{"type":993,"tag":1021,"props":1803,"children":1804},{"style":1057},[1805],{"type":998,"value":1806},"\"Password valid: ",{"type":993,"tag":1021,"props":1808,"children":1809},{"style":1089},[1810],{"type":998,"value":1354},{"type":993,"tag":1021,"props":1812,"children":1813},{"style":1048},[1814],{"type":998,"value":1815},"is_valid",{"type":993,"tag":1021,"props":1817,"children":1818},{"style":1089},[1819],{"type":998,"value":1364},{"type":993,"tag":1021,"props":1821,"children":1822},{"style":1057},[1823],{"type":998,"value":1410},{"type":993,"tag":1021,"props":1825,"children":1826},{"style":1048},[1827],{"type":998,"value":1415},{"type":993,"tag":1417,"props":1829,"children":1831},{"id":1830},"multiple-value-returns",[1832],{"type":998,"value":1833},"⚡ Multiple Value Returns",{"type":993,"tag":1001,"props":1835,"children":1836},{},[1837],{"type":998,"value":1838},"Python functions can return multiple values simultaneously using tuple unpacking, enabling complex calculations that produce several related results in one operation.",{"type":993,"tag":1007,"props":1840,"children":1841},{},[1842],{"type":993,"tag":1011,"props":1843,"children":1845},{"className":1013,"code":1844,"language":6,"meta":8,"style":8},"def parse_name(full_name):\n    \"\"\"Split full name into first and last name\"\"\"\n    parts = full_name.strip().split()\n    if len(parts) >= 2:\n        return parts[0], parts[-1]  # First and last\n    return parts[0], \"\"  # Only first name provided\n\ndef get_file_info(filename):\n    \"\"\"Extract filename and extension\"\"\"\n    if '.' in filename:\n        name, extension = filename.rsplit('.', 1)\n        return name, extension\n    return filename, \"\"\n\n# Unpack multiple return values\nfirst, last = parse_name(\"Alice Johnson\")\nname, ext = get_file_info(\"document.pdf\")\n\nprint(f\"Name: {first} {last}\")\nprint(f\"File: {name}, Extension: {ext}\")\n",[1846],{"type":993,"tag":1017,"props":1847,"children":1848},{"__ignoreMap":8},[1849,1866,1874,1891,1921,1962,1992,1999,2016,2024,2046,2080,2092,2109,2116,2124,2150,2176,2183,2238],{"type":993,"tag":1021,"props":1850,"children":1851},{"class":1023,"line":12},[1852,1856,1861],{"type":993,"tag":1021,"props":1853,"children":1854},{"style":1036},[1855],{"type":998,"value":1039},{"type":993,"tag":1021,"props":1857,"children":1858},{"style":1042},[1859],{"type":998,"value":1860}," parse_name",{"type":993,"tag":1021,"props":1862,"children":1863},{"style":1048},[1864],{"type":998,"value":1865},"(full_name):\n",{"type":993,"tag":1021,"props":1867,"children":1868},{"class":1023,"line":27},[1869],{"type":993,"tag":1021,"props":1870,"children":1871},{"style":1057},[1872],{"type":998,"value":1873},"    \"\"\"Split full name into first and last name\"\"\"\n",{"type":993,"tag":1021,"props":1875,"children":1876},{"class":1023,"line":36},[1877,1882,1886],{"type":993,"tag":1021,"props":1878,"children":1879},{"style":1048},[1880],{"type":998,"value":1881},"    parts ",{"type":993,"tag":1021,"props":1883,"children":1884},{"style":1036},[1885],{"type":998,"value":1136},{"type":993,"tag":1021,"props":1887,"children":1888},{"style":1048},[1889],{"type":998,"value":1890}," full_name.strip().split()\n",{"type":993,"tag":1021,"props":1892,"children":1893},{"class":1023,"line":45},[1894,1898,1902,1907,1912,1917],{"type":993,"tag":1021,"props":1895,"children":1896},{"style":1036},[1897],{"type":998,"value":1068},{"type":993,"tag":1021,"props":1899,"children":1900},{"style":1089},[1901],{"type":998,"value":1173},{"type":993,"tag":1021,"props":1903,"children":1904},{"style":1048},[1905],{"type":998,"value":1906},"(parts) ",{"type":993,"tag":1021,"props":1908,"children":1909},{"style":1036},[1910],{"type":998,"value":1911},">=",{"type":993,"tag":1021,"props":1913,"children":1914},{"style":1089},[1915],{"type":998,"value":1916}," 2",{"type":993,"tag":1021,"props":1918,"children":1919},{"style":1048},[1920],{"type":998,"value":1586},{"type":993,"tag":1021,"props":1922,"children":1923},{"class":1023,"line":54},[1924,1928,1933,1938,1943,1947,1952,1957],{"type":993,"tag":1021,"props":1925,"children":1926},{"style":1036},[1927],{"type":998,"value":1086},{"type":993,"tag":1021,"props":1929,"children":1930},{"style":1048},[1931],{"type":998,"value":1932}," parts[",{"type":993,"tag":1021,"props":1934,"children":1935},{"style":1089},[1936],{"type":998,"value":1937},"0",{"type":993,"tag":1021,"props":1939,"children":1940},{"style":1048},[1941],{"type":998,"value":1942},"], parts[",{"type":993,"tag":1021,"props":1944,"children":1945},{"style":1036},[1946],{"type":998,"value":1518},{"type":993,"tag":1021,"props":1948,"children":1949},{"style":1089},[1950],{"type":998,"value":1951},"1",{"type":993,"tag":1021,"props":1953,"children":1954},{"style":1048},[1955],{"type":998,"value":1956},"]  ",{"type":993,"tag":1021,"props":1958,"children":1959},{"style":1027},[1960],{"type":998,"value":1961},"# First and last\n",{"type":993,"tag":1021,"props":1963,"children":1964},{"class":1023,"line":63},[1965,1969,1973,1977,1982,1987],{"type":993,"tag":1021,"props":1966,"children":1967},{"style":1036},[1968],{"type":998,"value":1213},{"type":993,"tag":1021,"props":1970,"children":1971},{"style":1048},[1972],{"type":998,"value":1932},{"type":993,"tag":1021,"props":1974,"children":1975},{"style":1089},[1976],{"type":998,"value":1937},{"type":993,"tag":1021,"props":1978,"children":1979},{"style":1048},[1980],{"type":998,"value":1981},"], ",{"type":993,"tag":1021,"props":1983,"children":1984},{"style":1057},[1985],{"type":998,"value":1986},"\"\"",{"type":993,"tag":1021,"props":1988,"children":1989},{"style":1027},[1990],{"type":998,"value":1991},"  # Only first name provided\n",{"type":993,"tag":1021,"props":1993,"children":1994},{"class":1023,"line":72},[1995],{"type":993,"tag":1021,"props":1996,"children":1997},{"emptyLinePlaceholder":13},[1998],{"type":998,"value":1231},{"type":993,"tag":1021,"props":2000,"children":2001},{"class":1023,"line":81},[2002,2006,2011],{"type":993,"tag":1021,"props":2003,"children":2004},{"style":1036},[2005],{"type":998,"value":1039},{"type":993,"tag":1021,"props":2007,"children":2008},{"style":1042},[2009],{"type":998,"value":2010}," get_file_info",{"type":993,"tag":1021,"props":2012,"children":2013},{"style":1048},[2014],{"type":998,"value":2015},"(filename):\n",{"type":993,"tag":1021,"props":2017,"children":2018},{"class":1023,"line":91},[2019],{"type":993,"tag":1021,"props":2020,"children":2021},{"style":1057},[2022],{"type":998,"value":2023},"    \"\"\"Extract filename and extension\"\"\"\n",{"type":993,"tag":1021,"props":2025,"children":2026},{"class":1023,"line":100},[2027,2031,2036,2041],{"type":993,"tag":1021,"props":2028,"children":2029},{"style":1036},[2030],{"type":998,"value":1068},{"type":993,"tag":1021,"props":2032,"children":2033},{"style":1057},[2034],{"type":998,"value":2035}," '.'",{"type":993,"tag":1021,"props":2037,"children":2038},{"style":1036},[2039],{"type":998,"value":2040}," in",{"type":993,"tag":1021,"props":2042,"children":2043},{"style":1048},[2044],{"type":998,"value":2045}," filename:\n",{"type":993,"tag":1021,"props":2047,"children":2048},{"class":1023,"line":109},[2049,2054,2058,2063,2068,2072,2076],{"type":993,"tag":1021,"props":2050,"children":2051},{"style":1048},[2052],{"type":998,"value":2053},"        name, extension ",{"type":993,"tag":1021,"props":2055,"children":2056},{"style":1036},[2057],{"type":998,"value":1136},{"type":993,"tag":1021,"props":2059,"children":2060},{"style":1048},[2061],{"type":998,"value":2062}," filename.rsplit(",{"type":993,"tag":1021,"props":2064,"children":2065},{"style":1057},[2066],{"type":998,"value":2067},"'.'",{"type":993,"tag":1021,"props":2069,"children":2070},{"style":1048},[2071],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2073,"children":2074},{"style":1089},[2075],{"type":998,"value":1951},{"type":993,"tag":1021,"props":2077,"children":2078},{"style":1048},[2079],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2081,"children":2082},{"class":1023,"line":118},[2083,2087],{"type":993,"tag":1021,"props":2084,"children":2085},{"style":1036},[2086],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2088,"children":2089},{"style":1048},[2090],{"type":998,"value":2091}," name, extension\n",{"type":993,"tag":1021,"props":2093,"children":2094},{"class":1023,"line":127},[2095,2099,2104],{"type":993,"tag":1021,"props":2096,"children":2097},{"style":1036},[2098],{"type":998,"value":1213},{"type":993,"tag":1021,"props":2100,"children":2101},{"style":1048},[2102],{"type":998,"value":2103}," filename, ",{"type":993,"tag":1021,"props":2105,"children":2106},{"style":1057},[2107],{"type":998,"value":2108},"\"\"\n",{"type":993,"tag":1021,"props":2110,"children":2111},{"class":1023,"line":136},[2112],{"type":993,"tag":1021,"props":2113,"children":2114},{"emptyLinePlaceholder":13},[2115],{"type":998,"value":1231},{"type":993,"tag":1021,"props":2117,"children":2118},{"class":1023,"line":146},[2119],{"type":993,"tag":1021,"props":2120,"children":2121},{"style":1027},[2122],{"type":998,"value":2123},"# Unpack multiple return values\n",{"type":993,"tag":1021,"props":2125,"children":2126},{"class":1023,"line":155},[2127,2132,2136,2141,2146],{"type":993,"tag":1021,"props":2128,"children":2129},{"style":1048},[2130],{"type":998,"value":2131},"first, last ",{"type":993,"tag":1021,"props":2133,"children":2134},{"style":1036},[2135],{"type":998,"value":1136},{"type":993,"tag":1021,"props":2137,"children":2138},{"style":1048},[2139],{"type":998,"value":2140}," parse_name(",{"type":993,"tag":1021,"props":2142,"children":2143},{"style":1057},[2144],{"type":998,"value":2145},"\"Alice Johnson\"",{"type":993,"tag":1021,"props":2147,"children":2148},{"style":1048},[2149],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2151,"children":2152},{"class":1023,"line":164},[2153,2158,2162,2167,2172],{"type":993,"tag":1021,"props":2154,"children":2155},{"style":1048},[2156],{"type":998,"value":2157},"name, ext ",{"type":993,"tag":1021,"props":2159,"children":2160},{"style":1036},[2161],{"type":998,"value":1136},{"type":993,"tag":1021,"props":2163,"children":2164},{"style":1048},[2165],{"type":998,"value":2166}," get_file_info(",{"type":993,"tag":1021,"props":2168,"children":2169},{"style":1057},[2170],{"type":998,"value":2171},"\"document.pdf\"",{"type":993,"tag":1021,"props":2173,"children":2174},{"style":1048},[2175],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2177,"children":2178},{"class":1023,"line":173},[2179],{"type":993,"tag":1021,"props":2180,"children":2181},{"emptyLinePlaceholder":13},[2182],{"type":998,"value":1231},{"type":993,"tag":1021,"props":2184,"children":2185},{"class":1023,"line":182},[2186,2190,2194,2198,2203,2207,2212,2216,2221,2226,2230,2234],{"type":993,"tag":1021,"props":2187,"children":2188},{"style":1089},[2189],{"type":998,"value":1334},{"type":993,"tag":1021,"props":2191,"children":2192},{"style":1048},[2193],{"type":998,"value":1339},{"type":993,"tag":1021,"props":2195,"children":2196},{"style":1036},[2197],{"type":998,"value":1344},{"type":993,"tag":1021,"props":2199,"children":2200},{"style":1057},[2201],{"type":998,"value":2202},"\"Name: ",{"type":993,"tag":1021,"props":2204,"children":2205},{"style":1089},[2206],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2208,"children":2209},{"style":1048},[2210],{"type":998,"value":2211},"first",{"type":993,"tag":1021,"props":2213,"children":2214},{"style":1089},[2215],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2217,"children":2218},{"style":1089},[2219],{"type":998,"value":2220}," {",{"type":993,"tag":1021,"props":2222,"children":2223},{"style":1048},[2224],{"type":998,"value":2225},"last",{"type":993,"tag":1021,"props":2227,"children":2228},{"style":1089},[2229],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2231,"children":2232},{"style":1057},[2233],{"type":998,"value":1410},{"type":993,"tag":1021,"props":2235,"children":2236},{"style":1048},[2237],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2239,"children":2240},{"class":1023,"line":191},[2241,2245,2249,2253,2258,2262,2267,2271,2276,2280,2285,2289,2293],{"type":993,"tag":1021,"props":2242,"children":2243},{"style":1089},[2244],{"type":998,"value":1334},{"type":993,"tag":1021,"props":2246,"children":2247},{"style":1048},[2248],{"type":998,"value":1339},{"type":993,"tag":1021,"props":2250,"children":2251},{"style":1036},[2252],{"type":998,"value":1344},{"type":993,"tag":1021,"props":2254,"children":2255},{"style":1057},[2256],{"type":998,"value":2257},"\"File: ",{"type":993,"tag":1021,"props":2259,"children":2260},{"style":1089},[2261],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2263,"children":2264},{"style":1048},[2265],{"type":998,"value":2266},"name",{"type":993,"tag":1021,"props":2268,"children":2269},{"style":1089},[2270],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2272,"children":2273},{"style":1057},[2274],{"type":998,"value":2275},", Extension: ",{"type":993,"tag":1021,"props":2277,"children":2278},{"style":1089},[2279],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2281,"children":2282},{"style":1048},[2283],{"type":998,"value":2284},"ext",{"type":993,"tag":1021,"props":2286,"children":2287},{"style":1089},[2288],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2290,"children":2291},{"style":1057},[2292],{"type":998,"value":1410},{"type":993,"tag":1021,"props":2294,"children":2295},{"style":1048},[2296],{"type":998,"value":1415},{"type":993,"tag":1417,"props":2298,"children":2300},{"id":2299},"conditional-returns",[2301],{"type":998,"value":2302},"🚀 Conditional Returns",{"type":993,"tag":1001,"props":2304,"children":2305},{},[2306],{"type":998,"value":2307},"Functions often need to return different values based on input conditions or calculation results, providing flexible responses to various scenarios.",{"type":993,"tag":1007,"props":2309,"children":2310},{},[2311],{"type":993,"tag":1011,"props":2312,"children":2314},{"className":1013,"code":2313,"language":6,"meta":8,"style":8},"def get_grade_info(score):\n    \"\"\"Return letter grade and pass/fail status\"\"\"\n    if score >= 90:\n        return \"A\", True, \"Excellent\"\n    elif score >= 80:\n        return \"B\", True, \"Good\"\n    elif score >= 70:\n        return \"C\", True, \"Satisfactory\"\n    elif score >= 60:\n        return \"D\", True, \"Passing\"\n    else:\n        return \"F\", False, \"Needs Improvement\"\n\ndef process_user_login(username, password):\n    \"\"\"Return login result with appropriate message\"\"\"\n    if not username:\n        return False, \"Username required\"\n    if not password:\n        return False, \"Password required\"\n    if len(password) \u003C 6:\n        return False, \"Password too short\"\n    return True, \"Login successful\"\n\n# Handle different return scenarios\ngrade, passed, comment = get_grade_info(87)\nsuccess, message = process_user_login(\"alice\", \"secret123\")\n\nprint(f\"Grade: {grade}, Passed: {passed}, {comment}\")\nprint(f\"Login: {success}, {message}\")\n",[2315],{"type":993,"tag":1017,"props":2316,"children":2317},{"__ignoreMap":8},[2318,2335,2343,2368,2398,2423,2452,2476,2505,2529,2558,2570,2600,2607,2624,2632,2648,2669,2685,2705,2733,2753,2774,2781,2789,2815,2850,2857,2933],{"type":993,"tag":1021,"props":2319,"children":2320},{"class":1023,"line":12},[2321,2325,2330],{"type":993,"tag":1021,"props":2322,"children":2323},{"style":1036},[2324],{"type":998,"value":1039},{"type":993,"tag":1021,"props":2326,"children":2327},{"style":1042},[2328],{"type":998,"value":2329}," get_grade_info",{"type":993,"tag":1021,"props":2331,"children":2332},{"style":1048},[2333],{"type":998,"value":2334},"(score):\n",{"type":993,"tag":1021,"props":2336,"children":2337},{"class":1023,"line":27},[2338],{"type":993,"tag":1021,"props":2339,"children":2340},{"style":1057},[2341],{"type":998,"value":2342},"    \"\"\"Return letter grade and pass/fail status\"\"\"\n",{"type":993,"tag":1021,"props":2344,"children":2345},{"class":1023,"line":36},[2346,2350,2355,2359,2364],{"type":993,"tag":1021,"props":2347,"children":2348},{"style":1036},[2349],{"type":998,"value":1068},{"type":993,"tag":1021,"props":2351,"children":2352},{"style":1048},[2353],{"type":998,"value":2354}," score ",{"type":993,"tag":1021,"props":2356,"children":2357},{"style":1036},[2358],{"type":998,"value":1911},{"type":993,"tag":1021,"props":2360,"children":2361},{"style":1089},[2362],{"type":998,"value":2363}," 90",{"type":993,"tag":1021,"props":2365,"children":2366},{"style":1048},[2367],{"type":998,"value":1586},{"type":993,"tag":1021,"props":2369,"children":2370},{"class":1023,"line":45},[2371,2375,2380,2384,2389,2393],{"type":993,"tag":1021,"props":2372,"children":2373},{"style":1036},[2374],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2376,"children":2377},{"style":1057},[2378],{"type":998,"value":2379}," \"A\"",{"type":993,"tag":1021,"props":2381,"children":2382},{"style":1048},[2383],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2385,"children":2386},{"style":1089},[2387],{"type":998,"value":2388},"True",{"type":993,"tag":1021,"props":2390,"children":2391},{"style":1048},[2392],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2394,"children":2395},{"style":1057},[2396],{"type":998,"value":2397},"\"Excellent\"\n",{"type":993,"tag":1021,"props":2399,"children":2400},{"class":1023,"line":54},[2401,2406,2410,2414,2419],{"type":993,"tag":1021,"props":2402,"children":2403},{"style":1036},[2404],{"type":998,"value":2405},"    elif",{"type":993,"tag":1021,"props":2407,"children":2408},{"style":1048},[2409],{"type":998,"value":2354},{"type":993,"tag":1021,"props":2411,"children":2412},{"style":1036},[2413],{"type":998,"value":1911},{"type":993,"tag":1021,"props":2415,"children":2416},{"style":1089},[2417],{"type":998,"value":2418}," 80",{"type":993,"tag":1021,"props":2420,"children":2421},{"style":1048},[2422],{"type":998,"value":1586},{"type":993,"tag":1021,"props":2424,"children":2425},{"class":1023,"line":63},[2426,2430,2435,2439,2443,2447],{"type":993,"tag":1021,"props":2427,"children":2428},{"style":1036},[2429],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2431,"children":2432},{"style":1057},[2433],{"type":998,"value":2434}," \"B\"",{"type":993,"tag":1021,"props":2436,"children":2437},{"style":1048},[2438],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2440,"children":2441},{"style":1089},[2442],{"type":998,"value":2388},{"type":993,"tag":1021,"props":2444,"children":2445},{"style":1048},[2446],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2448,"children":2449},{"style":1057},[2450],{"type":998,"value":2451},"\"Good\"\n",{"type":993,"tag":1021,"props":2453,"children":2454},{"class":1023,"line":72},[2455,2459,2463,2467,2472],{"type":993,"tag":1021,"props":2456,"children":2457},{"style":1036},[2458],{"type":998,"value":2405},{"type":993,"tag":1021,"props":2460,"children":2461},{"style":1048},[2462],{"type":998,"value":2354},{"type":993,"tag":1021,"props":2464,"children":2465},{"style":1036},[2466],{"type":998,"value":1911},{"type":993,"tag":1021,"props":2468,"children":2469},{"style":1089},[2470],{"type":998,"value":2471}," 70",{"type":993,"tag":1021,"props":2473,"children":2474},{"style":1048},[2475],{"type":998,"value":1586},{"type":993,"tag":1021,"props":2477,"children":2478},{"class":1023,"line":81},[2479,2483,2488,2492,2496,2500],{"type":993,"tag":1021,"props":2480,"children":2481},{"style":1036},[2482],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2484,"children":2485},{"style":1057},[2486],{"type":998,"value":2487}," \"C\"",{"type":993,"tag":1021,"props":2489,"children":2490},{"style":1048},[2491],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2493,"children":2494},{"style":1089},[2495],{"type":998,"value":2388},{"type":993,"tag":1021,"props":2497,"children":2498},{"style":1048},[2499],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2501,"children":2502},{"style":1057},[2503],{"type":998,"value":2504},"\"Satisfactory\"\n",{"type":993,"tag":1021,"props":2506,"children":2507},{"class":1023,"line":91},[2508,2512,2516,2520,2525],{"type":993,"tag":1021,"props":2509,"children":2510},{"style":1036},[2511],{"type":998,"value":2405},{"type":993,"tag":1021,"props":2513,"children":2514},{"style":1048},[2515],{"type":998,"value":2354},{"type":993,"tag":1021,"props":2517,"children":2518},{"style":1036},[2519],{"type":998,"value":1911},{"type":993,"tag":1021,"props":2521,"children":2522},{"style":1089},[2523],{"type":998,"value":2524}," 60",{"type":993,"tag":1021,"props":2526,"children":2527},{"style":1048},[2528],{"type":998,"value":1586},{"type":993,"tag":1021,"props":2530,"children":2531},{"class":1023,"line":100},[2532,2536,2541,2545,2549,2553],{"type":993,"tag":1021,"props":2533,"children":2534},{"style":1036},[2535],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2537,"children":2538},{"style":1057},[2539],{"type":998,"value":2540}," \"D\"",{"type":993,"tag":1021,"props":2542,"children":2543},{"style":1048},[2544],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2546,"children":2547},{"style":1089},[2548],{"type":998,"value":2388},{"type":993,"tag":1021,"props":2550,"children":2551},{"style":1048},[2552],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2554,"children":2555},{"style":1057},[2556],{"type":998,"value":2557},"\"Passing\"\n",{"type":993,"tag":1021,"props":2559,"children":2560},{"class":1023,"line":109},[2561,2566],{"type":993,"tag":1021,"props":2562,"children":2563},{"style":1036},[2564],{"type":998,"value":2565},"    else",{"type":993,"tag":1021,"props":2567,"children":2568},{"style":1048},[2569],{"type":998,"value":1586},{"type":993,"tag":1021,"props":2571,"children":2572},{"class":1023,"line":118},[2573,2577,2582,2586,2591,2595],{"type":993,"tag":1021,"props":2574,"children":2575},{"style":1036},[2576],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2578,"children":2579},{"style":1057},[2580],{"type":998,"value":2581}," \"F\"",{"type":993,"tag":1021,"props":2583,"children":2584},{"style":1048},[2585],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2587,"children":2588},{"style":1089},[2589],{"type":998,"value":2590},"False",{"type":993,"tag":1021,"props":2592,"children":2593},{"style":1048},[2594],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2596,"children":2597},{"style":1057},[2598],{"type":998,"value":2599},"\"Needs Improvement\"\n",{"type":993,"tag":1021,"props":2601,"children":2602},{"class":1023,"line":127},[2603],{"type":993,"tag":1021,"props":2604,"children":2605},{"emptyLinePlaceholder":13},[2606],{"type":998,"value":1231},{"type":993,"tag":1021,"props":2608,"children":2609},{"class":1023,"line":136},[2610,2614,2619],{"type":993,"tag":1021,"props":2611,"children":2612},{"style":1036},[2613],{"type":998,"value":1039},{"type":993,"tag":1021,"props":2615,"children":2616},{"style":1042},[2617],{"type":998,"value":2618}," process_user_login",{"type":993,"tag":1021,"props":2620,"children":2621},{"style":1048},[2622],{"type":998,"value":2623},"(username, password):\n",{"type":993,"tag":1021,"props":2625,"children":2626},{"class":1023,"line":146},[2627],{"type":993,"tag":1021,"props":2628,"children":2629},{"style":1057},[2630],{"type":998,"value":2631},"    \"\"\"Return login result with appropriate message\"\"\"\n",{"type":993,"tag":1021,"props":2633,"children":2634},{"class":1023,"line":155},[2635,2639,2643],{"type":993,"tag":1021,"props":2636,"children":2637},{"style":1036},[2638],{"type":998,"value":1068},{"type":993,"tag":1021,"props":2640,"children":2641},{"style":1036},[2642],{"type":998,"value":1073},{"type":993,"tag":1021,"props":2644,"children":2645},{"style":1048},[2646],{"type":998,"value":2647}," username:\n",{"type":993,"tag":1021,"props":2649,"children":2650},{"class":1023,"line":164},[2651,2655,2660,2664],{"type":993,"tag":1021,"props":2652,"children":2653},{"style":1036},[2654],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2656,"children":2657},{"style":1089},[2658],{"type":998,"value":2659}," False",{"type":993,"tag":1021,"props":2661,"children":2662},{"style":1048},[2663],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2665,"children":2666},{"style":1057},[2667],{"type":998,"value":2668},"\"Username required\"\n",{"type":993,"tag":1021,"props":2670,"children":2671},{"class":1023,"line":173},[2672,2676,2680],{"type":993,"tag":1021,"props":2673,"children":2674},{"style":1036},[2675],{"type":998,"value":1068},{"type":993,"tag":1021,"props":2677,"children":2678},{"style":1036},[2679],{"type":998,"value":1073},{"type":993,"tag":1021,"props":2681,"children":2682},{"style":1048},[2683],{"type":998,"value":2684}," password:\n",{"type":993,"tag":1021,"props":2686,"children":2687},{"class":1023,"line":182},[2688,2692,2696,2700],{"type":993,"tag":1021,"props":2689,"children":2690},{"style":1036},[2691],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2693,"children":2694},{"style":1089},[2695],{"type":998,"value":2659},{"type":993,"tag":1021,"props":2697,"children":2698},{"style":1048},[2699],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2701,"children":2702},{"style":1057},[2703],{"type":998,"value":2704},"\"Password required\"\n",{"type":993,"tag":1021,"props":2706,"children":2707},{"class":1023,"line":191},[2708,2712,2716,2720,2724,2729],{"type":993,"tag":1021,"props":2709,"children":2710},{"style":1036},[2711],{"type":998,"value":1068},{"type":993,"tag":1021,"props":2713,"children":2714},{"style":1089},[2715],{"type":998,"value":1173},{"type":993,"tag":1021,"props":2717,"children":2718},{"style":1048},[2719],{"type":998,"value":1571},{"type":993,"tag":1021,"props":2721,"children":2722},{"style":1036},[2723],{"type":998,"value":1576},{"type":993,"tag":1021,"props":2725,"children":2726},{"style":1089},[2727],{"type":998,"value":2728}," 6",{"type":993,"tag":1021,"props":2730,"children":2731},{"style":1048},[2732],{"type":998,"value":1586},{"type":993,"tag":1021,"props":2734,"children":2735},{"class":1023,"line":201},[2736,2740,2744,2748],{"type":993,"tag":1021,"props":2737,"children":2738},{"style":1036},[2739],{"type":998,"value":1086},{"type":993,"tag":1021,"props":2741,"children":2742},{"style":1089},[2743],{"type":998,"value":2659},{"type":993,"tag":1021,"props":2745,"children":2746},{"style":1048},[2747],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2749,"children":2750},{"style":1057},[2751],{"type":998,"value":2752},"\"Password too short\"\n",{"type":993,"tag":1021,"props":2754,"children":2755},{"class":1023,"line":210},[2756,2760,2765,2769],{"type":993,"tag":1021,"props":2757,"children":2758},{"style":1036},[2759],{"type":998,"value":1213},{"type":993,"tag":1021,"props":2761,"children":2762},{"style":1089},[2763],{"type":998,"value":2764}," True",{"type":993,"tag":1021,"props":2766,"children":2767},{"style":1048},[2768],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2770,"children":2771},{"style":1057},[2772],{"type":998,"value":2773},"\"Login successful\"\n",{"type":993,"tag":1021,"props":2775,"children":2776},{"class":1023,"line":219},[2777],{"type":993,"tag":1021,"props":2778,"children":2779},{"emptyLinePlaceholder":13},[2780],{"type":998,"value":1231},{"type":993,"tag":1021,"props":2782,"children":2783},{"class":1023,"line":228},[2784],{"type":993,"tag":1021,"props":2785,"children":2786},{"style":1027},[2787],{"type":998,"value":2788},"# Handle different return scenarios\n",{"type":993,"tag":1021,"props":2790,"children":2791},{"class":1023,"line":238},[2792,2797,2801,2806,2811],{"type":993,"tag":1021,"props":2793,"children":2794},{"style":1048},[2795],{"type":998,"value":2796},"grade, passed, comment ",{"type":993,"tag":1021,"props":2798,"children":2799},{"style":1036},[2800],{"type":998,"value":1136},{"type":993,"tag":1021,"props":2802,"children":2803},{"style":1048},[2804],{"type":998,"value":2805}," get_grade_info(",{"type":993,"tag":1021,"props":2807,"children":2808},{"style":1089},[2809],{"type":998,"value":2810},"87",{"type":993,"tag":1021,"props":2812,"children":2813},{"style":1048},[2814],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2816,"children":2817},{"class":1023,"line":247},[2818,2823,2827,2832,2837,2841,2846],{"type":993,"tag":1021,"props":2819,"children":2820},{"style":1048},[2821],{"type":998,"value":2822},"success, message ",{"type":993,"tag":1021,"props":2824,"children":2825},{"style":1036},[2826],{"type":998,"value":1136},{"type":993,"tag":1021,"props":2828,"children":2829},{"style":1048},[2830],{"type":998,"value":2831}," process_user_login(",{"type":993,"tag":1021,"props":2833,"children":2834},{"style":1057},[2835],{"type":998,"value":2836},"\"alice\"",{"type":993,"tag":1021,"props":2838,"children":2839},{"style":1048},[2840],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2842,"children":2843},{"style":1057},[2844],{"type":998,"value":2845},"\"secret123\"",{"type":993,"tag":1021,"props":2847,"children":2848},{"style":1048},[2849],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2851,"children":2852},{"class":1023,"line":256},[2853],{"type":993,"tag":1021,"props":2854,"children":2855},{"emptyLinePlaceholder":13},[2856],{"type":998,"value":1231},{"type":993,"tag":1021,"props":2858,"children":2859},{"class":1023,"line":265},[2860,2864,2868,2872,2877,2881,2886,2890,2895,2899,2904,2908,2912,2916,2921,2925,2929],{"type":993,"tag":1021,"props":2861,"children":2862},{"style":1089},[2863],{"type":998,"value":1334},{"type":993,"tag":1021,"props":2865,"children":2866},{"style":1048},[2867],{"type":998,"value":1339},{"type":993,"tag":1021,"props":2869,"children":2870},{"style":1036},[2871],{"type":998,"value":1344},{"type":993,"tag":1021,"props":2873,"children":2874},{"style":1057},[2875],{"type":998,"value":2876},"\"Grade: ",{"type":993,"tag":1021,"props":2878,"children":2879},{"style":1089},[2880],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2882,"children":2883},{"style":1048},[2884],{"type":998,"value":2885},"grade",{"type":993,"tag":1021,"props":2887,"children":2888},{"style":1089},[2889],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2891,"children":2892},{"style":1057},[2893],{"type":998,"value":2894},", Passed: ",{"type":993,"tag":1021,"props":2896,"children":2897},{"style":1089},[2898],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2900,"children":2901},{"style":1048},[2902],{"type":998,"value":2903},"passed",{"type":993,"tag":1021,"props":2905,"children":2906},{"style":1089},[2907],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2909,"children":2910},{"style":1057},[2911],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2913,"children":2914},{"style":1089},[2915],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2917,"children":2918},{"style":1048},[2919],{"type":998,"value":2920},"comment",{"type":993,"tag":1021,"props":2922,"children":2923},{"style":1089},[2924],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2926,"children":2927},{"style":1057},[2928],{"type":998,"value":1410},{"type":993,"tag":1021,"props":2930,"children":2931},{"style":1048},[2932],{"type":998,"value":1415},{"type":993,"tag":1021,"props":2934,"children":2935},{"class":1023,"line":274},[2936,2940,2944,2948,2953,2957,2962,2966,2970,2974,2979,2983,2987],{"type":993,"tag":1021,"props":2937,"children":2938},{"style":1089},[2939],{"type":998,"value":1334},{"type":993,"tag":1021,"props":2941,"children":2942},{"style":1048},[2943],{"type":998,"value":1339},{"type":993,"tag":1021,"props":2945,"children":2946},{"style":1036},[2947],{"type":998,"value":1344},{"type":993,"tag":1021,"props":2949,"children":2950},{"style":1057},[2951],{"type":998,"value":2952},"\"Login: ",{"type":993,"tag":1021,"props":2954,"children":2955},{"style":1089},[2956],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2958,"children":2959},{"style":1048},[2960],{"type":998,"value":2961},"success",{"type":993,"tag":1021,"props":2963,"children":2964},{"style":1089},[2965],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2967,"children":2968},{"style":1057},[2969],{"type":998,"value":1097},{"type":993,"tag":1021,"props":2971,"children":2972},{"style":1089},[2973],{"type":998,"value":1354},{"type":993,"tag":1021,"props":2975,"children":2976},{"style":1048},[2977],{"type":998,"value":2978},"message",{"type":993,"tag":1021,"props":2980,"children":2981},{"style":1089},[2982],{"type":998,"value":1364},{"type":993,"tag":1021,"props":2984,"children":2985},{"style":1057},[2986],{"type":998,"value":1410},{"type":993,"tag":1021,"props":2988,"children":2989},{"style":1048},[2990],{"type":998,"value":1415},{"type":993,"tag":2992,"props":2993,"children":2997},"info-box",{"emoji":2994,"title":2995,"type":2996},"🔄","Return Statement Behavior","info",[2998,3009,3019,3029,3039],{"type":993,"tag":1001,"props":2999,"children":3000},{},[3001,3007],{"type":993,"tag":3002,"props":3003,"children":3004},"strong",{},[3005],{"type":998,"value":3006},"Immediate Exit:",{"type":998,"value":3008}," return statements immediately exit the function.",{"type":993,"tag":1001,"props":3010,"children":3011},{},[3012,3017],{"type":993,"tag":3002,"props":3013,"children":3014},{},[3015],{"type":998,"value":3016},"Single Execution:",{"type":998,"value":3018}," Only one return statement executes per function call.",{"type":993,"tag":1001,"props":3020,"children":3021},{},[3022,3027],{"type":993,"tag":3002,"props":3023,"children":3024},{},[3025],{"type":998,"value":3026},"Default Return:",{"type":998,"value":3028}," Functions without explicit return statements return None.",{"type":993,"tag":1001,"props":3030,"children":3031},{},[3032,3037],{"type":993,"tag":3002,"props":3033,"children":3034},{},[3035],{"type":998,"value":3036},"Multiple Values:",{"type":998,"value":3038}," Use commas to return multiple values as a tuple.",{"type":993,"tag":1001,"props":3040,"children":3041},{},[3042,3047],{"type":993,"tag":3002,"props":3043,"children":3044},{},[3045],{"type":998,"value":3046},"Type Flexibility:",{"type":998,"value":3048}," Functions can return different data types based on conditions.",{"type":993,"tag":1417,"props":3050,"children":3052},{"id":3051},"return-value-types-comparison",[3053],{"type":998,"value":3054},"📊 Return Value Types Comparison",{"type":993,"tag":3056,"props":3057,"children":3058},"table",{},[3059,3088],{"type":993,"tag":3060,"props":3061,"children":3062},"thead",{},[3063],{"type":993,"tag":3064,"props":3065,"children":3066},"tr",{},[3067,3073,3078,3083],{"type":993,"tag":3068,"props":3069,"children":3070},"th",{},[3071],{"type":998,"value":3072},"Return Type",{"type":993,"tag":3068,"props":3074,"children":3075},{},[3076],{"type":998,"value":3077},"Syntax",{"type":993,"tag":3068,"props":3079,"children":3080},{},[3081],{"type":998,"value":3082},"Use Case",{"type":993,"tag":3068,"props":3084,"children":3085},{},[3086],{"type":998,"value":3087},"Example",{"type":993,"tag":3089,"props":3090,"children":3091},"tbody",{},[3092,3127,3161,3191,3221],{"type":993,"tag":3064,"props":3093,"children":3094},{},[3095,3104,3113,3118],{"type":993,"tag":3096,"props":3097,"children":3098},"td",{},[3099],{"type":993,"tag":3002,"props":3100,"children":3101},{},[3102],{"type":998,"value":3103},"Single Value",{"type":993,"tag":3096,"props":3105,"children":3106},{},[3107],{"type":993,"tag":1017,"props":3108,"children":3110},{"className":3109},[],[3111],{"type":998,"value":3112},"return value",{"type":993,"tag":3096,"props":3114,"children":3115},{},[3116],{"type":998,"value":3117},"Simple calculations",{"type":993,"tag":3096,"props":3119,"children":3120},{},[3121],{"type":993,"tag":1017,"props":3122,"children":3124},{"className":3123},[],[3125],{"type":998,"value":3126},"return price * 1.08",{"type":993,"tag":3064,"props":3128,"children":3129},{},[3130,3138,3147,3152],{"type":993,"tag":3096,"props":3131,"children":3132},{},[3133],{"type":993,"tag":3002,"props":3134,"children":3135},{},[3136],{"type":998,"value":3137},"Multiple Values",{"type":993,"tag":3096,"props":3139,"children":3140},{},[3141],{"type":993,"tag":1017,"props":3142,"children":3144},{"className":3143},[],[3145],{"type":998,"value":3146},"return val1, val2",{"type":993,"tag":3096,"props":3148,"children":3149},{},[3150],{"type":998,"value":3151},"Related calculations",{"type":993,"tag":3096,"props":3153,"children":3154},{},[3155],{"type":993,"tag":1017,"props":3156,"children":3158},{"className":3157},[],[3159],{"type":998,"value":3160},"return width, height",{"type":993,"tag":3064,"props":3162,"children":3163},{},[3164,3172,3181,3186],{"type":993,"tag":3096,"props":3165,"children":3166},{},[3167],{"type":993,"tag":3002,"props":3168,"children":3169},{},[3170],{"type":998,"value":3171},"Conditional",{"type":993,"tag":3096,"props":3173,"children":3174},{},[3175],{"type":993,"tag":1017,"props":3176,"children":3178},{"className":3177},[],[3179],{"type":998,"value":3180},"if condition: return val1; else: return val2",{"type":993,"tag":3096,"props":3182,"children":3183},{},[3184],{"type":998,"value":3185},"Different scenarios",{"type":993,"tag":3096,"props":3187,"children":3188},{},[3189],{"type":998,"value":3190},"Grade calculation",{"type":993,"tag":3064,"props":3192,"children":3193},{},[3194,3202,3211,3216],{"type":993,"tag":3096,"props":3195,"children":3196},{},[3197],{"type":993,"tag":3002,"props":3198,"children":3199},{},[3200],{"type":998,"value":3201},"Early Return",{"type":993,"tag":3096,"props":3203,"children":3204},{},[3205],{"type":993,"tag":1017,"props":3206,"children":3208},{"className":3207},[],[3209],{"type":998,"value":3210},"if error: return None",{"type":993,"tag":3096,"props":3212,"children":3213},{},[3214],{"type":998,"value":3215},"Error handling",{"type":993,"tag":3096,"props":3217,"children":3218},{},[3219],{"type":998,"value":3220},"Input validation",{"type":993,"tag":3064,"props":3222,"children":3223},{},[3224,3232,3237,3242],{"type":993,"tag":3096,"props":3225,"children":3226},{},[3227],{"type":993,"tag":3002,"props":3228,"children":3229},{},[3230],{"type":998,"value":3231},"None (implicit)",{"type":993,"tag":3096,"props":3233,"children":3234},{},[3235],{"type":998,"value":3236},"No return statement",{"type":993,"tag":3096,"props":3238,"children":3239},{},[3240],{"type":998,"value":3241},"Side effects only",{"type":993,"tag":3096,"props":3243,"children":3244},{},[3245],{"type":998,"value":3246},"Print or file operations",{"type":993,"tag":1417,"props":3248,"children":3250},{"id":3249},"early-returns-for-error-handling",[3251],{"type":998,"value":3252},"🌟 Early Returns for Error Handling",{"type":993,"tag":1001,"props":3254,"children":3255},{},[3256],{"type":998,"value":3257},"Early returns improve code readability by handling error conditions first, allowing the main logic to proceed without nested if statements.",{"type":993,"tag":1007,"props":3259,"children":3260},{},[3261],{"type":993,"tag":1011,"props":3262,"children":3264},{"className":1013,"code":3263,"language":6,"meta":8,"style":8},"def calculate_bmi(weight, height):\n    \"\"\"Calculate BMI with input validation\"\"\"\n    # Early returns for invalid input\n    if weight \u003C= 0:\n        return None, \"Weight must be positive\"\n    if height \u003C= 0:\n        return None, \"Height must be positive\"\n    \n    # Main calculation logic\n    bmi = weight / (height ** 2)\n    \n    # Categorize BMI\n    if bmi \u003C 18.5:\n        category = \"Underweight\"\n    elif bmi \u003C 25:\n        category = \"Normal\"\n    elif bmi \u003C 30:\n        category = \"Overweight\"\n    else:\n        category = \"Obese\"\n    \n    return bmi, category\n\n# Test with different inputs\nbmi1, result1 = calculate_bmi(70, 1.75)\nbmi2, result2 = calculate_bmi(-5, 1.75)\n\nprint(f\"BMI 1: {bmi1:.1f} ({result1})\")\nprint(f\"BMI 2: {bmi2} - {result2}\")\n",[3265],{"type":993,"tag":1017,"props":3266,"children":3267},{"__ignoreMap":8},[3268,3285,3293,3301,3327,3347,3371,3391,3398,3406,3444,3451,3459,3484,3501,3525,3541,3565,3581,3592,3608,3615,3627,3634,3642,3677,3714,3721,3785],{"type":993,"tag":1021,"props":3269,"children":3270},{"class":1023,"line":12},[3271,3275,3280],{"type":993,"tag":1021,"props":3272,"children":3273},{"style":1036},[3274],{"type":998,"value":1039},{"type":993,"tag":1021,"props":3276,"children":3277},{"style":1042},[3278],{"type":998,"value":3279}," calculate_bmi",{"type":993,"tag":1021,"props":3281,"children":3282},{"style":1048},[3283],{"type":998,"value":3284},"(weight, height):\n",{"type":993,"tag":1021,"props":3286,"children":3287},{"class":1023,"line":27},[3288],{"type":993,"tag":1021,"props":3289,"children":3290},{"style":1057},[3291],{"type":998,"value":3292},"    \"\"\"Calculate BMI with input validation\"\"\"\n",{"type":993,"tag":1021,"props":3294,"children":3295},{"class":1023,"line":36},[3296],{"type":993,"tag":1021,"props":3297,"children":3298},{"style":1027},[3299],{"type":998,"value":3300},"    # Early returns for invalid input\n",{"type":993,"tag":1021,"props":3302,"children":3303},{"class":1023,"line":45},[3304,3308,3313,3318,3323],{"type":993,"tag":1021,"props":3305,"children":3306},{"style":1036},[3307],{"type":998,"value":1068},{"type":993,"tag":1021,"props":3309,"children":3310},{"style":1048},[3311],{"type":998,"value":3312}," weight ",{"type":993,"tag":1021,"props":3314,"children":3315},{"style":1036},[3316],{"type":998,"value":3317},"\u003C=",{"type":993,"tag":1021,"props":3319,"children":3320},{"style":1089},[3321],{"type":998,"value":3322}," 0",{"type":993,"tag":1021,"props":3324,"children":3325},{"style":1048},[3326],{"type":998,"value":1586},{"type":993,"tag":1021,"props":3328,"children":3329},{"class":1023,"line":54},[3330,3334,3338,3342],{"type":993,"tag":1021,"props":3331,"children":3332},{"style":1036},[3333],{"type":998,"value":1086},{"type":993,"tag":1021,"props":3335,"children":3336},{"style":1089},[3337],{"type":998,"value":1092},{"type":993,"tag":1021,"props":3339,"children":3340},{"style":1048},[3341],{"type":998,"value":1097},{"type":993,"tag":1021,"props":3343,"children":3344},{"style":1057},[3345],{"type":998,"value":3346},"\"Weight must be positive\"\n",{"type":993,"tag":1021,"props":3348,"children":3349},{"class":1023,"line":63},[3350,3354,3359,3363,3367],{"type":993,"tag":1021,"props":3351,"children":3352},{"style":1036},[3353],{"type":998,"value":1068},{"type":993,"tag":1021,"props":3355,"children":3356},{"style":1048},[3357],{"type":998,"value":3358}," height ",{"type":993,"tag":1021,"props":3360,"children":3361},{"style":1036},[3362],{"type":998,"value":3317},{"type":993,"tag":1021,"props":3364,"children":3365},{"style":1089},[3366],{"type":998,"value":3322},{"type":993,"tag":1021,"props":3368,"children":3369},{"style":1048},[3370],{"type":998,"value":1586},{"type":993,"tag":1021,"props":3372,"children":3373},{"class":1023,"line":72},[3374,3378,3382,3386],{"type":993,"tag":1021,"props":3375,"children":3376},{"style":1036},[3377],{"type":998,"value":1086},{"type":993,"tag":1021,"props":3379,"children":3380},{"style":1089},[3381],{"type":998,"value":1092},{"type":993,"tag":1021,"props":3383,"children":3384},{"style":1048},[3385],{"type":998,"value":1097},{"type":993,"tag":1021,"props":3387,"children":3388},{"style":1057},[3389],{"type":998,"value":3390},"\"Height must be positive\"\n",{"type":993,"tag":1021,"props":3392,"children":3393},{"class":1023,"line":81},[3394],{"type":993,"tag":1021,"props":3395,"children":3396},{"style":1048},[3397],{"type":998,"value":1123},{"type":993,"tag":1021,"props":3399,"children":3400},{"class":1023,"line":91},[3401],{"type":993,"tag":1021,"props":3402,"children":3403},{"style":1027},[3404],{"type":998,"value":3405},"    # Main calculation logic\n",{"type":993,"tag":1021,"props":3407,"children":3408},{"class":1023,"line":100},[3409,3414,3418,3422,3426,3431,3436,3440],{"type":993,"tag":1021,"props":3410,"children":3411},{"style":1048},[3412],{"type":998,"value":3413},"    bmi ",{"type":993,"tag":1021,"props":3415,"children":3416},{"style":1036},[3417],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3419,"children":3420},{"style":1048},[3421],{"type":998,"value":3312},{"type":993,"tag":1021,"props":3423,"children":3424},{"style":1036},[3425],{"type":998,"value":1168},{"type":993,"tag":1021,"props":3427,"children":3428},{"style":1048},[3429],{"type":998,"value":3430}," (height ",{"type":993,"tag":1021,"props":3432,"children":3433},{"style":1036},[3434],{"type":998,"value":3435},"**",{"type":993,"tag":1021,"props":3437,"children":3438},{"style":1089},[3439],{"type":998,"value":1916},{"type":993,"tag":1021,"props":3441,"children":3442},{"style":1048},[3443],{"type":998,"value":1415},{"type":993,"tag":1021,"props":3445,"children":3446},{"class":1023,"line":109},[3447],{"type":993,"tag":1021,"props":3448,"children":3449},{"style":1048},[3450],{"type":998,"value":1123},{"type":993,"tag":1021,"props":3452,"children":3453},{"class":1023,"line":118},[3454],{"type":993,"tag":1021,"props":3455,"children":3456},{"style":1027},[3457],{"type":998,"value":3458},"    # Categorize BMI\n",{"type":993,"tag":1021,"props":3460,"children":3461},{"class":1023,"line":127},[3462,3466,3471,3475,3480],{"type":993,"tag":1021,"props":3463,"children":3464},{"style":1036},[3465],{"type":998,"value":1068},{"type":993,"tag":1021,"props":3467,"children":3468},{"style":1048},[3469],{"type":998,"value":3470}," bmi ",{"type":993,"tag":1021,"props":3472,"children":3473},{"style":1036},[3474],{"type":998,"value":1576},{"type":993,"tag":1021,"props":3476,"children":3477},{"style":1089},[3478],{"type":998,"value":3479}," 18.5",{"type":993,"tag":1021,"props":3481,"children":3482},{"style":1048},[3483],{"type":998,"value":1586},{"type":993,"tag":1021,"props":3485,"children":3486},{"class":1023,"line":136},[3487,3492,3496],{"type":993,"tag":1021,"props":3488,"children":3489},{"style":1048},[3490],{"type":998,"value":3491},"        category ",{"type":993,"tag":1021,"props":3493,"children":3494},{"style":1036},[3495],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3497,"children":3498},{"style":1057},[3499],{"type":998,"value":3500}," \"Underweight\"\n",{"type":993,"tag":1021,"props":3502,"children":3503},{"class":1023,"line":146},[3504,3508,3512,3516,3521],{"type":993,"tag":1021,"props":3505,"children":3506},{"style":1036},[3507],{"type":998,"value":2405},{"type":993,"tag":1021,"props":3509,"children":3510},{"style":1048},[3511],{"type":998,"value":3470},{"type":993,"tag":1021,"props":3513,"children":3514},{"style":1036},[3515],{"type":998,"value":1576},{"type":993,"tag":1021,"props":3517,"children":3518},{"style":1089},[3519],{"type":998,"value":3520}," 25",{"type":993,"tag":1021,"props":3522,"children":3523},{"style":1048},[3524],{"type":998,"value":1586},{"type":993,"tag":1021,"props":3526,"children":3527},{"class":1023,"line":155},[3528,3532,3536],{"type":993,"tag":1021,"props":3529,"children":3530},{"style":1048},[3531],{"type":998,"value":3491},{"type":993,"tag":1021,"props":3533,"children":3534},{"style":1036},[3535],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3537,"children":3538},{"style":1057},[3539],{"type":998,"value":3540}," \"Normal\"\n",{"type":993,"tag":1021,"props":3542,"children":3543},{"class":1023,"line":164},[3544,3548,3552,3556,3561],{"type":993,"tag":1021,"props":3545,"children":3546},{"style":1036},[3547],{"type":998,"value":2405},{"type":993,"tag":1021,"props":3549,"children":3550},{"style":1048},[3551],{"type":998,"value":3470},{"type":993,"tag":1021,"props":3553,"children":3554},{"style":1036},[3555],{"type":998,"value":1576},{"type":993,"tag":1021,"props":3557,"children":3558},{"style":1089},[3559],{"type":998,"value":3560}," 30",{"type":993,"tag":1021,"props":3562,"children":3563},{"style":1048},[3564],{"type":998,"value":1586},{"type":993,"tag":1021,"props":3566,"children":3567},{"class":1023,"line":173},[3568,3572,3576],{"type":993,"tag":1021,"props":3569,"children":3570},{"style":1048},[3571],{"type":998,"value":3491},{"type":993,"tag":1021,"props":3573,"children":3574},{"style":1036},[3575],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3577,"children":3578},{"style":1057},[3579],{"type":998,"value":3580}," \"Overweight\"\n",{"type":993,"tag":1021,"props":3582,"children":3583},{"class":1023,"line":182},[3584,3588],{"type":993,"tag":1021,"props":3585,"children":3586},{"style":1036},[3587],{"type":998,"value":2565},{"type":993,"tag":1021,"props":3589,"children":3590},{"style":1048},[3591],{"type":998,"value":1586},{"type":993,"tag":1021,"props":3593,"children":3594},{"class":1023,"line":191},[3595,3599,3603],{"type":993,"tag":1021,"props":3596,"children":3597},{"style":1048},[3598],{"type":998,"value":3491},{"type":993,"tag":1021,"props":3600,"children":3601},{"style":1036},[3602],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3604,"children":3605},{"style":1057},[3606],{"type":998,"value":3607}," \"Obese\"\n",{"type":993,"tag":1021,"props":3609,"children":3610},{"class":1023,"line":201},[3611],{"type":993,"tag":1021,"props":3612,"children":3613},{"style":1048},[3614],{"type":998,"value":1123},{"type":993,"tag":1021,"props":3616,"children":3617},{"class":1023,"line":210},[3618,3622],{"type":993,"tag":1021,"props":3619,"children":3620},{"style":1036},[3621],{"type":998,"value":1213},{"type":993,"tag":1021,"props":3623,"children":3624},{"style":1048},[3625],{"type":998,"value":3626}," bmi, category\n",{"type":993,"tag":1021,"props":3628,"children":3629},{"class":1023,"line":219},[3630],{"type":993,"tag":1021,"props":3631,"children":3632},{"emptyLinePlaceholder":13},[3633],{"type":998,"value":1231},{"type":993,"tag":1021,"props":3635,"children":3636},{"class":1023,"line":228},[3637],{"type":993,"tag":1021,"props":3638,"children":3639},{"style":1027},[3640],{"type":998,"value":3641},"# Test with different inputs\n",{"type":993,"tag":1021,"props":3643,"children":3644},{"class":1023,"line":238},[3645,3650,3654,3659,3664,3668,3673],{"type":993,"tag":1021,"props":3646,"children":3647},{"style":1048},[3648],{"type":998,"value":3649},"bmi1, result1 ",{"type":993,"tag":1021,"props":3651,"children":3652},{"style":1036},[3653],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3655,"children":3656},{"style":1048},[3657],{"type":998,"value":3658}," calculate_bmi(",{"type":993,"tag":1021,"props":3660,"children":3661},{"style":1089},[3662],{"type":998,"value":3663},"70",{"type":993,"tag":1021,"props":3665,"children":3666},{"style":1048},[3667],{"type":998,"value":1097},{"type":993,"tag":1021,"props":3669,"children":3670},{"style":1089},[3671],{"type":998,"value":3672},"1.75",{"type":993,"tag":1021,"props":3674,"children":3675},{"style":1048},[3676],{"type":998,"value":1415},{"type":993,"tag":1021,"props":3678,"children":3679},{"class":1023,"line":247},[3680,3685,3689,3693,3697,3702,3706,3710],{"type":993,"tag":1021,"props":3681,"children":3682},{"style":1048},[3683],{"type":998,"value":3684},"bmi2, result2 ",{"type":993,"tag":1021,"props":3686,"children":3687},{"style":1036},[3688],{"type":998,"value":1136},{"type":993,"tag":1021,"props":3690,"children":3691},{"style":1048},[3692],{"type":998,"value":3658},{"type":993,"tag":1021,"props":3694,"children":3695},{"style":1036},[3696],{"type":998,"value":1518},{"type":993,"tag":1021,"props":3698,"children":3699},{"style":1089},[3700],{"type":998,"value":3701},"5",{"type":993,"tag":1021,"props":3703,"children":3704},{"style":1048},[3705],{"type":998,"value":1097},{"type":993,"tag":1021,"props":3707,"children":3708},{"style":1089},[3709],{"type":998,"value":3672},{"type":993,"tag":1021,"props":3711,"children":3712},{"style":1048},[3713],{"type":998,"value":1415},{"type":993,"tag":1021,"props":3715,"children":3716},{"class":1023,"line":256},[3717],{"type":993,"tag":1021,"props":3718,"children":3719},{"emptyLinePlaceholder":13},[3720],{"type":998,"value":1231},{"type":993,"tag":1021,"props":3722,"children":3723},{"class":1023,"line":265},[3724,3728,3732,3736,3741,3745,3750,3754,3758,3763,3767,3772,3776,3781],{"type":993,"tag":1021,"props":3725,"children":3726},{"style":1089},[3727],{"type":998,"value":1334},{"type":993,"tag":1021,"props":3729,"children":3730},{"style":1048},[3731],{"type":998,"value":1339},{"type":993,"tag":1021,"props":3733,"children":3734},{"style":1036},[3735],{"type":998,"value":1344},{"type":993,"tag":1021,"props":3737,"children":3738},{"style":1057},[3739],{"type":998,"value":3740},"\"BMI 1: ",{"type":993,"tag":1021,"props":3742,"children":3743},{"style":1089},[3744],{"type":998,"value":1354},{"type":993,"tag":1021,"props":3746,"children":3747},{"style":1048},[3748],{"type":998,"value":3749},"bmi1",{"type":993,"tag":1021,"props":3751,"children":3752},{"style":1036},[3753],{"type":998,"value":1383},{"type":993,"tag":1021,"props":3755,"children":3756},{"style":1089},[3757],{"type":998,"value":1364},{"type":993,"tag":1021,"props":3759,"children":3760},{"style":1057},[3761],{"type":998,"value":3762}," (",{"type":993,"tag":1021,"props":3764,"children":3765},{"style":1089},[3766],{"type":998,"value":1354},{"type":993,"tag":1021,"props":3768,"children":3769},{"style":1048},[3770],{"type":998,"value":3771},"result1",{"type":993,"tag":1021,"props":3773,"children":3774},{"style":1089},[3775],{"type":998,"value":1364},{"type":993,"tag":1021,"props":3777,"children":3778},{"style":1057},[3779],{"type":998,"value":3780},")\"",{"type":993,"tag":1021,"props":3782,"children":3783},{"style":1048},[3784],{"type":998,"value":1415},{"type":993,"tag":1021,"props":3786,"children":3787},{"class":1023,"line":274},[3788,3792,3796,3800,3805,3809,3814,3818,3823,3827,3832,3836,3840],{"type":993,"tag":1021,"props":3789,"children":3790},{"style":1089},[3791],{"type":998,"value":1334},{"type":993,"tag":1021,"props":3793,"children":3794},{"style":1048},[3795],{"type":998,"value":1339},{"type":993,"tag":1021,"props":3797,"children":3798},{"style":1036},[3799],{"type":998,"value":1344},{"type":993,"tag":1021,"props":3801,"children":3802},{"style":1057},[3803],{"type":998,"value":3804},"\"BMI 2: ",{"type":993,"tag":1021,"props":3806,"children":3807},{"style":1089},[3808],{"type":998,"value":1354},{"type":993,"tag":1021,"props":3810,"children":3811},{"style":1048},[3812],{"type":998,"value":3813},"bmi2",{"type":993,"tag":1021,"props":3815,"children":3816},{"style":1089},[3817],{"type":998,"value":1364},{"type":993,"tag":1021,"props":3819,"children":3820},{"style":1057},[3821],{"type":998,"value":3822}," - ",{"type":993,"tag":1021,"props":3824,"children":3825},{"style":1089},[3826],{"type":998,"value":1354},{"type":993,"tag":1021,"props":3828,"children":3829},{"style":1048},[3830],{"type":998,"value":3831},"result2",{"type":993,"tag":1021,"props":3833,"children":3834},{"style":1089},[3835],{"type":998,"value":1364},{"type":993,"tag":1021,"props":3837,"children":3838},{"style":1057},[3839],{"type":998,"value":1410},{"type":993,"tag":1021,"props":3841,"children":3842},{"style":1048},[3843],{"type":998,"value":1415},{"type":993,"tag":1417,"props":3845,"children":3847},{"id":3846},"returning-data-structures",[3848],{"type":998,"value":3849},"💡 Returning Data Structures",{"type":993,"tag":1001,"props":3851,"children":3852},{},[3853],{"type":998,"value":3854},"Functions can return complex data structures like lists, dictionaries, or custom objects to organize related information effectively.",{"type":993,"tag":1007,"props":3856,"children":3857},{},[3858],{"type":993,"tag":1011,"props":3859,"children":3861},{"className":1013,"code":3860,"language":6,"meta":8,"style":8},"def create_user_summary(name, age, email):\n    \"\"\"Create a user summary dictionary\"\"\"\n    return {\n        'name': name,\n        'age': age,\n        'email': email,\n        'id': name.lower().replace(' ', '_'),\n        'active': True\n    }\n\ndef get_even_odd_numbers(numbers):\n    \"\"\"Separate numbers into even and odd lists\"\"\"\n    even = [n for n in numbers if n % 2 == 0]\n    odd = [n for n in numbers if n % 2 == 1]\n    return even, odd\n\ndef generate_report_data(sales_data):\n    \"\"\"Generate comprehensive sales report\"\"\"\n    return {\n        'total_sales': sum(sales_data),\n        'average_sale': sum(sales_data) / len(sales_data),\n        'best_day': max(sales_data),\n        'total_days': len(sales_data),\n        'sales_list': sales_data\n    }\n\n# Work with returned data structures\nuser = create_user_summary(\"Alice Johnson\", 28, \"alice@example.com\")\neven_nums, odd_nums = get_even_odd_numbers([1, 2, 3, 4, 5, 6])\nreport = generate_report_data([100, 150, 200, 175])\n\nprint(f\"User ID: {user['id']}\")\nprint(f\"Even: {even_nums}, Odd: {odd_nums}\")\nprint(f\"Sales report: {report['total_sales']} total\")\n",[3862],{"type":993,"tag":1017,"props":3863,"children":3864},{"__ignoreMap":8},[3865,3882,3890,3902,3915,3928,3941,3973,3991,3999,4006,4022,4030,4096,4157,4169,4176,4193,4201,4212,4234,4267,4288,4309,4322,4329,4336,4344,4387,4457,4509,4516,4567,4626],{"type":993,"tag":1021,"props":3866,"children":3867},{"class":1023,"line":12},[3868,3872,3877],{"type":993,"tag":1021,"props":3869,"children":3870},{"style":1036},[3871],{"type":998,"value":1039},{"type":993,"tag":1021,"props":3873,"children":3874},{"style":1042},[3875],{"type":998,"value":3876}," create_user_summary",{"type":993,"tag":1021,"props":3878,"children":3879},{"style":1048},[3880],{"type":998,"value":3881},"(name, age, email):\n",{"type":993,"tag":1021,"props":3883,"children":3884},{"class":1023,"line":27},[3885],{"type":993,"tag":1021,"props":3886,"children":3887},{"style":1057},[3888],{"type":998,"value":3889},"    \"\"\"Create a user summary dictionary\"\"\"\n",{"type":993,"tag":1021,"props":3891,"children":3892},{"class":1023,"line":36},[3893,3897],{"type":993,"tag":1021,"props":3894,"children":3895},{"style":1036},[3896],{"type":998,"value":1213},{"type":993,"tag":1021,"props":3898,"children":3899},{"style":1048},[3900],{"type":998,"value":3901}," {\n",{"type":993,"tag":1021,"props":3903,"children":3904},{"class":1023,"line":45},[3905,3910],{"type":993,"tag":1021,"props":3906,"children":3907},{"style":1057},[3908],{"type":998,"value":3909},"        'name'",{"type":993,"tag":1021,"props":3911,"children":3912},{"style":1048},[3913],{"type":998,"value":3914},": name,\n",{"type":993,"tag":1021,"props":3916,"children":3917},{"class":1023,"line":54},[3918,3923],{"type":993,"tag":1021,"props":3919,"children":3920},{"style":1057},[3921],{"type":998,"value":3922},"        'age'",{"type":993,"tag":1021,"props":3924,"children":3925},{"style":1048},[3926],{"type":998,"value":3927},": age,\n",{"type":993,"tag":1021,"props":3929,"children":3930},{"class":1023,"line":63},[3931,3936],{"type":993,"tag":1021,"props":3932,"children":3933},{"style":1057},[3934],{"type":998,"value":3935},"        'email'",{"type":993,"tag":1021,"props":3937,"children":3938},{"style":1048},[3939],{"type":998,"value":3940},": email,\n",{"type":993,"tag":1021,"props":3942,"children":3943},{"class":1023,"line":72},[3944,3949,3954,3959,3963,3968],{"type":993,"tag":1021,"props":3945,"children":3946},{"style":1057},[3947],{"type":998,"value":3948},"        'id'",{"type":993,"tag":1021,"props":3950,"children":3951},{"style":1048},[3952],{"type":998,"value":3953},": name.lower().replace(",{"type":993,"tag":1021,"props":3955,"children":3956},{"style":1057},[3957],{"type":998,"value":3958},"' '",{"type":993,"tag":1021,"props":3960,"children":3961},{"style":1048},[3962],{"type":998,"value":1097},{"type":993,"tag":1021,"props":3964,"children":3965},{"style":1057},[3966],{"type":998,"value":3967},"'_'",{"type":993,"tag":1021,"props":3969,"children":3970},{"style":1048},[3971],{"type":998,"value":3972},"),\n",{"type":993,"tag":1021,"props":3974,"children":3975},{"class":1023,"line":81},[3976,3981,3986],{"type":993,"tag":1021,"props":3977,"children":3978},{"style":1057},[3979],{"type":998,"value":3980},"        'active'",{"type":993,"tag":1021,"props":3982,"children":3983},{"style":1048},[3984],{"type":998,"value":3985},": ",{"type":993,"tag":1021,"props":3987,"children":3988},{"style":1089},[3989],{"type":998,"value":3990},"True\n",{"type":993,"tag":1021,"props":3992,"children":3993},{"class":1023,"line":91},[3994],{"type":993,"tag":1021,"props":3995,"children":3996},{"style":1048},[3997],{"type":998,"value":3998},"    }\n",{"type":993,"tag":1021,"props":4000,"children":4001},{"class":1023,"line":100},[4002],{"type":993,"tag":1021,"props":4003,"children":4004},{"emptyLinePlaceholder":13},[4005],{"type":998,"value":1231},{"type":993,"tag":1021,"props":4007,"children":4008},{"class":1023,"line":109},[4009,4013,4018],{"type":993,"tag":1021,"props":4010,"children":4011},{"style":1036},[4012],{"type":998,"value":1039},{"type":993,"tag":1021,"props":4014,"children":4015},{"style":1042},[4016],{"type":998,"value":4017}," get_even_odd_numbers",{"type":993,"tag":1021,"props":4019,"children":4020},{"style":1048},[4021],{"type":998,"value":1051},{"type":993,"tag":1021,"props":4023,"children":4024},{"class":1023,"line":118},[4025],{"type":993,"tag":1021,"props":4026,"children":4027},{"style":1057},[4028],{"type":998,"value":4029},"    \"\"\"Separate numbers into even and odd lists\"\"\"\n",{"type":993,"tag":1021,"props":4031,"children":4032},{"class":1023,"line":127},[4033,4038,4042,4047,4051,4056,4060,4065,4070,4074,4079,4083,4088,4092],{"type":993,"tag":1021,"props":4034,"children":4035},{"style":1048},[4036],{"type":998,"value":4037},"    even ",{"type":993,"tag":1021,"props":4039,"children":4040},{"style":1036},[4041],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4043,"children":4044},{"style":1048},[4045],{"type":998,"value":4046}," [n ",{"type":993,"tag":1021,"props":4048,"children":4049},{"style":1036},[4050],{"type":998,"value":1624},{"type":993,"tag":1021,"props":4052,"children":4053},{"style":1048},[4054],{"type":998,"value":4055}," n ",{"type":993,"tag":1021,"props":4057,"children":4058},{"style":1036},[4059],{"type":998,"value":1634},{"type":993,"tag":1021,"props":4061,"children":4062},{"style":1048},[4063],{"type":998,"value":4064}," numbers ",{"type":993,"tag":1021,"props":4066,"children":4067},{"style":1036},[4068],{"type":998,"value":4069},"if",{"type":993,"tag":1021,"props":4071,"children":4072},{"style":1048},[4073],{"type":998,"value":4055},{"type":993,"tag":1021,"props":4075,"children":4076},{"style":1036},[4077],{"type":998,"value":4078},"%",{"type":993,"tag":1021,"props":4080,"children":4081},{"style":1089},[4082],{"type":998,"value":1916},{"type":993,"tag":1021,"props":4084,"children":4085},{"style":1036},[4086],{"type":998,"value":4087}," ==",{"type":993,"tag":1021,"props":4089,"children":4090},{"style":1089},[4091],{"type":998,"value":3322},{"type":993,"tag":1021,"props":4093,"children":4094},{"style":1048},[4095],{"type":998,"value":1302},{"type":993,"tag":1021,"props":4097,"children":4098},{"class":1023,"line":136},[4099,4104,4108,4112,4116,4120,4124,4128,4132,4136,4140,4144,4148,4153],{"type":993,"tag":1021,"props":4100,"children":4101},{"style":1048},[4102],{"type":998,"value":4103},"    odd ",{"type":993,"tag":1021,"props":4105,"children":4106},{"style":1036},[4107],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4109,"children":4110},{"style":1048},[4111],{"type":998,"value":4046},{"type":993,"tag":1021,"props":4113,"children":4114},{"style":1036},[4115],{"type":998,"value":1624},{"type":993,"tag":1021,"props":4117,"children":4118},{"style":1048},[4119],{"type":998,"value":4055},{"type":993,"tag":1021,"props":4121,"children":4122},{"style":1036},[4123],{"type":998,"value":1634},{"type":993,"tag":1021,"props":4125,"children":4126},{"style":1048},[4127],{"type":998,"value":4064},{"type":993,"tag":1021,"props":4129,"children":4130},{"style":1036},[4131],{"type":998,"value":4069},{"type":993,"tag":1021,"props":4133,"children":4134},{"style":1048},[4135],{"type":998,"value":4055},{"type":993,"tag":1021,"props":4137,"children":4138},{"style":1036},[4139],{"type":998,"value":4078},{"type":993,"tag":1021,"props":4141,"children":4142},{"style":1089},[4143],{"type":998,"value":1916},{"type":993,"tag":1021,"props":4145,"children":4146},{"style":1036},[4147],{"type":998,"value":4087},{"type":993,"tag":1021,"props":4149,"children":4150},{"style":1089},[4151],{"type":998,"value":4152}," 1",{"type":993,"tag":1021,"props":4154,"children":4155},{"style":1048},[4156],{"type":998,"value":1302},{"type":993,"tag":1021,"props":4158,"children":4159},{"class":1023,"line":146},[4160,4164],{"type":993,"tag":1021,"props":4161,"children":4162},{"style":1036},[4163],{"type":998,"value":1213},{"type":993,"tag":1021,"props":4165,"children":4166},{"style":1048},[4167],{"type":998,"value":4168}," even, odd\n",{"type":993,"tag":1021,"props":4170,"children":4171},{"class":1023,"line":155},[4172],{"type":993,"tag":1021,"props":4173,"children":4174},{"emptyLinePlaceholder":13},[4175],{"type":998,"value":1231},{"type":993,"tag":1021,"props":4177,"children":4178},{"class":1023,"line":164},[4179,4183,4188],{"type":993,"tag":1021,"props":4180,"children":4181},{"style":1036},[4182],{"type":998,"value":1039},{"type":993,"tag":1021,"props":4184,"children":4185},{"style":1042},[4186],{"type":998,"value":4187}," generate_report_data",{"type":993,"tag":1021,"props":4189,"children":4190},{"style":1048},[4191],{"type":998,"value":4192},"(sales_data):\n",{"type":993,"tag":1021,"props":4194,"children":4195},{"class":1023,"line":173},[4196],{"type":993,"tag":1021,"props":4197,"children":4198},{"style":1057},[4199],{"type":998,"value":4200},"    \"\"\"Generate comprehensive sales report\"\"\"\n",{"type":993,"tag":1021,"props":4202,"children":4203},{"class":1023,"line":182},[4204,4208],{"type":993,"tag":1021,"props":4205,"children":4206},{"style":1036},[4207],{"type":998,"value":1213},{"type":993,"tag":1021,"props":4209,"children":4210},{"style":1048},[4211],{"type":998,"value":3901},{"type":993,"tag":1021,"props":4213,"children":4214},{"class":1023,"line":191},[4215,4220,4224,4229],{"type":993,"tag":1021,"props":4216,"children":4217},{"style":1057},[4218],{"type":998,"value":4219},"        'total_sales'",{"type":993,"tag":1021,"props":4221,"children":4222},{"style":1048},[4223],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4225,"children":4226},{"style":1089},[4227],{"type":998,"value":4228},"sum",{"type":993,"tag":1021,"props":4230,"children":4231},{"style":1048},[4232],{"type":998,"value":4233},"(sales_data),\n",{"type":993,"tag":1021,"props":4235,"children":4236},{"class":1023,"line":201},[4237,4242,4246,4250,4255,4259,4263],{"type":993,"tag":1021,"props":4238,"children":4239},{"style":1057},[4240],{"type":998,"value":4241},"        'average_sale'",{"type":993,"tag":1021,"props":4243,"children":4244},{"style":1048},[4245],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4247,"children":4248},{"style":1089},[4249],{"type":998,"value":4228},{"type":993,"tag":1021,"props":4251,"children":4252},{"style":1048},[4253],{"type":998,"value":4254},"(sales_data) ",{"type":993,"tag":1021,"props":4256,"children":4257},{"style":1036},[4258],{"type":998,"value":1168},{"type":993,"tag":1021,"props":4260,"children":4261},{"style":1089},[4262],{"type":998,"value":1173},{"type":993,"tag":1021,"props":4264,"children":4265},{"style":1048},[4266],{"type":998,"value":4233},{"type":993,"tag":1021,"props":4268,"children":4269},{"class":1023,"line":210},[4270,4275,4279,4284],{"type":993,"tag":1021,"props":4271,"children":4272},{"style":1057},[4273],{"type":998,"value":4274},"        'best_day'",{"type":993,"tag":1021,"props":4276,"children":4277},{"style":1048},[4278],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4280,"children":4281},{"style":1089},[4282],{"type":998,"value":4283},"max",{"type":993,"tag":1021,"props":4285,"children":4286},{"style":1048},[4287],{"type":998,"value":4233},{"type":993,"tag":1021,"props":4289,"children":4290},{"class":1023,"line":219},[4291,4296,4300,4305],{"type":993,"tag":1021,"props":4292,"children":4293},{"style":1057},[4294],{"type":998,"value":4295},"        'total_days'",{"type":993,"tag":1021,"props":4297,"children":4298},{"style":1048},[4299],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4301,"children":4302},{"style":1089},[4303],{"type":998,"value":4304},"len",{"type":993,"tag":1021,"props":4306,"children":4307},{"style":1048},[4308],{"type":998,"value":4233},{"type":993,"tag":1021,"props":4310,"children":4311},{"class":1023,"line":228},[4312,4317],{"type":993,"tag":1021,"props":4313,"children":4314},{"style":1057},[4315],{"type":998,"value":4316},"        'sales_list'",{"type":993,"tag":1021,"props":4318,"children":4319},{"style":1048},[4320],{"type":998,"value":4321},": sales_data\n",{"type":993,"tag":1021,"props":4323,"children":4324},{"class":1023,"line":238},[4325],{"type":993,"tag":1021,"props":4326,"children":4327},{"style":1048},[4328],{"type":998,"value":3998},{"type":993,"tag":1021,"props":4330,"children":4331},{"class":1023,"line":247},[4332],{"type":993,"tag":1021,"props":4333,"children":4334},{"emptyLinePlaceholder":13},[4335],{"type":998,"value":1231},{"type":993,"tag":1021,"props":4337,"children":4338},{"class":1023,"line":256},[4339],{"type":993,"tag":1021,"props":4340,"children":4341},{"style":1027},[4342],{"type":998,"value":4343},"# Work with returned data structures\n",{"type":993,"tag":1021,"props":4345,"children":4346},{"class":1023,"line":265},[4347,4352,4356,4361,4365,4369,4374,4378,4383],{"type":993,"tag":1021,"props":4348,"children":4349},{"style":1048},[4350],{"type":998,"value":4351},"user ",{"type":993,"tag":1021,"props":4353,"children":4354},{"style":1036},[4355],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4357,"children":4358},{"style":1048},[4359],{"type":998,"value":4360}," create_user_summary(",{"type":993,"tag":1021,"props":4362,"children":4363},{"style":1057},[4364],{"type":998,"value":2145},{"type":993,"tag":1021,"props":4366,"children":4367},{"style":1048},[4368],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4370,"children":4371},{"style":1089},[4372],{"type":998,"value":4373},"28",{"type":993,"tag":1021,"props":4375,"children":4376},{"style":1048},[4377],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4379,"children":4380},{"style":1057},[4381],{"type":998,"value":4382},"\"alice@example.com\"",{"type":993,"tag":1021,"props":4384,"children":4385},{"style":1048},[4386],{"type":998,"value":1415},{"type":993,"tag":1021,"props":4388,"children":4389},{"class":1023,"line":274},[4390,4395,4399,4404,4408,4412,4417,4421,4426,4430,4435,4439,4443,4447,4452],{"type":993,"tag":1021,"props":4391,"children":4392},{"style":1048},[4393],{"type":998,"value":4394},"even_nums, odd_nums ",{"type":993,"tag":1021,"props":4396,"children":4397},{"style":1036},[4398],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4400,"children":4401},{"style":1048},[4402],{"type":998,"value":4403}," get_even_odd_numbers([",{"type":993,"tag":1021,"props":4405,"children":4406},{"style":1089},[4407],{"type":998,"value":1951},{"type":993,"tag":1021,"props":4409,"children":4410},{"style":1048},[4411],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4413,"children":4414},{"style":1089},[4415],{"type":998,"value":4416},"2",{"type":993,"tag":1021,"props":4418,"children":4419},{"style":1048},[4420],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4422,"children":4423},{"style":1089},[4424],{"type":998,"value":4425},"3",{"type":993,"tag":1021,"props":4427,"children":4428},{"style":1048},[4429],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4431,"children":4432},{"style":1089},[4433],{"type":998,"value":4434},"4",{"type":993,"tag":1021,"props":4436,"children":4437},{"style":1048},[4438],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4440,"children":4441},{"style":1089},[4442],{"type":998,"value":3701},{"type":993,"tag":1021,"props":4444,"children":4445},{"style":1048},[4446],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4448,"children":4449},{"style":1089},[4450],{"type":998,"value":4451},"6",{"type":993,"tag":1021,"props":4453,"children":4454},{"style":1048},[4455],{"type":998,"value":4456},"])\n",{"type":993,"tag":1021,"props":4458,"children":4459},{"class":1023,"line":284},[4460,4465,4469,4474,4478,4482,4487,4491,4496,4500,4505],{"type":993,"tag":1021,"props":4461,"children":4462},{"style":1048},[4463],{"type":998,"value":4464},"report ",{"type":993,"tag":1021,"props":4466,"children":4467},{"style":1036},[4468],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4470,"children":4471},{"style":1048},[4472],{"type":998,"value":4473}," generate_report_data([",{"type":993,"tag":1021,"props":4475,"children":4476},{"style":1089},[4477],{"type":998,"value":1699},{"type":993,"tag":1021,"props":4479,"children":4480},{"style":1048},[4481],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4483,"children":4484},{"style":1089},[4485],{"type":998,"value":4486},"150",{"type":993,"tag":1021,"props":4488,"children":4489},{"style":1048},[4490],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4492,"children":4493},{"style":1089},[4494],{"type":998,"value":4495},"200",{"type":993,"tag":1021,"props":4497,"children":4498},{"style":1048},[4499],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4501,"children":4502},{"style":1089},[4503],{"type":998,"value":4504},"175",{"type":993,"tag":1021,"props":4506,"children":4507},{"style":1048},[4508],{"type":998,"value":4456},{"type":993,"tag":1021,"props":4510,"children":4511},{"class":1023,"line":293},[4512],{"type":993,"tag":1021,"props":4513,"children":4514},{"emptyLinePlaceholder":13},[4515],{"type":998,"value":1231},{"type":993,"tag":1021,"props":4517,"children":4518},{"class":1023,"line":302},[4519,4523,4527,4531,4536,4540,4545,4550,4555,4559,4563],{"type":993,"tag":1021,"props":4520,"children":4521},{"style":1089},[4522],{"type":998,"value":1334},{"type":993,"tag":1021,"props":4524,"children":4525},{"style":1048},[4526],{"type":998,"value":1339},{"type":993,"tag":1021,"props":4528,"children":4529},{"style":1036},[4530],{"type":998,"value":1344},{"type":993,"tag":1021,"props":4532,"children":4533},{"style":1057},[4534],{"type":998,"value":4535},"\"User ID: ",{"type":993,"tag":1021,"props":4537,"children":4538},{"style":1089},[4539],{"type":998,"value":1354},{"type":993,"tag":1021,"props":4541,"children":4542},{"style":1048},[4543],{"type":998,"value":4544},"user[",{"type":993,"tag":1021,"props":4546,"children":4547},{"style":1057},[4548],{"type":998,"value":4549},"'id'",{"type":993,"tag":1021,"props":4551,"children":4552},{"style":1048},[4553],{"type":998,"value":4554},"]",{"type":993,"tag":1021,"props":4556,"children":4557},{"style":1089},[4558],{"type":998,"value":1364},{"type":993,"tag":1021,"props":4560,"children":4561},{"style":1057},[4562],{"type":998,"value":1410},{"type":993,"tag":1021,"props":4564,"children":4565},{"style":1048},[4566],{"type":998,"value":1415},{"type":993,"tag":1021,"props":4568,"children":4569},{"class":1023,"line":311},[4570,4574,4578,4582,4587,4591,4596,4600,4605,4609,4614,4618,4622],{"type":993,"tag":1021,"props":4571,"children":4572},{"style":1089},[4573],{"type":998,"value":1334},{"type":993,"tag":1021,"props":4575,"children":4576},{"style":1048},[4577],{"type":998,"value":1339},{"type":993,"tag":1021,"props":4579,"children":4580},{"style":1036},[4581],{"type":998,"value":1344},{"type":993,"tag":1021,"props":4583,"children":4584},{"style":1057},[4585],{"type":998,"value":4586},"\"Even: ",{"type":993,"tag":1021,"props":4588,"children":4589},{"style":1089},[4590],{"type":998,"value":1354},{"type":993,"tag":1021,"props":4592,"children":4593},{"style":1048},[4594],{"type":998,"value":4595},"even_nums",{"type":993,"tag":1021,"props":4597,"children":4598},{"style":1089},[4599],{"type":998,"value":1364},{"type":993,"tag":1021,"props":4601,"children":4602},{"style":1057},[4603],{"type":998,"value":4604},", Odd: ",{"type":993,"tag":1021,"props":4606,"children":4607},{"style":1089},[4608],{"type":998,"value":1354},{"type":993,"tag":1021,"props":4610,"children":4611},{"style":1048},[4612],{"type":998,"value":4613},"odd_nums",{"type":993,"tag":1021,"props":4615,"children":4616},{"style":1089},[4617],{"type":998,"value":1364},{"type":993,"tag":1021,"props":4619,"children":4620},{"style":1057},[4621],{"type":998,"value":1410},{"type":993,"tag":1021,"props":4623,"children":4624},{"style":1048},[4625],{"type":998,"value":1415},{"type":993,"tag":1021,"props":4627,"children":4628},{"class":1023,"line":320},[4629,4633,4637,4641,4646,4650,4655,4660,4664,4668,4673],{"type":993,"tag":1021,"props":4630,"children":4631},{"style":1089},[4632],{"type":998,"value":1334},{"type":993,"tag":1021,"props":4634,"children":4635},{"style":1048},[4636],{"type":998,"value":1339},{"type":993,"tag":1021,"props":4638,"children":4639},{"style":1036},[4640],{"type":998,"value":1344},{"type":993,"tag":1021,"props":4642,"children":4643},{"style":1057},[4644],{"type":998,"value":4645},"\"Sales report: ",{"type":993,"tag":1021,"props":4647,"children":4648},{"style":1089},[4649],{"type":998,"value":1354},{"type":993,"tag":1021,"props":4651,"children":4652},{"style":1048},[4653],{"type":998,"value":4654},"report[",{"type":993,"tag":1021,"props":4656,"children":4657},{"style":1057},[4658],{"type":998,"value":4659},"'total_sales'",{"type":993,"tag":1021,"props":4661,"children":4662},{"style":1048},[4663],{"type":998,"value":4554},{"type":993,"tag":1021,"props":4665,"children":4666},{"style":1089},[4667],{"type":998,"value":1364},{"type":993,"tag":1021,"props":4669,"children":4670},{"style":1057},[4671],{"type":998,"value":4672}," total\"",{"type":993,"tag":1021,"props":4674,"children":4675},{"style":1048},[4676],{"type":998,"value":1415},{"type":993,"tag":1417,"props":4678,"children":4680},{"id":4679},"practical-applications",[4681],{"type":998,"value":4682},"📚 Practical Applications",{"type":993,"tag":4684,"props":4685,"children":4687},"h3",{"id":4686},"api-response-functions",[4688],{"type":998,"value":4689},"API Response Functions",{"type":993,"tag":1001,"props":4691,"children":4692},{},[4693],{"type":998,"value":4694},"Functions that return structured data work perfectly for API responses where different endpoints need to return consistent formats.",{"type":993,"tag":1007,"props":4696,"children":4697},{},[4698],{"type":993,"tag":1011,"props":4699,"children":4701},{"className":1013,"code":4700,"language":6,"meta":8,"style":8},"def api_success(data, message=\"Success\"):\n    \"\"\"Return standardized API success response\"\"\"\n    return {\n        'success': True,\n        'message': message,\n        'data': data,\n        'timestamp': '2024-01-15 10:30:00'\n    }\n\ndef api_error(error_message, error_code=400):\n    \"\"\"Return standardized API error response\"\"\"\n    return {\n        'success': False,\n        'error': error_message,\n        'code': error_code,\n        'timestamp': '2024-01-15 10:30:00'\n    }\n\n# Use standardized responses\nuser_data = {'name': 'Alice', 'id': 123}\nsuccess_response = api_success(user_data, \"User retrieved successfully\")\nerror_response = api_error(\"User not found\", 404)\n\nprint(\"Success:\", success_response)\nprint(\"Error:\", error_response)\n",[4702],{"type":993,"tag":1017,"props":4703,"children":4704},{"__ignoreMap":8},[4705,4736,4744,4755,4776,4789,4802,4819,4826,4833,4863,4871,4882,4901,4914,4927,4942,4949,4956,4964,5016,5042,5077,5084,5105],{"type":993,"tag":1021,"props":4706,"children":4707},{"class":1023,"line":12},[4708,4712,4717,4722,4726,4731],{"type":993,"tag":1021,"props":4709,"children":4710},{"style":1036},[4711],{"type":998,"value":1039},{"type":993,"tag":1021,"props":4713,"children":4714},{"style":1042},[4715],{"type":998,"value":4716}," api_success",{"type":993,"tag":1021,"props":4718,"children":4719},{"style":1048},[4720],{"type":998,"value":4721},"(data, message",{"type":993,"tag":1021,"props":4723,"children":4724},{"style":1036},[4725],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4727,"children":4728},{"style":1057},[4729],{"type":998,"value":4730},"\"Success\"",{"type":993,"tag":1021,"props":4732,"children":4733},{"style":1048},[4734],{"type":998,"value":4735},"):\n",{"type":993,"tag":1021,"props":4737,"children":4738},{"class":1023,"line":27},[4739],{"type":993,"tag":1021,"props":4740,"children":4741},{"style":1057},[4742],{"type":998,"value":4743},"    \"\"\"Return standardized API success response\"\"\"\n",{"type":993,"tag":1021,"props":4745,"children":4746},{"class":1023,"line":36},[4747,4751],{"type":993,"tag":1021,"props":4748,"children":4749},{"style":1036},[4750],{"type":998,"value":1213},{"type":993,"tag":1021,"props":4752,"children":4753},{"style":1048},[4754],{"type":998,"value":3901},{"type":993,"tag":1021,"props":4756,"children":4757},{"class":1023,"line":45},[4758,4763,4767,4771],{"type":993,"tag":1021,"props":4759,"children":4760},{"style":1057},[4761],{"type":998,"value":4762},"        'success'",{"type":993,"tag":1021,"props":4764,"children":4765},{"style":1048},[4766],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4768,"children":4769},{"style":1089},[4770],{"type":998,"value":2388},{"type":993,"tag":1021,"props":4772,"children":4773},{"style":1048},[4774],{"type":998,"value":4775},",\n",{"type":993,"tag":1021,"props":4777,"children":4778},{"class":1023,"line":54},[4779,4784],{"type":993,"tag":1021,"props":4780,"children":4781},{"style":1057},[4782],{"type":998,"value":4783},"        'message'",{"type":993,"tag":1021,"props":4785,"children":4786},{"style":1048},[4787],{"type":998,"value":4788},": message,\n",{"type":993,"tag":1021,"props":4790,"children":4791},{"class":1023,"line":63},[4792,4797],{"type":993,"tag":1021,"props":4793,"children":4794},{"style":1057},[4795],{"type":998,"value":4796},"        'data'",{"type":993,"tag":1021,"props":4798,"children":4799},{"style":1048},[4800],{"type":998,"value":4801},": data,\n",{"type":993,"tag":1021,"props":4803,"children":4804},{"class":1023,"line":72},[4805,4810,4814],{"type":993,"tag":1021,"props":4806,"children":4807},{"style":1057},[4808],{"type":998,"value":4809},"        'timestamp'",{"type":993,"tag":1021,"props":4811,"children":4812},{"style":1048},[4813],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4815,"children":4816},{"style":1057},[4817],{"type":998,"value":4818},"'2024-01-15 10:30:00'\n",{"type":993,"tag":1021,"props":4820,"children":4821},{"class":1023,"line":81},[4822],{"type":993,"tag":1021,"props":4823,"children":4824},{"style":1048},[4825],{"type":998,"value":3998},{"type":993,"tag":1021,"props":4827,"children":4828},{"class":1023,"line":91},[4829],{"type":993,"tag":1021,"props":4830,"children":4831},{"emptyLinePlaceholder":13},[4832],{"type":998,"value":1231},{"type":993,"tag":1021,"props":4834,"children":4835},{"class":1023,"line":100},[4836,4840,4845,4850,4854,4859],{"type":993,"tag":1021,"props":4837,"children":4838},{"style":1036},[4839],{"type":998,"value":1039},{"type":993,"tag":1021,"props":4841,"children":4842},{"style":1042},[4843],{"type":998,"value":4844}," api_error",{"type":993,"tag":1021,"props":4846,"children":4847},{"style":1048},[4848],{"type":998,"value":4849},"(error_message, error_code",{"type":993,"tag":1021,"props":4851,"children":4852},{"style":1036},[4853],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4855,"children":4856},{"style":1089},[4857],{"type":998,"value":4858},"400",{"type":993,"tag":1021,"props":4860,"children":4861},{"style":1048},[4862],{"type":998,"value":4735},{"type":993,"tag":1021,"props":4864,"children":4865},{"class":1023,"line":109},[4866],{"type":993,"tag":1021,"props":4867,"children":4868},{"style":1057},[4869],{"type":998,"value":4870},"    \"\"\"Return standardized API error response\"\"\"\n",{"type":993,"tag":1021,"props":4872,"children":4873},{"class":1023,"line":118},[4874,4878],{"type":993,"tag":1021,"props":4875,"children":4876},{"style":1036},[4877],{"type":998,"value":1213},{"type":993,"tag":1021,"props":4879,"children":4880},{"style":1048},[4881],{"type":998,"value":3901},{"type":993,"tag":1021,"props":4883,"children":4884},{"class":1023,"line":127},[4885,4889,4893,4897],{"type":993,"tag":1021,"props":4886,"children":4887},{"style":1057},[4888],{"type":998,"value":4762},{"type":993,"tag":1021,"props":4890,"children":4891},{"style":1048},[4892],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4894,"children":4895},{"style":1089},[4896],{"type":998,"value":2590},{"type":993,"tag":1021,"props":4898,"children":4899},{"style":1048},[4900],{"type":998,"value":4775},{"type":993,"tag":1021,"props":4902,"children":4903},{"class":1023,"line":136},[4904,4909],{"type":993,"tag":1021,"props":4905,"children":4906},{"style":1057},[4907],{"type":998,"value":4908},"        'error'",{"type":993,"tag":1021,"props":4910,"children":4911},{"style":1048},[4912],{"type":998,"value":4913},": error_message,\n",{"type":993,"tag":1021,"props":4915,"children":4916},{"class":1023,"line":146},[4917,4922],{"type":993,"tag":1021,"props":4918,"children":4919},{"style":1057},[4920],{"type":998,"value":4921},"        'code'",{"type":993,"tag":1021,"props":4923,"children":4924},{"style":1048},[4925],{"type":998,"value":4926},": error_code,\n",{"type":993,"tag":1021,"props":4928,"children":4929},{"class":1023,"line":155},[4930,4934,4938],{"type":993,"tag":1021,"props":4931,"children":4932},{"style":1057},[4933],{"type":998,"value":4809},{"type":993,"tag":1021,"props":4935,"children":4936},{"style":1048},[4937],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4939,"children":4940},{"style":1057},[4941],{"type":998,"value":4818},{"type":993,"tag":1021,"props":4943,"children":4944},{"class":1023,"line":164},[4945],{"type":993,"tag":1021,"props":4946,"children":4947},{"style":1048},[4948],{"type":998,"value":3998},{"type":993,"tag":1021,"props":4950,"children":4951},{"class":1023,"line":173},[4952],{"type":993,"tag":1021,"props":4953,"children":4954},{"emptyLinePlaceholder":13},[4955],{"type":998,"value":1231},{"type":993,"tag":1021,"props":4957,"children":4958},{"class":1023,"line":182},[4959],{"type":993,"tag":1021,"props":4960,"children":4961},{"style":1027},[4962],{"type":998,"value":4963},"# Use standardized responses\n",{"type":993,"tag":1021,"props":4965,"children":4966},{"class":1023,"line":191},[4967,4972,4976,4980,4985,4989,4994,4998,5002,5006,5011],{"type":993,"tag":1021,"props":4968,"children":4969},{"style":1048},[4970],{"type":998,"value":4971},"user_data ",{"type":993,"tag":1021,"props":4973,"children":4974},{"style":1036},[4975],{"type":998,"value":1136},{"type":993,"tag":1021,"props":4977,"children":4978},{"style":1048},[4979],{"type":998,"value":2220},{"type":993,"tag":1021,"props":4981,"children":4982},{"style":1057},[4983],{"type":998,"value":4984},"'name'",{"type":993,"tag":1021,"props":4986,"children":4987},{"style":1048},[4988],{"type":998,"value":3985},{"type":993,"tag":1021,"props":4990,"children":4991},{"style":1057},[4992],{"type":998,"value":4993},"'Alice'",{"type":993,"tag":1021,"props":4995,"children":4996},{"style":1048},[4997],{"type":998,"value":1097},{"type":993,"tag":1021,"props":4999,"children":5000},{"style":1057},[5001],{"type":998,"value":4549},{"type":993,"tag":1021,"props":5003,"children":5004},{"style":1048},[5005],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5007,"children":5008},{"style":1089},[5009],{"type":998,"value":5010},"123",{"type":993,"tag":1021,"props":5012,"children":5013},{"style":1048},[5014],{"type":998,"value":5015},"}\n",{"type":993,"tag":1021,"props":5017,"children":5018},{"class":1023,"line":201},[5019,5024,5028,5033,5038],{"type":993,"tag":1021,"props":5020,"children":5021},{"style":1048},[5022],{"type":998,"value":5023},"success_response ",{"type":993,"tag":1021,"props":5025,"children":5026},{"style":1036},[5027],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5029,"children":5030},{"style":1048},[5031],{"type":998,"value":5032}," api_success(user_data, ",{"type":993,"tag":1021,"props":5034,"children":5035},{"style":1057},[5036],{"type":998,"value":5037},"\"User retrieved successfully\"",{"type":993,"tag":1021,"props":5039,"children":5040},{"style":1048},[5041],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5043,"children":5044},{"class":1023,"line":210},[5045,5050,5054,5059,5064,5068,5073],{"type":993,"tag":1021,"props":5046,"children":5047},{"style":1048},[5048],{"type":998,"value":5049},"error_response ",{"type":993,"tag":1021,"props":5051,"children":5052},{"style":1036},[5053],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5055,"children":5056},{"style":1048},[5057],{"type":998,"value":5058}," api_error(",{"type":993,"tag":1021,"props":5060,"children":5061},{"style":1057},[5062],{"type":998,"value":5063},"\"User not found\"",{"type":993,"tag":1021,"props":5065,"children":5066},{"style":1048},[5067],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5069,"children":5070},{"style":1089},[5071],{"type":998,"value":5072},"404",{"type":993,"tag":1021,"props":5074,"children":5075},{"style":1048},[5076],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5078,"children":5079},{"class":1023,"line":219},[5080],{"type":993,"tag":1021,"props":5081,"children":5082},{"emptyLinePlaceholder":13},[5083],{"type":998,"value":1231},{"type":993,"tag":1021,"props":5085,"children":5086},{"class":1023,"line":228},[5087,5091,5095,5100],{"type":993,"tag":1021,"props":5088,"children":5089},{"style":1089},[5090],{"type":998,"value":1334},{"type":993,"tag":1021,"props":5092,"children":5093},{"style":1048},[5094],{"type":998,"value":1339},{"type":993,"tag":1021,"props":5096,"children":5097},{"style":1057},[5098],{"type":998,"value":5099},"\"Success:\"",{"type":993,"tag":1021,"props":5101,"children":5102},{"style":1048},[5103],{"type":998,"value":5104},", success_response)\n",{"type":993,"tag":1021,"props":5106,"children":5107},{"class":1023,"line":238},[5108,5112,5116,5121],{"type":993,"tag":1021,"props":5109,"children":5110},{"style":1089},[5111],{"type":998,"value":1334},{"type":993,"tag":1021,"props":5113,"children":5114},{"style":1048},[5115],{"type":998,"value":1339},{"type":993,"tag":1021,"props":5117,"children":5118},{"style":1057},[5119],{"type":998,"value":5120},"\"Error:\"",{"type":993,"tag":1021,"props":5122,"children":5123},{"style":1048},[5124],{"type":998,"value":5125},", error_response)\n",{"type":993,"tag":4684,"props":5127,"children":5129},{"id":5128},"data-validation-functions",[5130],{"type":998,"value":5131},"Data Validation Functions",{"type":993,"tag":1001,"props":5133,"children":5134},{},[5135],{"type":998,"value":5136},"Functions that return validation results help create robust applications with clear error handling.",{"type":993,"tag":1007,"props":5138,"children":5139},{},[5140],{"type":993,"tag":1011,"props":5141,"children":5143},{"className":1013,"code":5142,"language":6,"meta":8,"style":8},"def validate_form_data(form_data):\n    \"\"\"Validate form data and return results\"\"\"\n    errors = []\n    \n    if not form_data.get('name'):\n        errors.append(\"Name is required\")\n    if not form_data.get('email') or '@' not in form_data['email']:\n        errors.append(\"Valid email is required\")\n    if form_data.get('age', 0) \u003C 18:\n        errors.append(\"Must be 18 or older\")\n    \n    if errors:\n        return False, errors\n    return True, \"Form data is valid\"\n\n# Test validation\nvalid_form = {'name': 'Alice', 'email': 'alice@example.com', 'age': 25}\ninvalid_form = {'name': '', 'email': 'invalid', 'age': 16}\n\nis_valid1, result1 = validate_form_data(valid_form)\nis_valid2, result2 = validate_form_data(invalid_form)\n\nprint(f\"Valid form: {is_valid1} - {result1}\")\nprint(f\"Invalid form: {is_valid2} - {result2}\")\n",[5144],{"type":993,"tag":1017,"props":5145,"children":5146},{"__ignoreMap":8},[5147,5164,5172,5189,5196,5220,5237,5294,5310,5351,5367,5374,5386,5402,5422,5429,5437,5503,5570,5577,5594,5611,5618,5675],{"type":993,"tag":1021,"props":5148,"children":5149},{"class":1023,"line":12},[5150,5154,5159],{"type":993,"tag":1021,"props":5151,"children":5152},{"style":1036},[5153],{"type":998,"value":1039},{"type":993,"tag":1021,"props":5155,"children":5156},{"style":1042},[5157],{"type":998,"value":5158}," validate_form_data",{"type":993,"tag":1021,"props":5160,"children":5161},{"style":1048},[5162],{"type":998,"value":5163},"(form_data):\n",{"type":993,"tag":1021,"props":5165,"children":5166},{"class":1023,"line":27},[5167],{"type":993,"tag":1021,"props":5168,"children":5169},{"style":1057},[5170],{"type":998,"value":5171},"    \"\"\"Validate form data and return results\"\"\"\n",{"type":993,"tag":1021,"props":5173,"children":5174},{"class":1023,"line":36},[5175,5180,5184],{"type":993,"tag":1021,"props":5176,"children":5177},{"style":1048},[5178],{"type":998,"value":5179},"    errors ",{"type":993,"tag":1021,"props":5181,"children":5182},{"style":1036},[5183],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5185,"children":5186},{"style":1048},[5187],{"type":998,"value":5188}," []\n",{"type":993,"tag":1021,"props":5190,"children":5191},{"class":1023,"line":45},[5192],{"type":993,"tag":1021,"props":5193,"children":5194},{"style":1048},[5195],{"type":998,"value":1123},{"type":993,"tag":1021,"props":5197,"children":5198},{"class":1023,"line":54},[5199,5203,5207,5212,5216],{"type":993,"tag":1021,"props":5200,"children":5201},{"style":1036},[5202],{"type":998,"value":1068},{"type":993,"tag":1021,"props":5204,"children":5205},{"style":1036},[5206],{"type":998,"value":1073},{"type":993,"tag":1021,"props":5208,"children":5209},{"style":1048},[5210],{"type":998,"value":5211}," form_data.get(",{"type":993,"tag":1021,"props":5213,"children":5214},{"style":1057},[5215],{"type":998,"value":4984},{"type":993,"tag":1021,"props":5217,"children":5218},{"style":1048},[5219],{"type":998,"value":4735},{"type":993,"tag":1021,"props":5221,"children":5222},{"class":1023,"line":63},[5223,5228,5233],{"type":993,"tag":1021,"props":5224,"children":5225},{"style":1048},[5226],{"type":998,"value":5227},"        errors.append(",{"type":993,"tag":1021,"props":5229,"children":5230},{"style":1057},[5231],{"type":998,"value":5232},"\"Name is required\"",{"type":993,"tag":1021,"props":5234,"children":5235},{"style":1048},[5236],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5238,"children":5239},{"class":1023,"line":72},[5240,5244,5248,5252,5257,5262,5267,5272,5276,5280,5285,5289],{"type":993,"tag":1021,"props":5241,"children":5242},{"style":1036},[5243],{"type":998,"value":1068},{"type":993,"tag":1021,"props":5245,"children":5246},{"style":1036},[5247],{"type":998,"value":1073},{"type":993,"tag":1021,"props":5249,"children":5250},{"style":1048},[5251],{"type":998,"value":5211},{"type":993,"tag":1021,"props":5253,"children":5254},{"style":1057},[5255],{"type":998,"value":5256},"'email'",{"type":993,"tag":1021,"props":5258,"children":5259},{"style":1048},[5260],{"type":998,"value":5261},") ",{"type":993,"tag":1021,"props":5263,"children":5264},{"style":1036},[5265],{"type":998,"value":5266},"or",{"type":993,"tag":1021,"props":5268,"children":5269},{"style":1057},[5270],{"type":998,"value":5271}," '@'",{"type":993,"tag":1021,"props":5273,"children":5274},{"style":1036},[5275],{"type":998,"value":1073},{"type":993,"tag":1021,"props":5277,"children":5278},{"style":1036},[5279],{"type":998,"value":2040},{"type":993,"tag":1021,"props":5281,"children":5282},{"style":1048},[5283],{"type":998,"value":5284}," form_data[",{"type":993,"tag":1021,"props":5286,"children":5287},{"style":1057},[5288],{"type":998,"value":5256},{"type":993,"tag":1021,"props":5290,"children":5291},{"style":1048},[5292],{"type":998,"value":5293},"]:\n",{"type":993,"tag":1021,"props":5295,"children":5296},{"class":1023,"line":81},[5297,5301,5306],{"type":993,"tag":1021,"props":5298,"children":5299},{"style":1048},[5300],{"type":998,"value":5227},{"type":993,"tag":1021,"props":5302,"children":5303},{"style":1057},[5304],{"type":998,"value":5305},"\"Valid email is required\"",{"type":993,"tag":1021,"props":5307,"children":5308},{"style":1048},[5309],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5311,"children":5312},{"class":1023,"line":91},[5313,5317,5321,5326,5330,5334,5338,5342,5347],{"type":993,"tag":1021,"props":5314,"children":5315},{"style":1036},[5316],{"type":998,"value":1068},{"type":993,"tag":1021,"props":5318,"children":5319},{"style":1048},[5320],{"type":998,"value":5211},{"type":993,"tag":1021,"props":5322,"children":5323},{"style":1057},[5324],{"type":998,"value":5325},"'age'",{"type":993,"tag":1021,"props":5327,"children":5328},{"style":1048},[5329],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5331,"children":5332},{"style":1089},[5333],{"type":998,"value":1937},{"type":993,"tag":1021,"props":5335,"children":5336},{"style":1048},[5337],{"type":998,"value":5261},{"type":993,"tag":1021,"props":5339,"children":5340},{"style":1036},[5341],{"type":998,"value":1576},{"type":993,"tag":1021,"props":5343,"children":5344},{"style":1089},[5345],{"type":998,"value":5346}," 18",{"type":993,"tag":1021,"props":5348,"children":5349},{"style":1048},[5350],{"type":998,"value":1586},{"type":993,"tag":1021,"props":5352,"children":5353},{"class":1023,"line":100},[5354,5358,5363],{"type":993,"tag":1021,"props":5355,"children":5356},{"style":1048},[5357],{"type":998,"value":5227},{"type":993,"tag":1021,"props":5359,"children":5360},{"style":1057},[5361],{"type":998,"value":5362},"\"Must be 18 or older\"",{"type":993,"tag":1021,"props":5364,"children":5365},{"style":1048},[5366],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5368,"children":5369},{"class":1023,"line":109},[5370],{"type":993,"tag":1021,"props":5371,"children":5372},{"style":1048},[5373],{"type":998,"value":1123},{"type":993,"tag":1021,"props":5375,"children":5376},{"class":1023,"line":118},[5377,5381],{"type":993,"tag":1021,"props":5378,"children":5379},{"style":1036},[5380],{"type":998,"value":1068},{"type":993,"tag":1021,"props":5382,"children":5383},{"style":1048},[5384],{"type":998,"value":5385}," errors:\n",{"type":993,"tag":1021,"props":5387,"children":5388},{"class":1023,"line":127},[5389,5393,5397],{"type":993,"tag":1021,"props":5390,"children":5391},{"style":1036},[5392],{"type":998,"value":1086},{"type":993,"tag":1021,"props":5394,"children":5395},{"style":1089},[5396],{"type":998,"value":2659},{"type":993,"tag":1021,"props":5398,"children":5399},{"style":1048},[5400],{"type":998,"value":5401},", errors\n",{"type":993,"tag":1021,"props":5403,"children":5404},{"class":1023,"line":136},[5405,5409,5413,5417],{"type":993,"tag":1021,"props":5406,"children":5407},{"style":1036},[5408],{"type":998,"value":1213},{"type":993,"tag":1021,"props":5410,"children":5411},{"style":1089},[5412],{"type":998,"value":2764},{"type":993,"tag":1021,"props":5414,"children":5415},{"style":1048},[5416],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5418,"children":5419},{"style":1057},[5420],{"type":998,"value":5421},"\"Form data is valid\"\n",{"type":993,"tag":1021,"props":5423,"children":5424},{"class":1023,"line":146},[5425],{"type":993,"tag":1021,"props":5426,"children":5427},{"emptyLinePlaceholder":13},[5428],{"type":998,"value":1231},{"type":993,"tag":1021,"props":5430,"children":5431},{"class":1023,"line":155},[5432],{"type":993,"tag":1021,"props":5433,"children":5434},{"style":1027},[5435],{"type":998,"value":5436},"# Test validation\n",{"type":993,"tag":1021,"props":5438,"children":5439},{"class":1023,"line":164},[5440,5445,5449,5453,5457,5461,5465,5469,5473,5477,5482,5486,5490,5494,5499],{"type":993,"tag":1021,"props":5441,"children":5442},{"style":1048},[5443],{"type":998,"value":5444},"valid_form ",{"type":993,"tag":1021,"props":5446,"children":5447},{"style":1036},[5448],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5450,"children":5451},{"style":1048},[5452],{"type":998,"value":2220},{"type":993,"tag":1021,"props":5454,"children":5455},{"style":1057},[5456],{"type":998,"value":4984},{"type":993,"tag":1021,"props":5458,"children":5459},{"style":1048},[5460],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5462,"children":5463},{"style":1057},[5464],{"type":998,"value":4993},{"type":993,"tag":1021,"props":5466,"children":5467},{"style":1048},[5468],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5470,"children":5471},{"style":1057},[5472],{"type":998,"value":5256},{"type":993,"tag":1021,"props":5474,"children":5475},{"style":1048},[5476],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5478,"children":5479},{"style":1057},[5480],{"type":998,"value":5481},"'alice@example.com'",{"type":993,"tag":1021,"props":5483,"children":5484},{"style":1048},[5485],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5487,"children":5488},{"style":1057},[5489],{"type":998,"value":5325},{"type":993,"tag":1021,"props":5491,"children":5492},{"style":1048},[5493],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5495,"children":5496},{"style":1089},[5497],{"type":998,"value":5498},"25",{"type":993,"tag":1021,"props":5500,"children":5501},{"style":1048},[5502],{"type":998,"value":5015},{"type":993,"tag":1021,"props":5504,"children":5505},{"class":1023,"line":173},[5506,5511,5515,5519,5523,5527,5532,5536,5540,5544,5549,5553,5557,5561,5566],{"type":993,"tag":1021,"props":5507,"children":5508},{"style":1048},[5509],{"type":998,"value":5510},"invalid_form ",{"type":993,"tag":1021,"props":5512,"children":5513},{"style":1036},[5514],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5516,"children":5517},{"style":1048},[5518],{"type":998,"value":2220},{"type":993,"tag":1021,"props":5520,"children":5521},{"style":1057},[5522],{"type":998,"value":4984},{"type":993,"tag":1021,"props":5524,"children":5525},{"style":1048},[5526],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5528,"children":5529},{"style":1057},[5530],{"type":998,"value":5531},"''",{"type":993,"tag":1021,"props":5533,"children":5534},{"style":1048},[5535],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5537,"children":5538},{"style":1057},[5539],{"type":998,"value":5256},{"type":993,"tag":1021,"props":5541,"children":5542},{"style":1048},[5543],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5545,"children":5546},{"style":1057},[5547],{"type":998,"value":5548},"'invalid'",{"type":993,"tag":1021,"props":5550,"children":5551},{"style":1048},[5552],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5554,"children":5555},{"style":1057},[5556],{"type":998,"value":5325},{"type":993,"tag":1021,"props":5558,"children":5559},{"style":1048},[5560],{"type":998,"value":3985},{"type":993,"tag":1021,"props":5562,"children":5563},{"style":1089},[5564],{"type":998,"value":5565},"16",{"type":993,"tag":1021,"props":5567,"children":5568},{"style":1048},[5569],{"type":998,"value":5015},{"type":993,"tag":1021,"props":5571,"children":5572},{"class":1023,"line":182},[5573],{"type":993,"tag":1021,"props":5574,"children":5575},{"emptyLinePlaceholder":13},[5576],{"type":998,"value":1231},{"type":993,"tag":1021,"props":5578,"children":5579},{"class":1023,"line":191},[5580,5585,5589],{"type":993,"tag":1021,"props":5581,"children":5582},{"style":1048},[5583],{"type":998,"value":5584},"is_valid1, result1 ",{"type":993,"tag":1021,"props":5586,"children":5587},{"style":1036},[5588],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5590,"children":5591},{"style":1048},[5592],{"type":998,"value":5593}," validate_form_data(valid_form)\n",{"type":993,"tag":1021,"props":5595,"children":5596},{"class":1023,"line":201},[5597,5602,5606],{"type":993,"tag":1021,"props":5598,"children":5599},{"style":1048},[5600],{"type":998,"value":5601},"is_valid2, result2 ",{"type":993,"tag":1021,"props":5603,"children":5604},{"style":1036},[5605],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5607,"children":5608},{"style":1048},[5609],{"type":998,"value":5610}," validate_form_data(invalid_form)\n",{"type":993,"tag":1021,"props":5612,"children":5613},{"class":1023,"line":210},[5614],{"type":993,"tag":1021,"props":5615,"children":5616},{"emptyLinePlaceholder":13},[5617],{"type":998,"value":1231},{"type":993,"tag":1021,"props":5619,"children":5620},{"class":1023,"line":219},[5621,5625,5629,5633,5638,5642,5647,5651,5655,5659,5663,5667,5671],{"type":993,"tag":1021,"props":5622,"children":5623},{"style":1089},[5624],{"type":998,"value":1334},{"type":993,"tag":1021,"props":5626,"children":5627},{"style":1048},[5628],{"type":998,"value":1339},{"type":993,"tag":1021,"props":5630,"children":5631},{"style":1036},[5632],{"type":998,"value":1344},{"type":993,"tag":1021,"props":5634,"children":5635},{"style":1057},[5636],{"type":998,"value":5637},"\"Valid form: ",{"type":993,"tag":1021,"props":5639,"children":5640},{"style":1089},[5641],{"type":998,"value":1354},{"type":993,"tag":1021,"props":5643,"children":5644},{"style":1048},[5645],{"type":998,"value":5646},"is_valid1",{"type":993,"tag":1021,"props":5648,"children":5649},{"style":1089},[5650],{"type":998,"value":1364},{"type":993,"tag":1021,"props":5652,"children":5653},{"style":1057},[5654],{"type":998,"value":3822},{"type":993,"tag":1021,"props":5656,"children":5657},{"style":1089},[5658],{"type":998,"value":1354},{"type":993,"tag":1021,"props":5660,"children":5661},{"style":1048},[5662],{"type":998,"value":3771},{"type":993,"tag":1021,"props":5664,"children":5665},{"style":1089},[5666],{"type":998,"value":1364},{"type":993,"tag":1021,"props":5668,"children":5669},{"style":1057},[5670],{"type":998,"value":1410},{"type":993,"tag":1021,"props":5672,"children":5673},{"style":1048},[5674],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5676,"children":5677},{"class":1023,"line":228},[5678,5682,5686,5690,5695,5699,5704,5708,5712,5716,5720,5724,5728],{"type":993,"tag":1021,"props":5679,"children":5680},{"style":1089},[5681],{"type":998,"value":1334},{"type":993,"tag":1021,"props":5683,"children":5684},{"style":1048},[5685],{"type":998,"value":1339},{"type":993,"tag":1021,"props":5687,"children":5688},{"style":1036},[5689],{"type":998,"value":1344},{"type":993,"tag":1021,"props":5691,"children":5692},{"style":1057},[5693],{"type":998,"value":5694},"\"Invalid form: ",{"type":993,"tag":1021,"props":5696,"children":5697},{"style":1089},[5698],{"type":998,"value":1354},{"type":993,"tag":1021,"props":5700,"children":5701},{"style":1048},[5702],{"type":998,"value":5703},"is_valid2",{"type":993,"tag":1021,"props":5705,"children":5706},{"style":1089},[5707],{"type":998,"value":1364},{"type":993,"tag":1021,"props":5709,"children":5710},{"style":1057},[5711],{"type":998,"value":3822},{"type":993,"tag":1021,"props":5713,"children":5714},{"style":1089},[5715],{"type":998,"value":1354},{"type":993,"tag":1021,"props":5717,"children":5718},{"style":1048},[5719],{"type":998,"value":3831},{"type":993,"tag":1021,"props":5721,"children":5722},{"style":1089},[5723],{"type":998,"value":1364},{"type":993,"tag":1021,"props":5725,"children":5726},{"style":1057},[5727],{"type":998,"value":1410},{"type":993,"tag":1021,"props":5729,"children":5730},{"style":1048},[5731],{"type":998,"value":1415},{"type":993,"tag":2992,"props":5733,"children":5736},{"emoji":5734,"title":5735,"type":2961},"✅","Best Practices",[5737,5747,5757,5767,5777],{"type":993,"tag":1001,"props":5738,"children":5739},{},[5740,5745],{"type":993,"tag":3002,"props":5741,"children":5742},{},[5743],{"type":998,"value":5744},"Consistent Types:",{"type":998,"value":5746}," Return the same data types for predictable function behavior.",{"type":993,"tag":1001,"props":5748,"children":5749},{},[5750,5755],{"type":993,"tag":3002,"props":5751,"children":5752},{},[5753],{"type":998,"value":5754},"Clear Meaning:",{"type":998,"value":5756}," Make return values self-explanatory through naming and structure.",{"type":993,"tag":1001,"props":5758,"children":5759},{},[5760,5765],{"type":993,"tag":3002,"props":5761,"children":5762},{},[5763],{"type":998,"value":5764},"Handle Edge Cases:",{"type":998,"value":5766}," Always consider what to return for invalid or empty inputs.",{"type":993,"tag":1001,"props":5768,"children":5769},{},[5770,5775],{"type":993,"tag":3002,"props":5771,"children":5772},{},[5773],{"type":998,"value":5774},"Document Returns:",{"type":998,"value":5776}," Use docstrings to explain what the function returns.",{"type":993,"tag":1001,"props":5778,"children":5779},{},[5780,5784],{"type":993,"tag":3002,"props":5781,"children":5782},{},[5783],{"type":998,"value":3036},{"type":998,"value":5785}," Use tuples for related values, dictionaries for structured data.",{"type":993,"tag":5787,"props":5788,"children":5790},"content-exercise",{":widget-view":5789,"category":6,"id":638},"true",[],{"type":993,"tag":5792,"props":5793,"children":5796},"exercise",{"hint":5794,"prompt":5795},"Calculate area (length * width) and perimeter (2 * (length + width)), then return both values using comma separation","Create a function that calculates both the area and perimeter of a rectangle. Return both values so they can be used separately.",[5797],{"type":993,"tag":1011,"props":5798,"children":5800},{"className":1013,"code":5799,"language":6,"meta":8,"style":8},"def rectangle_calculations(length, width):\n    # TODO: Calculate area (length * width)\n    # TODO: Calculate perimeter (2 * (length + width))\n    # TODO: Return both area and perimeter\n    pass\n\n# TODO: Test the function and unpack the results\narea, perimeter = rectangle_calculations(5, 3)\nprint(f\"Area: {area}\")\nprint(f\"Perimeter: {perimeter}\")\n",[5801],{"type":993,"tag":1017,"props":5802,"children":5803},{"__ignoreMap":8},[5804,5821,5839,5855,5871,5879,5886,5903,5936,5977],{"type":993,"tag":1021,"props":5805,"children":5806},{"class":1023,"line":12},[5807,5811,5816],{"type":993,"tag":1021,"props":5808,"children":5809},{"style":1036},[5810],{"type":998,"value":1039},{"type":993,"tag":1021,"props":5812,"children":5813},{"style":1042},[5814],{"type":998,"value":5815}," rectangle_calculations",{"type":993,"tag":1021,"props":5817,"children":5818},{"style":1048},[5819],{"type":998,"value":5820},"(length, width):\n",{"type":993,"tag":1021,"props":5822,"children":5823},{"class":1023,"line":27},[5824,5829,5834],{"type":993,"tag":1021,"props":5825,"children":5826},{"style":1027},[5827],{"type":998,"value":5828},"    # ",{"type":993,"tag":1021,"props":5830,"children":5831},{"style":1036},[5832],{"type":998,"value":5833},"TODO",{"type":993,"tag":1021,"props":5835,"children":5836},{"style":1027},[5837],{"type":998,"value":5838},": Calculate area (length * width)\n",{"type":993,"tag":1021,"props":5840,"children":5841},{"class":1023,"line":36},[5842,5846,5850],{"type":993,"tag":1021,"props":5843,"children":5844},{"style":1027},[5845],{"type":998,"value":5828},{"type":993,"tag":1021,"props":5847,"children":5848},{"style":1036},[5849],{"type":998,"value":5833},{"type":993,"tag":1021,"props":5851,"children":5852},{"style":1027},[5853],{"type":998,"value":5854},": Calculate perimeter (2 * (length + width))\n",{"type":993,"tag":1021,"props":5856,"children":5857},{"class":1023,"line":45},[5858,5862,5866],{"type":993,"tag":1021,"props":5859,"children":5860},{"style":1027},[5861],{"type":998,"value":5828},{"type":993,"tag":1021,"props":5863,"children":5864},{"style":1036},[5865],{"type":998,"value":5833},{"type":993,"tag":1021,"props":5867,"children":5868},{"style":1027},[5869],{"type":998,"value":5870},": Return both area and perimeter\n",{"type":993,"tag":1021,"props":5872,"children":5873},{"class":1023,"line":54},[5874],{"type":993,"tag":1021,"props":5875,"children":5876},{"style":1036},[5877],{"type":998,"value":5878},"    pass\n",{"type":993,"tag":1021,"props":5880,"children":5881},{"class":1023,"line":63},[5882],{"type":993,"tag":1021,"props":5883,"children":5884},{"emptyLinePlaceholder":13},[5885],{"type":998,"value":1231},{"type":993,"tag":1021,"props":5887,"children":5888},{"class":1023,"line":72},[5889,5894,5898],{"type":993,"tag":1021,"props":5890,"children":5891},{"style":1027},[5892],{"type":998,"value":5893},"# ",{"type":993,"tag":1021,"props":5895,"children":5896},{"style":1036},[5897],{"type":998,"value":5833},{"type":993,"tag":1021,"props":5899,"children":5900},{"style":1027},[5901],{"type":998,"value":5902},": Test the function and unpack the results\n",{"type":993,"tag":1021,"props":5904,"children":5905},{"class":1023,"line":81},[5906,5911,5915,5920,5924,5928,5932],{"type":993,"tag":1021,"props":5907,"children":5908},{"style":1048},[5909],{"type":998,"value":5910},"area, perimeter ",{"type":993,"tag":1021,"props":5912,"children":5913},{"style":1036},[5914],{"type":998,"value":1136},{"type":993,"tag":1021,"props":5916,"children":5917},{"style":1048},[5918],{"type":998,"value":5919}," rectangle_calculations(",{"type":993,"tag":1021,"props":5921,"children":5922},{"style":1089},[5923],{"type":998,"value":3701},{"type":993,"tag":1021,"props":5925,"children":5926},{"style":1048},[5927],{"type":998,"value":1097},{"type":993,"tag":1021,"props":5929,"children":5930},{"style":1089},[5931],{"type":998,"value":4425},{"type":993,"tag":1021,"props":5933,"children":5934},{"style":1048},[5935],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5937,"children":5938},{"class":1023,"line":91},[5939,5943,5947,5951,5956,5960,5965,5969,5973],{"type":993,"tag":1021,"props":5940,"children":5941},{"style":1089},[5942],{"type":998,"value":1334},{"type":993,"tag":1021,"props":5944,"children":5945},{"style":1048},[5946],{"type":998,"value":1339},{"type":993,"tag":1021,"props":5948,"children":5949},{"style":1036},[5950],{"type":998,"value":1344},{"type":993,"tag":1021,"props":5952,"children":5953},{"style":1057},[5954],{"type":998,"value":5955},"\"Area: ",{"type":993,"tag":1021,"props":5957,"children":5958},{"style":1089},[5959],{"type":998,"value":1354},{"type":993,"tag":1021,"props":5961,"children":5962},{"style":1048},[5963],{"type":998,"value":5964},"area",{"type":993,"tag":1021,"props":5966,"children":5967},{"style":1089},[5968],{"type":998,"value":1364},{"type":993,"tag":1021,"props":5970,"children":5971},{"style":1057},[5972],{"type":998,"value":1410},{"type":993,"tag":1021,"props":5974,"children":5975},{"style":1048},[5976],{"type":998,"value":1415},{"type":993,"tag":1021,"props":5978,"children":5979},{"class":1023,"line":100},[5980,5984,5988,5992,5997,6001,6006,6010,6014],{"type":993,"tag":1021,"props":5981,"children":5982},{"style":1089},[5983],{"type":998,"value":1334},{"type":993,"tag":1021,"props":5985,"children":5986},{"style":1048},[5987],{"type":998,"value":1339},{"type":993,"tag":1021,"props":5989,"children":5990},{"style":1036},[5991],{"type":998,"value":1344},{"type":993,"tag":1021,"props":5993,"children":5994},{"style":1057},[5995],{"type":998,"value":5996},"\"Perimeter: ",{"type":993,"tag":1021,"props":5998,"children":5999},{"style":1089},[6000],{"type":998,"value":1354},{"type":993,"tag":1021,"props":6002,"children":6003},{"style":1048},[6004],{"type":998,"value":6005},"perimeter",{"type":993,"tag":1021,"props":6007,"children":6008},{"style":1089},[6009],{"type":998,"value":1364},{"type":993,"tag":1021,"props":6011,"children":6012},{"style":1057},[6013],{"type":998,"value":1410},{"type":993,"tag":1021,"props":6015,"children":6016},{"style":1048},[6017],{"type":998,"value":1415},{"type":993,"tag":4684,"props":6019,"children":6021},{"id":6020},"solution-and-explanation",[6022],{"type":998,"value":6023},"Solution and Explanation 💡",{"type":993,"tag":6025,"props":6026,"children":6027},"details",{},[6028,6036,6283,6291],{"type":993,"tag":6029,"props":6030,"children":6033},"summary",{"className":6031},[6032],"cursor-pointer",[6034],{"type":998,"value":6035},"Click to see the complete solution",{"type":993,"tag":1007,"props":6037,"children":6038},{},[6039],{"type":993,"tag":1011,"props":6040,"children":6042},{"className":1013,"code":6041,"language":6,"meta":8,"style":8},"def rectangle_calculations(length, width):\n    # Calculate area (length * width)\n    area = length * width\n    # Calculate perimeter (2 * (length + width))\n    perimeter = 2 * (length + width)\n    # Return both area and perimeter\n    return area, perimeter\n\n# Test the function and unpack the results\narea, perimeter = rectangle_calculations(5, 3)\nprint(f\"Area: {area}\")\nprint(f\"Perimeter: {perimeter}\")\n",[6043],{"type":993,"tag":1017,"props":6044,"children":6045},{"__ignoreMap":8},[6046,6061,6069,6095,6103,6139,6147,6159,6166,6174,6205,6244],{"type":993,"tag":1021,"props":6047,"children":6048},{"class":1023,"line":12},[6049,6053,6057],{"type":993,"tag":1021,"props":6050,"children":6051},{"style":1036},[6052],{"type":998,"value":1039},{"type":993,"tag":1021,"props":6054,"children":6055},{"style":1042},[6056],{"type":998,"value":5815},{"type":993,"tag":1021,"props":6058,"children":6059},{"style":1048},[6060],{"type":998,"value":5820},{"type":993,"tag":1021,"props":6062,"children":6063},{"class":1023,"line":27},[6064],{"type":993,"tag":1021,"props":6065,"children":6066},{"style":1027},[6067],{"type":998,"value":6068},"    # Calculate area (length * width)\n",{"type":993,"tag":1021,"props":6070,"children":6071},{"class":1023,"line":36},[6072,6077,6081,6086,6090],{"type":993,"tag":1021,"props":6073,"children":6074},{"style":1048},[6075],{"type":998,"value":6076},"    area ",{"type":993,"tag":1021,"props":6078,"children":6079},{"style":1036},[6080],{"type":998,"value":1136},{"type":993,"tag":1021,"props":6082,"children":6083},{"style":1048},[6084],{"type":998,"value":6085}," length ",{"type":993,"tag":1021,"props":6087,"children":6088},{"style":1036},[6089],{"type":998,"value":1484},{"type":993,"tag":1021,"props":6091,"children":6092},{"style":1048},[6093],{"type":998,"value":6094}," width\n",{"type":993,"tag":1021,"props":6096,"children":6097},{"class":1023,"line":45},[6098],{"type":993,"tag":1021,"props":6099,"children":6100},{"style":1027},[6101],{"type":998,"value":6102},"    # Calculate perimeter (2 * (length + width))\n",{"type":993,"tag":1021,"props":6104,"children":6105},{"class":1023,"line":54},[6106,6111,6115,6119,6124,6129,6134],{"type":993,"tag":1021,"props":6107,"children":6108},{"style":1048},[6109],{"type":998,"value":6110},"    perimeter ",{"type":993,"tag":1021,"props":6112,"children":6113},{"style":1036},[6114],{"type":998,"value":1136},{"type":993,"tag":1021,"props":6116,"children":6117},{"style":1089},[6118],{"type":998,"value":1916},{"type":993,"tag":1021,"props":6120,"children":6121},{"style":1036},[6122],{"type":998,"value":6123}," *",{"type":993,"tag":1021,"props":6125,"children":6126},{"style":1048},[6127],{"type":998,"value":6128}," (length ",{"type":993,"tag":1021,"props":6130,"children":6131},{"style":1036},[6132],{"type":998,"value":6133},"+",{"type":993,"tag":1021,"props":6135,"children":6136},{"style":1048},[6137],{"type":998,"value":6138}," width)\n",{"type":993,"tag":1021,"props":6140,"children":6141},{"class":1023,"line":63},[6142],{"type":993,"tag":1021,"props":6143,"children":6144},{"style":1027},[6145],{"type":998,"value":6146},"    # Return both area and perimeter\n",{"type":993,"tag":1021,"props":6148,"children":6149},{"class":1023,"line":72},[6150,6154],{"type":993,"tag":1021,"props":6151,"children":6152},{"style":1036},[6153],{"type":998,"value":1213},{"type":993,"tag":1021,"props":6155,"children":6156},{"style":1048},[6157],{"type":998,"value":6158}," area, perimeter\n",{"type":993,"tag":1021,"props":6160,"children":6161},{"class":1023,"line":81},[6162],{"type":993,"tag":1021,"props":6163,"children":6164},{"emptyLinePlaceholder":13},[6165],{"type":998,"value":1231},{"type":993,"tag":1021,"props":6167,"children":6168},{"class":1023,"line":91},[6169],{"type":993,"tag":1021,"props":6170,"children":6171},{"style":1027},[6172],{"type":998,"value":6173},"# Test the function and unpack the results\n",{"type":993,"tag":1021,"props":6175,"children":6176},{"class":1023,"line":100},[6177,6181,6185,6189,6193,6197,6201],{"type":993,"tag":1021,"props":6178,"children":6179},{"style":1048},[6180],{"type":998,"value":5910},{"type":993,"tag":1021,"props":6182,"children":6183},{"style":1036},[6184],{"type":998,"value":1136},{"type":993,"tag":1021,"props":6186,"children":6187},{"style":1048},[6188],{"type":998,"value":5919},{"type":993,"tag":1021,"props":6190,"children":6191},{"style":1089},[6192],{"type":998,"value":3701},{"type":993,"tag":1021,"props":6194,"children":6195},{"style":1048},[6196],{"type":998,"value":1097},{"type":993,"tag":1021,"props":6198,"children":6199},{"style":1089},[6200],{"type":998,"value":4425},{"type":993,"tag":1021,"props":6202,"children":6203},{"style":1048},[6204],{"type":998,"value":1415},{"type":993,"tag":1021,"props":6206,"children":6207},{"class":1023,"line":109},[6208,6212,6216,6220,6224,6228,6232,6236,6240],{"type":993,"tag":1021,"props":6209,"children":6210},{"style":1089},[6211],{"type":998,"value":1334},{"type":993,"tag":1021,"props":6213,"children":6214},{"style":1048},[6215],{"type":998,"value":1339},{"type":993,"tag":1021,"props":6217,"children":6218},{"style":1036},[6219],{"type":998,"value":1344},{"type":993,"tag":1021,"props":6221,"children":6222},{"style":1057},[6223],{"type":998,"value":5955},{"type":993,"tag":1021,"props":6225,"children":6226},{"style":1089},[6227],{"type":998,"value":1354},{"type":993,"tag":1021,"props":6229,"children":6230},{"style":1048},[6231],{"type":998,"value":5964},{"type":993,"tag":1021,"props":6233,"children":6234},{"style":1089},[6235],{"type":998,"value":1364},{"type":993,"tag":1021,"props":6237,"children":6238},{"style":1057},[6239],{"type":998,"value":1410},{"type":993,"tag":1021,"props":6241,"children":6242},{"style":1048},[6243],{"type":998,"value":1415},{"type":993,"tag":1021,"props":6245,"children":6246},{"class":1023,"line":118},[6247,6251,6255,6259,6263,6267,6271,6275,6279],{"type":993,"tag":1021,"props":6248,"children":6249},{"style":1089},[6250],{"type":998,"value":1334},{"type":993,"tag":1021,"props":6252,"children":6253},{"style":1048},[6254],{"type":998,"value":1339},{"type":993,"tag":1021,"props":6256,"children":6257},{"style":1036},[6258],{"type":998,"value":1344},{"type":993,"tag":1021,"props":6260,"children":6261},{"style":1057},[6262],{"type":998,"value":5996},{"type":993,"tag":1021,"props":6264,"children":6265},{"style":1089},[6266],{"type":998,"value":1354},{"type":993,"tag":1021,"props":6268,"children":6269},{"style":1048},[6270],{"type":998,"value":6005},{"type":993,"tag":1021,"props":6272,"children":6273},{"style":1089},[6274],{"type":998,"value":1364},{"type":993,"tag":1021,"props":6276,"children":6277},{"style":1057},[6278],{"type":998,"value":1410},{"type":993,"tag":1021,"props":6280,"children":6281},{"style":1048},[6282],{"type":998,"value":1415},{"type":993,"tag":1001,"props":6284,"children":6285},{},[6286],{"type":993,"tag":3002,"props":6287,"children":6288},{},[6289],{"type":998,"value":6290},"Key Learning Points:",{"type":993,"tag":6292,"props":6293,"children":6294},"ul",{},[6295,6314,6325,6335],{"type":993,"tag":6296,"props":6297,"children":6298},"li",{},[6299,6301,6306,6308],{"type":998,"value":6300},"📌 ",{"type":993,"tag":3002,"props":6302,"children":6303},{},[6304],{"type":998,"value":6305},"Multiple return values",{"type":998,"value":6307},": Use commas to return multiple values ",{"type":993,"tag":1017,"props":6309,"children":6311},{"className":6310},[],[6312],{"type":998,"value":6313},"return value1, value2",{"type":993,"tag":6296,"props":6315,"children":6316},{},[6317,6318,6323],{"type":998,"value":6300},{"type":993,"tag":3002,"props":6319,"children":6320},{},[6321],{"type":998,"value":6322},"Tuple unpacking",{"type":998,"value":6324},": Assign multiple return values to separate variables",{"type":993,"tag":6296,"props":6326,"children":6327},{},[6328,6329,6333],{"type":998,"value":6300},{"type":993,"tag":3002,"props":6330,"children":6331},{},[6332],{"type":998,"value":3151},{"type":998,"value":6334},": Perfect for functions that compute related values",{"type":993,"tag":6296,"props":6336,"children":6337},{},[6338,6339,6344],{"type":998,"value":6300},{"type":993,"tag":3002,"props":6340,"children":6341},{},[6342],{"type":998,"value":6343},"Function organization",{"type":998,"value":6345},": One function can perform multiple related calculations",{"type":993,"tag":1001,"props":6347,"children":6348},{},[6349,6351,6357],{"type":998,"value":6350},"Learn more about ",{"type":993,"tag":6352,"props":6353,"children":6354},"a",{"href":644},[6355],{"type":998,"value":6356},"variable scope",{"type":998,"value":6358}," to understand how variables behave inside and outside functions.",{"type":993,"tag":1417,"props":6360,"children":6362},{"id":6361},"test-your-knowledge",[6363],{"type":998,"value":6364},"Test Your Knowledge",{"type":993,"tag":1001,"props":6366,"children":6367},{},[6368],{"type":998,"value":6369},"Test what you've learned about returning values:",{"type":993,"tag":6371,"props":6372,"children":6376},"redirect-button",{"icon":6373,"label":6374,"url":6375},"pi pi-send","Take Quiz","/tutorial-quiz/python/returning-values",[],{"type":993,"tag":1417,"props":6378,"children":6380},{"id":6379},"whats-next",[6381],{"type":998,"value":6382},"What's Next?",{"type":993,"tag":1001,"props":6384,"children":6385},{},[6386],{"type":998,"value":6387},"Now that you understand how functions return data, you're ready to learn about variable scope. Understanding where variables can be accessed is crucial for writing functions that work correctly with data.",{"type":993,"tag":1001,"props":6389,"children":6390},{},[6391,6393,6397],{"type":998,"value":6392},"Ready to continue? Check out our lesson on ",{"type":993,"tag":6352,"props":6394,"children":6395},{"href":644},[6396],{"type":998,"value":645},{"type":998,"value":6398},".",{"type":993,"tag":6400,"props":6401,"children":6402},"style",{},[6403],{"type":998,"value":6404},"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":6406},[6407,6408,6409,6410,6411,6412,6413,6418,6419],{"id":1419,"depth":27,"text":1422},{"id":1830,"depth":27,"text":1833},{"id":2299,"depth":27,"text":2302},{"id":3051,"depth":27,"text":3054},{"id":3249,"depth":27,"text":3252},{"id":3846,"depth":27,"text":3849},{"id":4679,"depth":27,"text":4682,"children":6414},[6415,6416,6417],{"id":4686,"depth":36,"text":4689},{"id":5128,"depth":36,"text":5131},{"id":6020,"depth":36,"text":6023},{"id":6361,"depth":27,"text":6364},{"id":6379,"depth":27,"text":6382},1782373745668]