[{"data":1,"prerenderedAt":7433},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/list-shortcuts":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},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[333],{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":270,"order":338,"body":989,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},{"type":990,"children":991,"toc":7394},"root",[992,1000,1006,1011,1446,1453,1458,1540,1547,1763,1769,1886,1890,2090,2096,2101,2175,2181,2380,2386,2589,2595,2757,2763,2957,2962,2968,2973,3059,3065,3250,3256,3495,3501,3716,3722,3727,3874,3880,4147,4153,4451,4455,4732,4738,4743,4834,4840,5140,5146,5524,5530,5721,5727,5732,5738,5909,5915,6119,6304,6310,6665,6671,6677,6827,6833,7245,7337,7349,7355,7360,7366,7372,7377,7388],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":337},[997],{"type":998,"value":999},"text","⚡ List Shortcuts",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Python provides many shortcuts and powerful techniques that make working with lists faster and more elegant. These shortcuts can help you write cleaner, more efficient code while accomplishing complex tasks with just a few lines.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Learning these shortcuts will make you more productive and help you write code that looks more professional and Pythonic.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Examples of list shortcuts\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n\n# List comprehension - create new list\nsquares = [x**2 for x in numbers]\nprint(\"Squares:\", squares)\n\n# Slicing - get parts of list\nfirst_half = numbers[:5]\nlast_half = numbers[5:]\nprint(\"First half:\", first_half)\nprint(\"Last half:\", last_half)\n\n# Built-in functions\nprint(\"Sum:\", sum(numbers))\nprint(\"Max:\", max(numbers))\nprint(\"Length:\", len(numbers))\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1149,1157,1165,1211,1235,1242,1250,1275,1301,1322,1343,1350,1358,1388,1417],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# Examples of list shortcuts\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039,1045,1051,1056,1062,1067,1072,1076,1081,1085,1090,1094,1099,1103,1108,1112,1117,1121,1126,1130,1135,1139,1144],{"type":993,"tag":1026,"props":1040,"children":1042},{"style":1041},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1043],{"type":998,"value":1044},"numbers ",{"type":993,"tag":1026,"props":1046,"children":1048},{"style":1047},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1049],{"type":998,"value":1050},"=",{"type":993,"tag":1026,"props":1052,"children":1053},{"style":1041},[1054],{"type":998,"value":1055}," [",{"type":993,"tag":1026,"props":1057,"children":1059},{"style":1058},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1060],{"type":998,"value":1061},"1",{"type":993,"tag":1026,"props":1063,"children":1064},{"style":1041},[1065],{"type":998,"value":1066},", ",{"type":993,"tag":1026,"props":1068,"children":1069},{"style":1058},[1070],{"type":998,"value":1071},"2",{"type":993,"tag":1026,"props":1073,"children":1074},{"style":1041},[1075],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1077,"children":1078},{"style":1058},[1079],{"type":998,"value":1080},"3",{"type":993,"tag":1026,"props":1082,"children":1083},{"style":1041},[1084],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1086,"children":1087},{"style":1058},[1088],{"type":998,"value":1089},"4",{"type":993,"tag":1026,"props":1091,"children":1092},{"style":1041},[1093],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1095,"children":1096},{"style":1058},[1097],{"type":998,"value":1098},"5",{"type":993,"tag":1026,"props":1100,"children":1101},{"style":1041},[1102],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1104,"children":1105},{"style":1058},[1106],{"type":998,"value":1107},"6",{"type":993,"tag":1026,"props":1109,"children":1110},{"style":1041},[1111],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1113,"children":1114},{"style":1058},[1115],{"type":998,"value":1116},"7",{"type":993,"tag":1026,"props":1118,"children":1119},{"style":1041},[1120],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1122,"children":1123},{"style":1058},[1124],{"type":998,"value":1125},"8",{"type":993,"tag":1026,"props":1127,"children":1128},{"style":1041},[1129],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1131,"children":1132},{"style":1058},[1133],{"type":998,"value":1134},"9",{"type":993,"tag":1026,"props":1136,"children":1137},{"style":1041},[1138],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1140,"children":1141},{"style":1058},[1142],{"type":998,"value":1143},"10",{"type":993,"tag":1026,"props":1145,"children":1146},{"style":1041},[1147],{"type":998,"value":1148},"]\n",{"type":993,"tag":1026,"props":1150,"children":1151},{"class":1028,"line":36},[1152],{"type":993,"tag":1026,"props":1153,"children":1154},{"emptyLinePlaceholder":13},[1155],{"type":998,"value":1156},"\n",{"type":993,"tag":1026,"props":1158,"children":1159},{"class":1028,"line":45},[1160],{"type":993,"tag":1026,"props":1161,"children":1162},{"style":1032},[1163],{"type":998,"value":1164},"# List comprehension - create new list\n",{"type":993,"tag":1026,"props":1166,"children":1167},{"class":1028,"line":54},[1168,1173,1177,1182,1187,1191,1196,1201,1206],{"type":993,"tag":1026,"props":1169,"children":1170},{"style":1041},[1171],{"type":998,"value":1172},"squares ",{"type":993,"tag":1026,"props":1174,"children":1175},{"style":1047},[1176],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1178,"children":1179},{"style":1041},[1180],{"type":998,"value":1181}," [x",{"type":993,"tag":1026,"props":1183,"children":1184},{"style":1047},[1185],{"type":998,"value":1186},"**",{"type":993,"tag":1026,"props":1188,"children":1189},{"style":1058},[1190],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1192,"children":1193},{"style":1047},[1194],{"type":998,"value":1195}," for",{"type":993,"tag":1026,"props":1197,"children":1198},{"style":1041},[1199],{"type":998,"value":1200}," x ",{"type":993,"tag":1026,"props":1202,"children":1203},{"style":1047},[1204],{"type":998,"value":1205},"in",{"type":993,"tag":1026,"props":1207,"children":1208},{"style":1041},[1209],{"type":998,"value":1210}," numbers]\n",{"type":993,"tag":1026,"props":1212,"children":1213},{"class":1028,"line":63},[1214,1219,1224,1230],{"type":993,"tag":1026,"props":1215,"children":1216},{"style":1058},[1217],{"type":998,"value":1218},"print",{"type":993,"tag":1026,"props":1220,"children":1221},{"style":1041},[1222],{"type":998,"value":1223},"(",{"type":993,"tag":1026,"props":1225,"children":1227},{"style":1226},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1228],{"type":998,"value":1229},"\"Squares:\"",{"type":993,"tag":1026,"props":1231,"children":1232},{"style":1041},[1233],{"type":998,"value":1234},", squares)\n",{"type":993,"tag":1026,"props":1236,"children":1237},{"class":1028,"line":72},[1238],{"type":993,"tag":1026,"props":1239,"children":1240},{"emptyLinePlaceholder":13},[1241],{"type":998,"value":1156},{"type":993,"tag":1026,"props":1243,"children":1244},{"class":1028,"line":81},[1245],{"type":993,"tag":1026,"props":1246,"children":1247},{"style":1032},[1248],{"type":998,"value":1249},"# Slicing - get parts of list\n",{"type":993,"tag":1026,"props":1251,"children":1252},{"class":1028,"line":91},[1253,1258,1262,1267,1271],{"type":993,"tag":1026,"props":1254,"children":1255},{"style":1041},[1256],{"type":998,"value":1257},"first_half ",{"type":993,"tag":1026,"props":1259,"children":1260},{"style":1047},[1261],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1263,"children":1264},{"style":1041},[1265],{"type":998,"value":1266}," numbers[:",{"type":993,"tag":1026,"props":1268,"children":1269},{"style":1058},[1270],{"type":998,"value":1098},{"type":993,"tag":1026,"props":1272,"children":1273},{"style":1041},[1274],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1276,"children":1277},{"class":1028,"line":100},[1278,1283,1287,1292,1296],{"type":993,"tag":1026,"props":1279,"children":1280},{"style":1041},[1281],{"type":998,"value":1282},"last_half ",{"type":993,"tag":1026,"props":1284,"children":1285},{"style":1047},[1286],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1288,"children":1289},{"style":1041},[1290],{"type":998,"value":1291}," numbers[",{"type":993,"tag":1026,"props":1293,"children":1294},{"style":1058},[1295],{"type":998,"value":1098},{"type":993,"tag":1026,"props":1297,"children":1298},{"style":1041},[1299],{"type":998,"value":1300},":]\n",{"type":993,"tag":1026,"props":1302,"children":1303},{"class":1028,"line":109},[1304,1308,1312,1317],{"type":993,"tag":1026,"props":1305,"children":1306},{"style":1058},[1307],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1309,"children":1310},{"style":1041},[1311],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1313,"children":1314},{"style":1226},[1315],{"type":998,"value":1316},"\"First half:\"",{"type":993,"tag":1026,"props":1318,"children":1319},{"style":1041},[1320],{"type":998,"value":1321},", first_half)\n",{"type":993,"tag":1026,"props":1323,"children":1324},{"class":1028,"line":118},[1325,1329,1333,1338],{"type":993,"tag":1026,"props":1326,"children":1327},{"style":1058},[1328],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1330,"children":1331},{"style":1041},[1332],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1334,"children":1335},{"style":1226},[1336],{"type":998,"value":1337},"\"Last half:\"",{"type":993,"tag":1026,"props":1339,"children":1340},{"style":1041},[1341],{"type":998,"value":1342},", last_half)\n",{"type":993,"tag":1026,"props":1344,"children":1345},{"class":1028,"line":127},[1346],{"type":993,"tag":1026,"props":1347,"children":1348},{"emptyLinePlaceholder":13},[1349],{"type":998,"value":1156},{"type":993,"tag":1026,"props":1351,"children":1352},{"class":1028,"line":136},[1353],{"type":993,"tag":1026,"props":1354,"children":1355},{"style":1032},[1356],{"type":998,"value":1357},"# Built-in functions\n",{"type":993,"tag":1026,"props":1359,"children":1360},{"class":1028,"line":146},[1361,1365,1369,1374,1378,1383],{"type":993,"tag":1026,"props":1362,"children":1363},{"style":1058},[1364],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1366,"children":1367},{"style":1041},[1368],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1370,"children":1371},{"style":1226},[1372],{"type":998,"value":1373},"\"Sum:\"",{"type":993,"tag":1026,"props":1375,"children":1376},{"style":1041},[1377],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1379,"children":1380},{"style":1058},[1381],{"type":998,"value":1382},"sum",{"type":993,"tag":1026,"props":1384,"children":1385},{"style":1041},[1386],{"type":998,"value":1387},"(numbers))\n",{"type":993,"tag":1026,"props":1389,"children":1390},{"class":1028,"line":155},[1391,1395,1399,1404,1408,1413],{"type":993,"tag":1026,"props":1392,"children":1393},{"style":1058},[1394],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1396,"children":1397},{"style":1041},[1398],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1400,"children":1401},{"style":1226},[1402],{"type":998,"value":1403},"\"Max:\"",{"type":993,"tag":1026,"props":1405,"children":1406},{"style":1041},[1407],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1409,"children":1410},{"style":1058},[1411],{"type":998,"value":1412},"max",{"type":993,"tag":1026,"props":1414,"children":1415},{"style":1041},[1416],{"type":998,"value":1387},{"type":993,"tag":1026,"props":1418,"children":1419},{"class":1028,"line":164},[1420,1424,1428,1433,1437,1442],{"type":993,"tag":1026,"props":1421,"children":1422},{"style":1058},[1423],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1425,"children":1426},{"style":1041},[1427],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1429,"children":1430},{"style":1226},[1431],{"type":998,"value":1432},"\"Length:\"",{"type":993,"tag":1026,"props":1434,"children":1435},{"style":1041},[1436],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1438,"children":1439},{"style":1058},[1440],{"type":998,"value":1441},"len",{"type":993,"tag":1026,"props":1443,"children":1444},{"style":1041},[1445],{"type":998,"value":1387},{"type":993,"tag":1447,"props":1448,"children":1450},"h2",{"id":1449},"list-comprehensions",[1451],{"type":998,"value":1452},"🚀 List Comprehensions",{"type":993,"tag":1001,"props":1454,"children":1455},{},[1456],{"type":998,"value":1457},"List comprehensions provide a concise way to create lists based on existing sequences. They're more readable and often faster than traditional loops for creating new lists.",{"type":993,"tag":1459,"props":1460,"children":1464},"info-box",{"emoji":1461,"title":1462,"type":1463},"🚀","List Comprehension Fundamentals","info",[1465,1482,1497,1505,1530],{"type":993,"tag":1001,"props":1466,"children":1467},{},[1468,1474,1476],{"type":993,"tag":1469,"props":1470,"children":1471},"strong",{},[1472],{"type":998,"value":1473},"Basic Syntax:",{"type":998,"value":1475}," ",{"type":993,"tag":1022,"props":1477,"children":1479},{"className":1478},[],[1480],{"type":998,"value":1481},"[expression for item in iterable]",{"type":993,"tag":1001,"props":1483,"children":1484},{},[1485,1490,1491],{"type":993,"tag":1469,"props":1486,"children":1487},{},[1488],{"type":998,"value":1489},"With Condition:",{"type":998,"value":1475},{"type":993,"tag":1022,"props":1492,"children":1494},{"className":1493},[],[1495],{"type":998,"value":1496},"[expression for item in iterable if condition]",{"type":993,"tag":1001,"props":1498,"children":1499},{},[1500],{"type":993,"tag":1469,"props":1501,"children":1502},{},[1503],{"type":998,"value":1504},"Key Advantages:",{"type":993,"tag":1506,"props":1507,"children":1508},"ul",{},[1509,1515,1520,1525],{"type":993,"tag":1510,"props":1511,"children":1512},"li",{},[1513],{"type":998,"value":1514},"More concise than traditional loops",{"type":993,"tag":1510,"props":1516,"children":1517},{},[1518],{"type":998,"value":1519},"Often 20-30% faster than equivalent for loops",{"type":993,"tag":1510,"props":1521,"children":1522},{},[1523],{"type":998,"value":1524},"More readable for simple transformations",{"type":993,"tag":1510,"props":1526,"children":1527},{},[1528],{"type":998,"value":1529},"Functional programming style",{"type":993,"tag":1001,"props":1531,"children":1532},{},[1533,1538],{"type":993,"tag":1469,"props":1534,"children":1535},{},[1536],{"type":998,"value":1537},"Perfect for:",{"type":998,"value":1539}," Creating new lists from existing data, filtering and transforming simultaneously",{"type":993,"tag":1541,"props":1542,"children":1544},"h3",{"id":1543},"basic-list-comprehensions",[1545],{"type":998,"value":1546},"Basic List Comprehensions",{"type":993,"tag":1012,"props":1548,"children":1549},{},[1550],{"type":993,"tag":1016,"props":1551,"children":1553},{"className":1018,"code":1552,"language":6,"meta":8,"style":8},"# Traditional way with loop\nsquares_loop = []\nfor x in range(1, 6):\n    squares_loop.append(x**2)\nprint(\"Squares (loop):\", squares_loop)\n\n# List comprehension way\nsquares_comp = [x**2 for x in range(1, 6)]\nprint(\"Squares (comprehension):\", squares_comp)\n",[1554],{"type":993,"tag":1022,"props":1555,"children":1556},{"__ignoreMap":8},[1557,1565,1582,1624,1645,1666,1673,1681,1742],{"type":993,"tag":1026,"props":1558,"children":1559},{"class":1028,"line":12},[1560],{"type":993,"tag":1026,"props":1561,"children":1562},{"style":1032},[1563],{"type":998,"value":1564},"# Traditional way with loop\n",{"type":993,"tag":1026,"props":1566,"children":1567},{"class":1028,"line":27},[1568,1573,1577],{"type":993,"tag":1026,"props":1569,"children":1570},{"style":1041},[1571],{"type":998,"value":1572},"squares_loop ",{"type":993,"tag":1026,"props":1574,"children":1575},{"style":1047},[1576],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1578,"children":1579},{"style":1041},[1580],{"type":998,"value":1581}," []\n",{"type":993,"tag":1026,"props":1583,"children":1584},{"class":1028,"line":36},[1585,1590,1594,1598,1603,1607,1611,1615,1619],{"type":993,"tag":1026,"props":1586,"children":1587},{"style":1047},[1588],{"type":998,"value":1589},"for",{"type":993,"tag":1026,"props":1591,"children":1592},{"style":1041},[1593],{"type":998,"value":1200},{"type":993,"tag":1026,"props":1595,"children":1596},{"style":1047},[1597],{"type":998,"value":1205},{"type":993,"tag":1026,"props":1599,"children":1600},{"style":1058},[1601],{"type":998,"value":1602}," range",{"type":993,"tag":1026,"props":1604,"children":1605},{"style":1041},[1606],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1608,"children":1609},{"style":1058},[1610],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1612,"children":1613},{"style":1041},[1614],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1616,"children":1617},{"style":1058},[1618],{"type":998,"value":1107},{"type":993,"tag":1026,"props":1620,"children":1621},{"style":1041},[1622],{"type":998,"value":1623},"):\n",{"type":993,"tag":1026,"props":1625,"children":1626},{"class":1028,"line":45},[1627,1632,1636,1640],{"type":993,"tag":1026,"props":1628,"children":1629},{"style":1041},[1630],{"type":998,"value":1631},"    squares_loop.append(x",{"type":993,"tag":1026,"props":1633,"children":1634},{"style":1047},[1635],{"type":998,"value":1186},{"type":993,"tag":1026,"props":1637,"children":1638},{"style":1058},[1639],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1641,"children":1642},{"style":1041},[1643],{"type":998,"value":1644},")\n",{"type":993,"tag":1026,"props":1646,"children":1647},{"class":1028,"line":54},[1648,1652,1656,1661],{"type":993,"tag":1026,"props":1649,"children":1650},{"style":1058},[1651],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1653,"children":1654},{"style":1041},[1655],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1657,"children":1658},{"style":1226},[1659],{"type":998,"value":1660},"\"Squares (loop):\"",{"type":993,"tag":1026,"props":1662,"children":1663},{"style":1041},[1664],{"type":998,"value":1665},", squares_loop)\n",{"type":993,"tag":1026,"props":1667,"children":1668},{"class":1028,"line":63},[1669],{"type":993,"tag":1026,"props":1670,"children":1671},{"emptyLinePlaceholder":13},[1672],{"type":998,"value":1156},{"type":993,"tag":1026,"props":1674,"children":1675},{"class":1028,"line":72},[1676],{"type":993,"tag":1026,"props":1677,"children":1678},{"style":1032},[1679],{"type":998,"value":1680},"# List comprehension way\n",{"type":993,"tag":1026,"props":1682,"children":1683},{"class":1028,"line":81},[1684,1689,1693,1697,1701,1705,1709,1713,1717,1721,1725,1729,1733,1737],{"type":993,"tag":1026,"props":1685,"children":1686},{"style":1041},[1687],{"type":998,"value":1688},"squares_comp ",{"type":993,"tag":1026,"props":1690,"children":1691},{"style":1047},[1692],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1694,"children":1695},{"style":1041},[1696],{"type":998,"value":1181},{"type":993,"tag":1026,"props":1698,"children":1699},{"style":1047},[1700],{"type":998,"value":1186},{"type":993,"tag":1026,"props":1702,"children":1703},{"style":1058},[1704],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1706,"children":1707},{"style":1047},[1708],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1710,"children":1711},{"style":1041},[1712],{"type":998,"value":1200},{"type":993,"tag":1026,"props":1714,"children":1715},{"style":1047},[1716],{"type":998,"value":1205},{"type":993,"tag":1026,"props":1718,"children":1719},{"style":1058},[1720],{"type":998,"value":1602},{"type":993,"tag":1026,"props":1722,"children":1723},{"style":1041},[1724],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1726,"children":1727},{"style":1058},[1728],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1730,"children":1731},{"style":1041},[1732],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1734,"children":1735},{"style":1058},[1736],{"type":998,"value":1107},{"type":993,"tag":1026,"props":1738,"children":1739},{"style":1041},[1740],{"type":998,"value":1741},")]\n",{"type":993,"tag":1026,"props":1743,"children":1744},{"class":1028,"line":91},[1745,1749,1753,1758],{"type":993,"tag":1026,"props":1746,"children":1747},{"style":1058},[1748],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1750,"children":1751},{"style":1041},[1752],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1754,"children":1755},{"style":1226},[1756],{"type":998,"value":1757},"\"Squares (comprehension):\"",{"type":993,"tag":1026,"props":1759,"children":1760},{"style":1041},[1761],{"type":998,"value":1762},", squares_comp)\n",{"type":993,"tag":1541,"props":1764,"children":1766},{"id":1765},"transforming-existing-lists",[1767],{"type":998,"value":1768},"Transforming Existing Lists",{"type":993,"tag":1012,"props":1770,"children":1771},{},[1772],{"type":993,"tag":1016,"props":1773,"children":1775},{"className":1018,"code":1774,"language":6,"meta":8,"style":8},"# Transform existing list\nfruits = [\"apple\", \"banana\", \"cherry\"]\nuppercase_fruits = [fruit.upper() for fruit in fruits]\nprint(\"Uppercase fruits:\", uppercase_fruits)\n",[1776],{"type":993,"tag":1022,"props":1777,"children":1778},{"__ignoreMap":8},[1779,1787,1830,1865],{"type":993,"tag":1026,"props":1780,"children":1781},{"class":1028,"line":12},[1782],{"type":993,"tag":1026,"props":1783,"children":1784},{"style":1032},[1785],{"type":998,"value":1786},"# Transform existing list\n",{"type":993,"tag":1026,"props":1788,"children":1789},{"class":1028,"line":27},[1790,1795,1799,1803,1808,1812,1817,1821,1826],{"type":993,"tag":1026,"props":1791,"children":1792},{"style":1041},[1793],{"type":998,"value":1794},"fruits ",{"type":993,"tag":1026,"props":1796,"children":1797},{"style":1047},[1798],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1800,"children":1801},{"style":1041},[1802],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1804,"children":1805},{"style":1226},[1806],{"type":998,"value":1807},"\"apple\"",{"type":993,"tag":1026,"props":1809,"children":1810},{"style":1041},[1811],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1813,"children":1814},{"style":1226},[1815],{"type":998,"value":1816},"\"banana\"",{"type":993,"tag":1026,"props":1818,"children":1819},{"style":1041},[1820],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1822,"children":1823},{"style":1226},[1824],{"type":998,"value":1825},"\"cherry\"",{"type":993,"tag":1026,"props":1827,"children":1828},{"style":1041},[1829],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1831,"children":1832},{"class":1028,"line":36},[1833,1838,1842,1847,1851,1856,1860],{"type":993,"tag":1026,"props":1834,"children":1835},{"style":1041},[1836],{"type":998,"value":1837},"uppercase_fruits ",{"type":993,"tag":1026,"props":1839,"children":1840},{"style":1047},[1841],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1843,"children":1844},{"style":1041},[1845],{"type":998,"value":1846}," [fruit.upper() ",{"type":993,"tag":1026,"props":1848,"children":1849},{"style":1047},[1850],{"type":998,"value":1589},{"type":993,"tag":1026,"props":1852,"children":1853},{"style":1041},[1854],{"type":998,"value":1855}," fruit ",{"type":993,"tag":1026,"props":1857,"children":1858},{"style":1047},[1859],{"type":998,"value":1205},{"type":993,"tag":1026,"props":1861,"children":1862},{"style":1041},[1863],{"type":998,"value":1864}," fruits]\n",{"type":993,"tag":1026,"props":1866,"children":1867},{"class":1028,"line":45},[1868,1872,1876,1881],{"type":993,"tag":1026,"props":1869,"children":1870},{"style":1058},[1871],{"type":998,"value":1218},{"type":993,"tag":1026,"props":1873,"children":1874},{"style":1041},[1875],{"type":998,"value":1223},{"type":993,"tag":1026,"props":1877,"children":1878},{"style":1226},[1879],{"type":998,"value":1880},"\"Uppercase fruits:\"",{"type":993,"tag":1026,"props":1882,"children":1883},{"style":1041},[1884],{"type":998,"value":1885},", uppercase_fruits)\n",{"type":993,"tag":1541,"props":1887,"children":1888},{"id":757},[1889],{"type":998,"value":755},{"type":993,"tag":1012,"props":1891,"children":1892},{},[1893],{"type":993,"tag":1016,"props":1894,"children":1896},{"className":1018,"code":1895,"language":6,"meta":8,"style":8},"# Mathematical operations\nnumbers = [1, 2, 3, 4, 5]\ndoubled = [n * 2 for n in numbers]\ntripled = [n * 3 for n in numbers]\nprint(\"Doubled:\", doubled)\nprint(\"Tripled:\", tripled)\n",[1897],{"type":993,"tag":1022,"props":1898,"children":1899},{"__ignoreMap":8},[1900,1908,1963,2007,2048,2069],{"type":993,"tag":1026,"props":1901,"children":1902},{"class":1028,"line":12},[1903],{"type":993,"tag":1026,"props":1904,"children":1905},{"style":1032},[1906],{"type":998,"value":1907},"# Mathematical operations\n",{"type":993,"tag":1026,"props":1909,"children":1910},{"class":1028,"line":27},[1911,1915,1919,1923,1927,1931,1935,1939,1943,1947,1951,1955,1959],{"type":993,"tag":1026,"props":1912,"children":1913},{"style":1041},[1914],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1916,"children":1917},{"style":1047},[1918],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1920,"children":1921},{"style":1041},[1922],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1924,"children":1925},{"style":1058},[1926],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1928,"children":1929},{"style":1041},[1930],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1932,"children":1933},{"style":1058},[1934],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1936,"children":1937},{"style":1041},[1938],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1940,"children":1941},{"style":1058},[1942],{"type":998,"value":1080},{"type":993,"tag":1026,"props":1944,"children":1945},{"style":1041},[1946],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1948,"children":1949},{"style":1058},[1950],{"type":998,"value":1089},{"type":993,"tag":1026,"props":1952,"children":1953},{"style":1041},[1954],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1956,"children":1957},{"style":1058},[1958],{"type":998,"value":1098},{"type":993,"tag":1026,"props":1960,"children":1961},{"style":1041},[1962],{"type":998,"value":1148},{"type":993,"tag":1026,"props":1964,"children":1965},{"class":1028,"line":36},[1966,1971,1975,1980,1985,1990,1994,1999,2003],{"type":993,"tag":1026,"props":1967,"children":1968},{"style":1041},[1969],{"type":998,"value":1970},"doubled ",{"type":993,"tag":1026,"props":1972,"children":1973},{"style":1047},[1974],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1976,"children":1977},{"style":1041},[1978],{"type":998,"value":1979}," [n ",{"type":993,"tag":1026,"props":1981,"children":1982},{"style":1047},[1983],{"type":998,"value":1984},"*",{"type":993,"tag":1026,"props":1986,"children":1987},{"style":1058},[1988],{"type":998,"value":1989}," 2",{"type":993,"tag":1026,"props":1991,"children":1992},{"style":1047},[1993],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1995,"children":1996},{"style":1041},[1997],{"type":998,"value":1998}," n ",{"type":993,"tag":1026,"props":2000,"children":2001},{"style":1047},[2002],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2004,"children":2005},{"style":1041},[2006],{"type":998,"value":1210},{"type":993,"tag":1026,"props":2008,"children":2009},{"class":1028,"line":45},[2010,2015,2019,2023,2027,2032,2036,2040,2044],{"type":993,"tag":1026,"props":2011,"children":2012},{"style":1041},[2013],{"type":998,"value":2014},"tripled ",{"type":993,"tag":1026,"props":2016,"children":2017},{"style":1047},[2018],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2020,"children":2021},{"style":1041},[2022],{"type":998,"value":1979},{"type":993,"tag":1026,"props":2024,"children":2025},{"style":1047},[2026],{"type":998,"value":1984},{"type":993,"tag":1026,"props":2028,"children":2029},{"style":1058},[2030],{"type":998,"value":2031}," 3",{"type":993,"tag":1026,"props":2033,"children":2034},{"style":1047},[2035],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2037,"children":2038},{"style":1041},[2039],{"type":998,"value":1998},{"type":993,"tag":1026,"props":2041,"children":2042},{"style":1047},[2043],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2045,"children":2046},{"style":1041},[2047],{"type":998,"value":1210},{"type":993,"tag":1026,"props":2049,"children":2050},{"class":1028,"line":54},[2051,2055,2059,2064],{"type":993,"tag":1026,"props":2052,"children":2053},{"style":1058},[2054],{"type":998,"value":1218},{"type":993,"tag":1026,"props":2056,"children":2057},{"style":1041},[2058],{"type":998,"value":1223},{"type":993,"tag":1026,"props":2060,"children":2061},{"style":1226},[2062],{"type":998,"value":2063},"\"Doubled:\"",{"type":993,"tag":1026,"props":2065,"children":2066},{"style":1041},[2067],{"type":998,"value":2068},", doubled)\n",{"type":993,"tag":1026,"props":2070,"children":2071},{"class":1028,"line":63},[2072,2076,2080,2085],{"type":993,"tag":1026,"props":2073,"children":2074},{"style":1058},[2075],{"type":998,"value":1218},{"type":993,"tag":1026,"props":2077,"children":2078},{"style":1041},[2079],{"type":998,"value":1223},{"type":993,"tag":1026,"props":2081,"children":2082},{"style":1226},[2083],{"type":998,"value":2084},"\"Tripled:\"",{"type":993,"tag":1026,"props":2086,"children":2087},{"style":1041},[2088],{"type":998,"value":2089},", tripled)\n",{"type":993,"tag":1447,"props":2091,"children":2093},{"id":2092},"list-comprehensions-with-conditions",[2094],{"type":998,"value":2095},"🎯 List Comprehensions with Conditions",{"type":993,"tag":1001,"props":2097,"children":2098},{},[2099],{"type":998,"value":2100},"You can add conditions to list comprehensions to filter elements while creating new lists. This combines filtering and transformation in one elegant expression.",{"type":993,"tag":1459,"props":2102,"children":2106},{"emoji":2103,"title":2104,"type":2105},"🎯","Conditional List Comprehensions","success",[2107,2121,2129,2165],{"type":993,"tag":1001,"props":2108,"children":2109},{},[2110,2115,2116],{"type":993,"tag":1469,"props":2111,"children":2112},{},[2113],{"type":998,"value":2114},"Syntax:",{"type":998,"value":1475},{"type":993,"tag":1022,"props":2117,"children":2119},{"className":2118},[],[2120],{"type":998,"value":1496},{"type":993,"tag":1001,"props":2122,"children":2123},{},[2124],{"type":993,"tag":1469,"props":2125,"children":2126},{},[2127],{"type":998,"value":2128},"Filtering Capabilities:",{"type":993,"tag":1506,"props":2130,"children":2131},{},[2132,2143,2154],{"type":993,"tag":1510,"props":2133,"children":2134},{},[2135,2137],{"type":998,"value":2136},"Numeric range filtering: ",{"type":993,"tag":1022,"props":2138,"children":2140},{"className":2139},[],[2141],{"type":998,"value":2142},"if 0 \u003C x \u003C 100",{"type":993,"tag":1510,"props":2144,"children":2145},{},[2146,2148],{"type":998,"value":2147},"String validation: ",{"type":993,"tag":1022,"props":2149,"children":2151},{"className":2150},[],[2152],{"type":998,"value":2153},"if len(word) > 3",{"type":993,"tag":1510,"props":2155,"children":2156},{},[2157,2159],{"type":998,"value":2158},"Complex conditions: ",{"type":993,"tag":1022,"props":2160,"children":2162},{"className":2161},[],[2163],{"type":998,"value":2164},"if condition1 and condition2",{"type":993,"tag":1001,"props":2166,"children":2167},{},[2168,2173],{"type":993,"tag":1469,"props":2169,"children":2170},{},[2171],{"type":998,"value":2172},"Benefits:",{"type":998,"value":2174}," Combines filtering and transformation, faster than filter() + map() combinations",{"type":993,"tag":1541,"props":2176,"children":2178},{"id":2177},"basic-filtering",[2179],{"type":998,"value":2180},"Basic Filtering",{"type":993,"tag":1012,"props":2182,"children":2183},{},[2184],{"type":993,"tag":1016,"props":2185,"children":2187},{"className":1018,"code":2186,"language":6,"meta":8,"style":8},"# Filter even numbers\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nevens = [n for n in numbers if n % 2 == 0]\nprint(\"Even numbers:\", evens)\n",[2188],{"type":993,"tag":1022,"props":2189,"children":2190},{"__ignoreMap":8},[2191,2199,2294,2359],{"type":993,"tag":1026,"props":2192,"children":2193},{"class":1028,"line":12},[2194],{"type":993,"tag":1026,"props":2195,"children":2196},{"style":1032},[2197],{"type":998,"value":2198},"# Filter even numbers\n",{"type":993,"tag":1026,"props":2200,"children":2201},{"class":1028,"line":27},[2202,2206,2210,2214,2218,2222,2226,2230,2234,2238,2242,2246,2250,2254,2258,2262,2266,2270,2274,2278,2282,2286,2290],{"type":993,"tag":1026,"props":2203,"children":2204},{"style":1041},[2205],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2207,"children":2208},{"style":1047},[2209],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2211,"children":2212},{"style":1041},[2213],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2215,"children":2216},{"style":1058},[2217],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2219,"children":2220},{"style":1041},[2221],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2223,"children":2224},{"style":1058},[2225],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2227,"children":2228},{"style":1041},[2229],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2231,"children":2232},{"style":1058},[2233],{"type":998,"value":1080},{"type":993,"tag":1026,"props":2235,"children":2236},{"style":1041},[2237],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2239,"children":2240},{"style":1058},[2241],{"type":998,"value":1089},{"type":993,"tag":1026,"props":2243,"children":2244},{"style":1041},[2245],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2247,"children":2248},{"style":1058},[2249],{"type":998,"value":1098},{"type":993,"tag":1026,"props":2251,"children":2252},{"style":1041},[2253],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2255,"children":2256},{"style":1058},[2257],{"type":998,"value":1107},{"type":993,"tag":1026,"props":2259,"children":2260},{"style":1041},[2261],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2263,"children":2264},{"style":1058},[2265],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2267,"children":2268},{"style":1041},[2269],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2271,"children":2272},{"style":1058},[2273],{"type":998,"value":1125},{"type":993,"tag":1026,"props":2275,"children":2276},{"style":1041},[2277],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2279,"children":2280},{"style":1058},[2281],{"type":998,"value":1134},{"type":993,"tag":1026,"props":2283,"children":2284},{"style":1041},[2285],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2287,"children":2288},{"style":1058},[2289],{"type":998,"value":1143},{"type":993,"tag":1026,"props":2291,"children":2292},{"style":1041},[2293],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2295,"children":2296},{"class":1028,"line":36},[2297,2302,2306,2310,2314,2318,2322,2327,2332,2336,2341,2345,2350,2355],{"type":993,"tag":1026,"props":2298,"children":2299},{"style":1041},[2300],{"type":998,"value":2301},"evens ",{"type":993,"tag":1026,"props":2303,"children":2304},{"style":1047},[2305],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2307,"children":2308},{"style":1041},[2309],{"type":998,"value":1979},{"type":993,"tag":1026,"props":2311,"children":2312},{"style":1047},[2313],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2315,"children":2316},{"style":1041},[2317],{"type":998,"value":1998},{"type":993,"tag":1026,"props":2319,"children":2320},{"style":1047},[2321],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2323,"children":2324},{"style":1041},[2325],{"type":998,"value":2326}," numbers ",{"type":993,"tag":1026,"props":2328,"children":2329},{"style":1047},[2330],{"type":998,"value":2331},"if",{"type":993,"tag":1026,"props":2333,"children":2334},{"style":1041},[2335],{"type":998,"value":1998},{"type":993,"tag":1026,"props":2337,"children":2338},{"style":1047},[2339],{"type":998,"value":2340},"%",{"type":993,"tag":1026,"props":2342,"children":2343},{"style":1058},[2344],{"type":998,"value":1989},{"type":993,"tag":1026,"props":2346,"children":2347},{"style":1047},[2348],{"type":998,"value":2349}," ==",{"type":993,"tag":1026,"props":2351,"children":2352},{"style":1058},[2353],{"type":998,"value":2354}," 0",{"type":993,"tag":1026,"props":2356,"children":2357},{"style":1041},[2358],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2360,"children":2361},{"class":1028,"line":45},[2362,2366,2370,2375],{"type":993,"tag":1026,"props":2363,"children":2364},{"style":1058},[2365],{"type":998,"value":1218},{"type":993,"tag":1026,"props":2367,"children":2368},{"style":1041},[2369],{"type":998,"value":1223},{"type":993,"tag":1026,"props":2371,"children":2372},{"style":1226},[2373],{"type":998,"value":2374},"\"Even numbers:\"",{"type":993,"tag":1026,"props":2376,"children":2377},{"style":1041},[2378],{"type":998,"value":2379},", evens)\n",{"type":993,"tag":1541,"props":2381,"children":2383},{"id":2382},"filter-and-transform",[2384],{"type":998,"value":2385},"Filter and Transform",{"type":993,"tag":1012,"props":2387,"children":2388},{},[2389],{"type":993,"tag":1016,"props":2390,"children":2392},{"className":1018,"code":2391,"language":6,"meta":8,"style":8},"# Filter and transform\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\neven_squares = [n**2 for n in numbers if n % 2 == 0]\nprint(\"Squares of even numbers:\", even_squares)\n",[2393],{"type":993,"tag":1022,"props":2394,"children":2395},{"__ignoreMap":8},[2396,2404,2499,2568],{"type":993,"tag":1026,"props":2397,"children":2398},{"class":1028,"line":12},[2399],{"type":993,"tag":1026,"props":2400,"children":2401},{"style":1032},[2402],{"type":998,"value":2403},"# Filter and transform\n",{"type":993,"tag":1026,"props":2405,"children":2406},{"class":1028,"line":27},[2407,2411,2415,2419,2423,2427,2431,2435,2439,2443,2447,2451,2455,2459,2463,2467,2471,2475,2479,2483,2487,2491,2495],{"type":993,"tag":1026,"props":2408,"children":2409},{"style":1041},[2410],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2412,"children":2413},{"style":1047},[2414],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2416,"children":2417},{"style":1041},[2418],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2420,"children":2421},{"style":1058},[2422],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2424,"children":2425},{"style":1041},[2426],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2428,"children":2429},{"style":1058},[2430],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2432,"children":2433},{"style":1041},[2434],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2436,"children":2437},{"style":1058},[2438],{"type":998,"value":1080},{"type":993,"tag":1026,"props":2440,"children":2441},{"style":1041},[2442],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2444,"children":2445},{"style":1058},[2446],{"type":998,"value":1089},{"type":993,"tag":1026,"props":2448,"children":2449},{"style":1041},[2450],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2452,"children":2453},{"style":1058},[2454],{"type":998,"value":1098},{"type":993,"tag":1026,"props":2456,"children":2457},{"style":1041},[2458],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2460,"children":2461},{"style":1058},[2462],{"type":998,"value":1107},{"type":993,"tag":1026,"props":2464,"children":2465},{"style":1041},[2466],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2468,"children":2469},{"style":1058},[2470],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2472,"children":2473},{"style":1041},[2474],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2476,"children":2477},{"style":1058},[2478],{"type":998,"value":1125},{"type":993,"tag":1026,"props":2480,"children":2481},{"style":1041},[2482],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2484,"children":2485},{"style":1058},[2486],{"type":998,"value":1134},{"type":993,"tag":1026,"props":2488,"children":2489},{"style":1041},[2490],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2492,"children":2493},{"style":1058},[2494],{"type":998,"value":1143},{"type":993,"tag":1026,"props":2496,"children":2497},{"style":1041},[2498],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2500,"children":2501},{"class":1028,"line":36},[2502,2507,2511,2516,2520,2524,2528,2532,2536,2540,2544,2548,2552,2556,2560,2564],{"type":993,"tag":1026,"props":2503,"children":2504},{"style":1041},[2505],{"type":998,"value":2506},"even_squares ",{"type":993,"tag":1026,"props":2508,"children":2509},{"style":1047},[2510],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2512,"children":2513},{"style":1041},[2514],{"type":998,"value":2515}," [n",{"type":993,"tag":1026,"props":2517,"children":2518},{"style":1047},[2519],{"type":998,"value":1186},{"type":993,"tag":1026,"props":2521,"children":2522},{"style":1058},[2523],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2525,"children":2526},{"style":1047},[2527],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2529,"children":2530},{"style":1041},[2531],{"type":998,"value":1998},{"type":993,"tag":1026,"props":2533,"children":2534},{"style":1047},[2535],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2537,"children":2538},{"style":1041},[2539],{"type":998,"value":2326},{"type":993,"tag":1026,"props":2541,"children":2542},{"style":1047},[2543],{"type":998,"value":2331},{"type":993,"tag":1026,"props":2545,"children":2546},{"style":1041},[2547],{"type":998,"value":1998},{"type":993,"tag":1026,"props":2549,"children":2550},{"style":1047},[2551],{"type":998,"value":2340},{"type":993,"tag":1026,"props":2553,"children":2554},{"style":1058},[2555],{"type":998,"value":1989},{"type":993,"tag":1026,"props":2557,"children":2558},{"style":1047},[2559],{"type":998,"value":2349},{"type":993,"tag":1026,"props":2561,"children":2562},{"style":1058},[2563],{"type":998,"value":2354},{"type":993,"tag":1026,"props":2565,"children":2566},{"style":1041},[2567],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2569,"children":2570},{"class":1028,"line":45},[2571,2575,2579,2584],{"type":993,"tag":1026,"props":2572,"children":2573},{"style":1058},[2574],{"type":998,"value":1218},{"type":993,"tag":1026,"props":2576,"children":2577},{"style":1041},[2578],{"type":998,"value":1223},{"type":993,"tag":1026,"props":2580,"children":2581},{"style":1226},[2582],{"type":998,"value":2583},"\"Squares of even numbers:\"",{"type":993,"tag":1026,"props":2585,"children":2586},{"style":1041},[2587],{"type":998,"value":2588},", even_squares)\n",{"type":993,"tag":1541,"props":2590,"children":2592},{"id":2591},"string-filtering",[2593],{"type":998,"value":2594},"String Filtering",{"type":993,"tag":1012,"props":2596,"children":2597},{},[2598],{"type":993,"tag":1016,"props":2599,"children":2601},{"className":1018,"code":2600,"language":6,"meta":8,"style":8},"# Filter strings by length\nwords = [\"cat\", \"elephant\", \"dog\", \"hippopotamus\", \"bird\"]\nlong_words = [word for word in words if len(word) > 3]\nprint(\"Long words:\", long_words)\n",[2602],{"type":993,"tag":1022,"props":2603,"children":2604},{"__ignoreMap":8},[2605,2613,2674,2736],{"type":993,"tag":1026,"props":2606,"children":2607},{"class":1028,"line":12},[2608],{"type":993,"tag":1026,"props":2609,"children":2610},{"style":1032},[2611],{"type":998,"value":2612},"# Filter strings by length\n",{"type":993,"tag":1026,"props":2614,"children":2615},{"class":1028,"line":27},[2616,2621,2625,2629,2634,2638,2643,2647,2652,2656,2661,2665,2670],{"type":993,"tag":1026,"props":2617,"children":2618},{"style":1041},[2619],{"type":998,"value":2620},"words ",{"type":993,"tag":1026,"props":2622,"children":2623},{"style":1047},[2624],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2626,"children":2627},{"style":1041},[2628],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2630,"children":2631},{"style":1226},[2632],{"type":998,"value":2633},"\"cat\"",{"type":993,"tag":1026,"props":2635,"children":2636},{"style":1041},[2637],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2639,"children":2640},{"style":1226},[2641],{"type":998,"value":2642},"\"elephant\"",{"type":993,"tag":1026,"props":2644,"children":2645},{"style":1041},[2646],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2648,"children":2649},{"style":1226},[2650],{"type":998,"value":2651},"\"dog\"",{"type":993,"tag":1026,"props":2653,"children":2654},{"style":1041},[2655],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2657,"children":2658},{"style":1226},[2659],{"type":998,"value":2660},"\"hippopotamus\"",{"type":993,"tag":1026,"props":2662,"children":2663},{"style":1041},[2664],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2666,"children":2667},{"style":1226},[2668],{"type":998,"value":2669},"\"bird\"",{"type":993,"tag":1026,"props":2671,"children":2672},{"style":1041},[2673],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2675,"children":2676},{"class":1028,"line":36},[2677,2682,2686,2691,2695,2700,2704,2709,2713,2718,2723,2728,2732],{"type":993,"tag":1026,"props":2678,"children":2679},{"style":1041},[2680],{"type":998,"value":2681},"long_words ",{"type":993,"tag":1026,"props":2683,"children":2684},{"style":1047},[2685],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2687,"children":2688},{"style":1041},[2689],{"type":998,"value":2690}," [word ",{"type":993,"tag":1026,"props":2692,"children":2693},{"style":1047},[2694],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2696,"children":2697},{"style":1041},[2698],{"type":998,"value":2699}," word ",{"type":993,"tag":1026,"props":2701,"children":2702},{"style":1047},[2703],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2705,"children":2706},{"style":1041},[2707],{"type":998,"value":2708}," words ",{"type":993,"tag":1026,"props":2710,"children":2711},{"style":1047},[2712],{"type":998,"value":2331},{"type":993,"tag":1026,"props":2714,"children":2715},{"style":1058},[2716],{"type":998,"value":2717}," len",{"type":993,"tag":1026,"props":2719,"children":2720},{"style":1041},[2721],{"type":998,"value":2722},"(word) ",{"type":993,"tag":1026,"props":2724,"children":2725},{"style":1047},[2726],{"type":998,"value":2727},">",{"type":993,"tag":1026,"props":2729,"children":2730},{"style":1058},[2731],{"type":998,"value":2031},{"type":993,"tag":1026,"props":2733,"children":2734},{"style":1041},[2735],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2737,"children":2738},{"class":1028,"line":45},[2739,2743,2747,2752],{"type":993,"tag":1026,"props":2740,"children":2741},{"style":1058},[2742],{"type":998,"value":1218},{"type":993,"tag":1026,"props":2744,"children":2745},{"style":1041},[2746],{"type":998,"value":1223},{"type":993,"tag":1026,"props":2748,"children":2749},{"style":1226},[2750],{"type":998,"value":2751},"\"Long words:\"",{"type":993,"tag":1026,"props":2753,"children":2754},{"style":1041},[2755],{"type":998,"value":2756},", long_words)\n",{"type":993,"tag":1541,"props":2758,"children":2760},{"id":2759},"complex-conditions",[2761],{"type":998,"value":2762},"Complex Conditions",{"type":993,"tag":1012,"props":2764,"children":2765},{},[2766],{"type":993,"tag":1016,"props":2767,"children":2769},{"className":1018,"code":2768,"language":6,"meta":8,"style":8},"# Complex conditions\ntemperatures = [68, 72, 85, 91, 78, 82, 95, 73]\ncomfortable_temps = [temp for temp in temperatures if 70 \u003C= temp \u003C= 80]\nprint(\"Comfortable temperatures:\", comfortable_temps)\n",[2770],{"type":993,"tag":1022,"props":2771,"children":2772},{"__ignoreMap":8},[2773,2781,2869,2936],{"type":993,"tag":1026,"props":2774,"children":2775},{"class":1028,"line":12},[2776],{"type":993,"tag":1026,"props":2777,"children":2778},{"style":1032},[2779],{"type":998,"value":2780},"# Complex conditions\n",{"type":993,"tag":1026,"props":2782,"children":2783},{"class":1028,"line":27},[2784,2789,2793,2797,2802,2806,2811,2815,2820,2824,2829,2833,2838,2842,2847,2851,2856,2860,2865],{"type":993,"tag":1026,"props":2785,"children":2786},{"style":1041},[2787],{"type":998,"value":2788},"temperatures ",{"type":993,"tag":1026,"props":2790,"children":2791},{"style":1047},[2792],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2794,"children":2795},{"style":1041},[2796],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2798,"children":2799},{"style":1058},[2800],{"type":998,"value":2801},"68",{"type":993,"tag":1026,"props":2803,"children":2804},{"style":1041},[2805],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2807,"children":2808},{"style":1058},[2809],{"type":998,"value":2810},"72",{"type":993,"tag":1026,"props":2812,"children":2813},{"style":1041},[2814],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2816,"children":2817},{"style":1058},[2818],{"type":998,"value":2819},"85",{"type":993,"tag":1026,"props":2821,"children":2822},{"style":1041},[2823],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2825,"children":2826},{"style":1058},[2827],{"type":998,"value":2828},"91",{"type":993,"tag":1026,"props":2830,"children":2831},{"style":1041},[2832],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2834,"children":2835},{"style":1058},[2836],{"type":998,"value":2837},"78",{"type":993,"tag":1026,"props":2839,"children":2840},{"style":1041},[2841],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2843,"children":2844},{"style":1058},[2845],{"type":998,"value":2846},"82",{"type":993,"tag":1026,"props":2848,"children":2849},{"style":1041},[2850],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2852,"children":2853},{"style":1058},[2854],{"type":998,"value":2855},"95",{"type":993,"tag":1026,"props":2857,"children":2858},{"style":1041},[2859],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2861,"children":2862},{"style":1058},[2863],{"type":998,"value":2864},"73",{"type":993,"tag":1026,"props":2866,"children":2867},{"style":1041},[2868],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2870,"children":2871},{"class":1028,"line":36},[2872,2877,2881,2886,2890,2895,2899,2904,2908,2913,2918,2922,2927,2932],{"type":993,"tag":1026,"props":2873,"children":2874},{"style":1041},[2875],{"type":998,"value":2876},"comfortable_temps ",{"type":993,"tag":1026,"props":2878,"children":2879},{"style":1047},[2880],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2882,"children":2883},{"style":1041},[2884],{"type":998,"value":2885}," [temp ",{"type":993,"tag":1026,"props":2887,"children":2888},{"style":1047},[2889],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2891,"children":2892},{"style":1041},[2893],{"type":998,"value":2894}," temp ",{"type":993,"tag":1026,"props":2896,"children":2897},{"style":1047},[2898],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2900,"children":2901},{"style":1041},[2902],{"type":998,"value":2903}," temperatures ",{"type":993,"tag":1026,"props":2905,"children":2906},{"style":1047},[2907],{"type":998,"value":2331},{"type":993,"tag":1026,"props":2909,"children":2910},{"style":1058},[2911],{"type":998,"value":2912}," 70",{"type":993,"tag":1026,"props":2914,"children":2915},{"style":1047},[2916],{"type":998,"value":2917}," \u003C=",{"type":993,"tag":1026,"props":2919,"children":2920},{"style":1041},[2921],{"type":998,"value":2894},{"type":993,"tag":1026,"props":2923,"children":2924},{"style":1047},[2925],{"type":998,"value":2926},"\u003C=",{"type":993,"tag":1026,"props":2928,"children":2929},{"style":1058},[2930],{"type":998,"value":2931}," 80",{"type":993,"tag":1026,"props":2933,"children":2934},{"style":1041},[2935],{"type":998,"value":1148},{"type":993,"tag":1026,"props":2937,"children":2938},{"class":1028,"line":45},[2939,2943,2947,2952],{"type":993,"tag":1026,"props":2940,"children":2941},{"style":1058},[2942],{"type":998,"value":1218},{"type":993,"tag":1026,"props":2944,"children":2945},{"style":1041},[2946],{"type":998,"value":1223},{"type":993,"tag":1026,"props":2948,"children":2949},{"style":1226},[2950],{"type":998,"value":2951},"\"Comfortable temperatures:\"",{"type":993,"tag":1026,"props":2953,"children":2954},{"style":1041},[2955],{"type":998,"value":2956},", comfortable_temps)\n",{"type":993,"tag":2958,"props":2959,"children":2961},"content-exercise",{":widget-view":2960,"category":6,"id":337},"true",[],{"type":993,"tag":1447,"props":2963,"children":2965},{"id":2964},"advanced-slicing-techniques",[2966],{"type":998,"value":2967},"🔧 Advanced Slicing Techniques",{"type":993,"tag":1001,"props":2969,"children":2970},{},[2971],{"type":998,"value":2972},"List slicing is more powerful than just getting parts of lists. You can use step values, negative indices, and other tricks to manipulate lists efficiently.",{"type":993,"tag":1459,"props":2974,"children":2978},{"emoji":2975,"title":2976,"type":2977},"🔧","Advanced Slicing Syntax","warning",[2979,2994,3002,3049],{"type":993,"tag":1001,"props":2980,"children":2981},{},[2982,2987,2988],{"type":993,"tag":1469,"props":2983,"children":2984},{},[2985],{"type":998,"value":2986},"Full Syntax:",{"type":998,"value":1475},{"type":993,"tag":1022,"props":2989,"children":2991},{"className":2990},[],[2992],{"type":998,"value":2993},"list[start:stop:step]",{"type":993,"tag":1001,"props":2995,"children":2996},{},[2997],{"type":993,"tag":1469,"props":2998,"children":2999},{},[3000],{"type":998,"value":3001},"Advanced Patterns:",{"type":993,"tag":1506,"props":3003,"children":3004},{},[3005,3016,3027,3038],{"type":993,"tag":1510,"props":3006,"children":3007},{},[3008,3014],{"type":993,"tag":1022,"props":3009,"children":3011},{"className":3010},[],[3012],{"type":998,"value":3013},"list[::-1]",{"type":998,"value":3015},": Reverse entire list",{"type":993,"tag":1510,"props":3017,"children":3018},{},[3019,3025],{"type":993,"tag":1022,"props":3020,"children":3022},{"className":3021},[],[3023],{"type":998,"value":3024},"list[::2]",{"type":998,"value":3026},": Every second element",{"type":993,"tag":1510,"props":3028,"children":3029},{},[3030,3036],{"type":993,"tag":1022,"props":3031,"children":3033},{"className":3032},[],[3034],{"type":998,"value":3035},"list[-3:]",{"type":998,"value":3037},": Last 3 elements",{"type":993,"tag":1510,"props":3039,"children":3040},{},[3041,3047],{"type":993,"tag":1022,"props":3042,"children":3044},{"className":3043},[],[3045],{"type":998,"value":3046},"list[:-3]",{"type":998,"value":3048},": All except last 3 elements",{"type":993,"tag":1001,"props":3050,"children":3051},{},[3052,3057],{"type":993,"tag":1469,"props":3053,"children":3054},{},[3055],{"type":998,"value":3056},"Memory Efficiency:",{"type":998,"value":3058}," Slicing creates new list objects",{"type":993,"tag":1541,"props":3060,"children":3062},{"id":3061},"reversing-lists",[3063],{"type":998,"value":3064},"Reversing Lists",{"type":993,"tag":1012,"props":3066,"children":3067},{},[3068],{"type":993,"tag":1016,"props":3069,"children":3071},{"className":1018,"code":3070,"language":6,"meta":8,"style":8},"# Reverse a list using slicing\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nreversed_numbers = numbers[::-1]\nprint(\"Original:\", numbers)\nprint(\"Reversed:\", reversed_numbers)\n",[3072],{"type":993,"tag":1022,"props":3073,"children":3074},{"__ignoreMap":8},[3075,3083,3178,3208,3229],{"type":993,"tag":1026,"props":3076,"children":3077},{"class":1028,"line":12},[3078],{"type":993,"tag":1026,"props":3079,"children":3080},{"style":1032},[3081],{"type":998,"value":3082},"# Reverse a list using slicing\n",{"type":993,"tag":1026,"props":3084,"children":3085},{"class":1028,"line":27},[3086,3090,3094,3098,3102,3106,3110,3114,3118,3122,3126,3130,3134,3138,3142,3146,3150,3154,3158,3162,3166,3170,3174],{"type":993,"tag":1026,"props":3087,"children":3088},{"style":1041},[3089],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3091,"children":3092},{"style":1047},[3093],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3095,"children":3096},{"style":1041},[3097],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3099,"children":3100},{"style":1058},[3101],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3103,"children":3104},{"style":1041},[3105],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3107,"children":3108},{"style":1058},[3109],{"type":998,"value":1071},{"type":993,"tag":1026,"props":3111,"children":3112},{"style":1041},[3113],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3115,"children":3116},{"style":1058},[3117],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3119,"children":3120},{"style":1041},[3121],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3123,"children":3124},{"style":1058},[3125],{"type":998,"value":1089},{"type":993,"tag":1026,"props":3127,"children":3128},{"style":1041},[3129],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3131,"children":3132},{"style":1058},[3133],{"type":998,"value":1098},{"type":993,"tag":1026,"props":3135,"children":3136},{"style":1041},[3137],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3139,"children":3140},{"style":1058},[3141],{"type":998,"value":1107},{"type":993,"tag":1026,"props":3143,"children":3144},{"style":1041},[3145],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3147,"children":3148},{"style":1058},[3149],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3151,"children":3152},{"style":1041},[3153],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3155,"children":3156},{"style":1058},[3157],{"type":998,"value":1125},{"type":993,"tag":1026,"props":3159,"children":3160},{"style":1041},[3161],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3163,"children":3164},{"style":1058},[3165],{"type":998,"value":1134},{"type":993,"tag":1026,"props":3167,"children":3168},{"style":1041},[3169],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3171,"children":3172},{"style":1058},[3173],{"type":998,"value":1143},{"type":993,"tag":1026,"props":3175,"children":3176},{"style":1041},[3177],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3179,"children":3180},{"class":1028,"line":36},[3181,3186,3190,3195,3200,3204],{"type":993,"tag":1026,"props":3182,"children":3183},{"style":1041},[3184],{"type":998,"value":3185},"reversed_numbers ",{"type":993,"tag":1026,"props":3187,"children":3188},{"style":1047},[3189],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3191,"children":3192},{"style":1041},[3193],{"type":998,"value":3194}," numbers[::",{"type":993,"tag":1026,"props":3196,"children":3197},{"style":1047},[3198],{"type":998,"value":3199},"-",{"type":993,"tag":1026,"props":3201,"children":3202},{"style":1058},[3203],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3205,"children":3206},{"style":1041},[3207],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3209,"children":3210},{"class":1028,"line":45},[3211,3215,3219,3224],{"type":993,"tag":1026,"props":3212,"children":3213},{"style":1058},[3214],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3216,"children":3217},{"style":1041},[3218],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3220,"children":3221},{"style":1226},[3222],{"type":998,"value":3223},"\"Original:\"",{"type":993,"tag":1026,"props":3225,"children":3226},{"style":1041},[3227],{"type":998,"value":3228},", numbers)\n",{"type":993,"tag":1026,"props":3230,"children":3231},{"class":1028,"line":54},[3232,3236,3240,3245],{"type":993,"tag":1026,"props":3233,"children":3234},{"style":1058},[3235],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3237,"children":3238},{"style":1041},[3239],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3241,"children":3242},{"style":1226},[3243],{"type":998,"value":3244},"\"Reversed:\"",{"type":993,"tag":1026,"props":3246,"children":3247},{"style":1041},[3248],{"type":998,"value":3249},", reversed_numbers)\n",{"type":993,"tag":1541,"props":3251,"children":3253},{"id":3252},"extracting-every-nth-element",[3254],{"type":998,"value":3255},"Extracting Every Nth Element",{"type":993,"tag":1012,"props":3257,"children":3258},{},[3259],{"type":993,"tag":1016,"props":3260,"children":3262},{"className":1018,"code":3261,"language":6,"meta":8,"style":8},"# Get every other element\ndata = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\nevery_other = data[::2]\nprint(\"Every other element:\", every_other)\n\n# 1 Get every third element starting from index\nevery_third_from_1 = data[1::3]\nprint(\"Every third from index 1:\", every_third_from_1)\n",[3263],{"type":993,"tag":1022,"props":3264,"children":3265},{"__ignoreMap":8},[3266,3274,3379,3404,3425,3432,3440,3474],{"type":993,"tag":1026,"props":3267,"children":3268},{"class":1028,"line":12},[3269],{"type":993,"tag":1026,"props":3270,"children":3271},{"style":1032},[3272],{"type":998,"value":3273},"# Get every other element\n",{"type":993,"tag":1026,"props":3275,"children":3276},{"class":1028,"line":27},[3277,3282,3286,3290,3294,3298,3303,3307,3312,3316,3321,3325,3330,3334,3339,3343,3348,3352,3357,3361,3366,3370,3375],{"type":993,"tag":1026,"props":3278,"children":3279},{"style":1041},[3280],{"type":998,"value":3281},"data ",{"type":993,"tag":1026,"props":3283,"children":3284},{"style":1047},[3285],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3287,"children":3288},{"style":1041},[3289],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3291,"children":3292},{"style":1058},[3293],{"type":998,"value":1143},{"type":993,"tag":1026,"props":3295,"children":3296},{"style":1041},[3297],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3299,"children":3300},{"style":1058},[3301],{"type":998,"value":3302},"20",{"type":993,"tag":1026,"props":3304,"children":3305},{"style":1041},[3306],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3308,"children":3309},{"style":1058},[3310],{"type":998,"value":3311},"30",{"type":993,"tag":1026,"props":3313,"children":3314},{"style":1041},[3315],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3317,"children":3318},{"style":1058},[3319],{"type":998,"value":3320},"40",{"type":993,"tag":1026,"props":3322,"children":3323},{"style":1041},[3324],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3326,"children":3327},{"style":1058},[3328],{"type":998,"value":3329},"50",{"type":993,"tag":1026,"props":3331,"children":3332},{"style":1041},[3333],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3335,"children":3336},{"style":1058},[3337],{"type":998,"value":3338},"60",{"type":993,"tag":1026,"props":3340,"children":3341},{"style":1041},[3342],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3344,"children":3345},{"style":1058},[3346],{"type":998,"value":3347},"70",{"type":993,"tag":1026,"props":3349,"children":3350},{"style":1041},[3351],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3353,"children":3354},{"style":1058},[3355],{"type":998,"value":3356},"80",{"type":993,"tag":1026,"props":3358,"children":3359},{"style":1041},[3360],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3362,"children":3363},{"style":1058},[3364],{"type":998,"value":3365},"90",{"type":993,"tag":1026,"props":3367,"children":3368},{"style":1041},[3369],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3371,"children":3372},{"style":1058},[3373],{"type":998,"value":3374},"100",{"type":993,"tag":1026,"props":3376,"children":3377},{"style":1041},[3378],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3380,"children":3381},{"class":1028,"line":36},[3382,3387,3391,3396,3400],{"type":993,"tag":1026,"props":3383,"children":3384},{"style":1041},[3385],{"type":998,"value":3386},"every_other ",{"type":993,"tag":1026,"props":3388,"children":3389},{"style":1047},[3390],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3392,"children":3393},{"style":1041},[3394],{"type":998,"value":3395}," data[::",{"type":993,"tag":1026,"props":3397,"children":3398},{"style":1058},[3399],{"type":998,"value":1071},{"type":993,"tag":1026,"props":3401,"children":3402},{"style":1041},[3403],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3405,"children":3406},{"class":1028,"line":45},[3407,3411,3415,3420],{"type":993,"tag":1026,"props":3408,"children":3409},{"style":1058},[3410],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3412,"children":3413},{"style":1041},[3414],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3416,"children":3417},{"style":1226},[3418],{"type":998,"value":3419},"\"Every other element:\"",{"type":993,"tag":1026,"props":3421,"children":3422},{"style":1041},[3423],{"type":998,"value":3424},", every_other)\n",{"type":993,"tag":1026,"props":3426,"children":3427},{"class":1028,"line":54},[3428],{"type":993,"tag":1026,"props":3429,"children":3430},{"emptyLinePlaceholder":13},[3431],{"type":998,"value":1156},{"type":993,"tag":1026,"props":3433,"children":3434},{"class":1028,"line":63},[3435],{"type":993,"tag":1026,"props":3436,"children":3437},{"style":1032},[3438],{"type":998,"value":3439},"# 1 Get every third element starting from index\n",{"type":993,"tag":1026,"props":3441,"children":3442},{"class":1028,"line":72},[3443,3448,3452,3457,3461,3466,3470],{"type":993,"tag":1026,"props":3444,"children":3445},{"style":1041},[3446],{"type":998,"value":3447},"every_third_from_1 ",{"type":993,"tag":1026,"props":3449,"children":3450},{"style":1047},[3451],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3453,"children":3454},{"style":1041},[3455],{"type":998,"value":3456}," data[",{"type":993,"tag":1026,"props":3458,"children":3459},{"style":1058},[3460],{"type":998,"value":1061},{"type":993,"tag":1026,"props":3462,"children":3463},{"style":1041},[3464],{"type":998,"value":3465},"::",{"type":993,"tag":1026,"props":3467,"children":3468},{"style":1058},[3469],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3471,"children":3472},{"style":1041},[3473],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3475,"children":3476},{"class":1028,"line":81},[3477,3481,3485,3490],{"type":993,"tag":1026,"props":3478,"children":3479},{"style":1058},[3480],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3482,"children":3483},{"style":1041},[3484],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3486,"children":3487},{"style":1226},[3488],{"type":998,"value":3489},"\"Every third from index 1:\"",{"type":993,"tag":1026,"props":3491,"children":3492},{"style":1041},[3493],{"type":998,"value":3494},", every_third_from_1)\n",{"type":993,"tag":1541,"props":3496,"children":3498},{"id":3497},"getting-first-and-last-elements",[3499],{"type":998,"value":3500},"Getting First and Last Elements",{"type":993,"tag":1012,"props":3502,"children":3503},{},[3504],{"type":993,"tag":1016,"props":3505,"children":3507},{"className":1018,"code":3506,"language":6,"meta":8,"style":8},"# Get first and last few elements\nscores = [85, 92, 78, 96, 88, 73, 91, 87, 94, 82]\nfirst_three = scores[:3]\nlast_three = scores[-3:]\nprint(\"First three scores:\", first_three)\nprint(\"Last three scores:\", last_three)\n",[3508],{"type":993,"tag":1022,"props":3509,"children":3510},{"__ignoreMap":8},[3511,3519,3620,3645,3674,3695],{"type":993,"tag":1026,"props":3512,"children":3513},{"class":1028,"line":12},[3514],{"type":993,"tag":1026,"props":3515,"children":3516},{"style":1032},[3517],{"type":998,"value":3518},"# Get first and last few elements\n",{"type":993,"tag":1026,"props":3520,"children":3521},{"class":1028,"line":27},[3522,3527,3531,3535,3539,3543,3548,3552,3556,3560,3565,3569,3574,3578,3582,3586,3590,3594,3599,3603,3608,3612,3616],{"type":993,"tag":1026,"props":3523,"children":3524},{"style":1041},[3525],{"type":998,"value":3526},"scores ",{"type":993,"tag":1026,"props":3528,"children":3529},{"style":1047},[3530],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3532,"children":3533},{"style":1041},[3534],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3536,"children":3537},{"style":1058},[3538],{"type":998,"value":2819},{"type":993,"tag":1026,"props":3540,"children":3541},{"style":1041},[3542],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3544,"children":3545},{"style":1058},[3546],{"type":998,"value":3547},"92",{"type":993,"tag":1026,"props":3549,"children":3550},{"style":1041},[3551],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3553,"children":3554},{"style":1058},[3555],{"type":998,"value":2837},{"type":993,"tag":1026,"props":3557,"children":3558},{"style":1041},[3559],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3561,"children":3562},{"style":1058},[3563],{"type":998,"value":3564},"96",{"type":993,"tag":1026,"props":3566,"children":3567},{"style":1041},[3568],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3570,"children":3571},{"style":1058},[3572],{"type":998,"value":3573},"88",{"type":993,"tag":1026,"props":3575,"children":3576},{"style":1041},[3577],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3579,"children":3580},{"style":1058},[3581],{"type":998,"value":2864},{"type":993,"tag":1026,"props":3583,"children":3584},{"style":1041},[3585],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3587,"children":3588},{"style":1058},[3589],{"type":998,"value":2828},{"type":993,"tag":1026,"props":3591,"children":3592},{"style":1041},[3593],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3595,"children":3596},{"style":1058},[3597],{"type":998,"value":3598},"87",{"type":993,"tag":1026,"props":3600,"children":3601},{"style":1041},[3602],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3604,"children":3605},{"style":1058},[3606],{"type":998,"value":3607},"94",{"type":993,"tag":1026,"props":3609,"children":3610},{"style":1041},[3611],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3613,"children":3614},{"style":1058},[3615],{"type":998,"value":2846},{"type":993,"tag":1026,"props":3617,"children":3618},{"style":1041},[3619],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3621,"children":3622},{"class":1028,"line":36},[3623,3628,3632,3637,3641],{"type":993,"tag":1026,"props":3624,"children":3625},{"style":1041},[3626],{"type":998,"value":3627},"first_three ",{"type":993,"tag":1026,"props":3629,"children":3630},{"style":1047},[3631],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3633,"children":3634},{"style":1041},[3635],{"type":998,"value":3636}," scores[:",{"type":993,"tag":1026,"props":3638,"children":3639},{"style":1058},[3640],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3642,"children":3643},{"style":1041},[3644],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3646,"children":3647},{"class":1028,"line":45},[3648,3653,3657,3662,3666,3670],{"type":993,"tag":1026,"props":3649,"children":3650},{"style":1041},[3651],{"type":998,"value":3652},"last_three ",{"type":993,"tag":1026,"props":3654,"children":3655},{"style":1047},[3656],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3658,"children":3659},{"style":1041},[3660],{"type":998,"value":3661}," scores[",{"type":993,"tag":1026,"props":3663,"children":3664},{"style":1047},[3665],{"type":998,"value":3199},{"type":993,"tag":1026,"props":3667,"children":3668},{"style":1058},[3669],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3671,"children":3672},{"style":1041},[3673],{"type":998,"value":1300},{"type":993,"tag":1026,"props":3675,"children":3676},{"class":1028,"line":54},[3677,3681,3685,3690],{"type":993,"tag":1026,"props":3678,"children":3679},{"style":1058},[3680],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3682,"children":3683},{"style":1041},[3684],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3686,"children":3687},{"style":1226},[3688],{"type":998,"value":3689},"\"First three scores:\"",{"type":993,"tag":1026,"props":3691,"children":3692},{"style":1041},[3693],{"type":998,"value":3694},", first_three)\n",{"type":993,"tag":1026,"props":3696,"children":3697},{"class":1028,"line":63},[3698,3702,3706,3711],{"type":993,"tag":1026,"props":3699,"children":3700},{"style":1058},[3701],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3703,"children":3704},{"style":1041},[3705],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3707,"children":3708},{"style":1226},[3709],{"type":998,"value":3710},"\"Last three scores:\"",{"type":993,"tag":1026,"props":3712,"children":3713},{"style":1041},[3714],{"type":998,"value":3715},", last_three)\n",{"type":993,"tag":1447,"props":3717,"children":3719},{"id":3718},"powerful-built-in-functions",[3720],{"type":998,"value":3721},"💪 Powerful Built-in Functions",{"type":993,"tag":1001,"props":3723,"children":3724},{},[3725],{"type":998,"value":3726},"Python provides many built-in functions that work perfectly with lists, allowing you to perform complex operations with simple function calls.",{"type":993,"tag":1459,"props":3728,"children":3731},{"emoji":3729,"title":3730,"type":1463},"💪","Essential List Functions",[3732,3740,3787,3795,3820,3828,3864],{"type":993,"tag":1001,"props":3733,"children":3734},{},[3735],{"type":993,"tag":1469,"props":3736,"children":3737},{},[3738],{"type":998,"value":3739},"Mathematical Functions:",{"type":993,"tag":1506,"props":3741,"children":3742},{},[3743,3754,3765,3776],{"type":993,"tag":1510,"props":3744,"children":3745},{},[3746,3752],{"type":993,"tag":1022,"props":3747,"children":3749},{"className":3748},[],[3750],{"type":998,"value":3751},"sum(list)",{"type":998,"value":3753},": Add all numeric elements",{"type":993,"tag":1510,"props":3755,"children":3756},{},[3757,3763],{"type":993,"tag":1022,"props":3758,"children":3760},{"className":3759},[],[3761],{"type":998,"value":3762},"max(list)",{"type":998,"value":3764},": Find largest element",{"type":993,"tag":1510,"props":3766,"children":3767},{},[3768,3774],{"type":993,"tag":1022,"props":3769,"children":3771},{"className":3770},[],[3772],{"type":998,"value":3773},"min(list)",{"type":998,"value":3775},": Find smallest element",{"type":993,"tag":1510,"props":3777,"children":3778},{},[3779,3785],{"type":993,"tag":1022,"props":3780,"children":3782},{"className":3781},[],[3783],{"type":998,"value":3784},"len(list)",{"type":998,"value":3786},": Count total elements",{"type":993,"tag":1001,"props":3788,"children":3789},{},[3790],{"type":993,"tag":1469,"props":3791,"children":3792},{},[3793],{"type":998,"value":3794},"Logical Functions:",{"type":993,"tag":1506,"props":3796,"children":3797},{},[3798,3809],{"type":993,"tag":1510,"props":3799,"children":3800},{},[3801,3807],{"type":993,"tag":1022,"props":3802,"children":3804},{"className":3803},[],[3805],{"type":998,"value":3806},"all(list)",{"type":998,"value":3808},": True if all elements are truthy",{"type":993,"tag":1510,"props":3810,"children":3811},{},[3812,3818],{"type":993,"tag":1022,"props":3813,"children":3815},{"className":3814},[],[3816],{"type":998,"value":3817},"any(list)",{"type":998,"value":3819},": True if any element is truthy",{"type":993,"tag":1001,"props":3821,"children":3822},{},[3823],{"type":993,"tag":1469,"props":3824,"children":3825},{},[3826],{"type":998,"value":3827},"Transformation Functions:",{"type":993,"tag":1506,"props":3829,"children":3830},{},[3831,3842,3853],{"type":993,"tag":1510,"props":3832,"children":3833},{},[3834,3840],{"type":993,"tag":1022,"props":3835,"children":3837},{"className":3836},[],[3838],{"type":998,"value":3839},"sorted(list)",{"type":998,"value":3841},": Return sorted copy",{"type":993,"tag":1510,"props":3843,"children":3844},{},[3845,3851],{"type":993,"tag":1022,"props":3846,"children":3848},{"className":3847},[],[3849],{"type":998,"value":3850},"enumerate(list)",{"type":998,"value":3852},": Add index numbers",{"type":993,"tag":1510,"props":3854,"children":3855},{},[3856,3862],{"type":993,"tag":1022,"props":3857,"children":3859},{"className":3858},[],[3860],{"type":998,"value":3861},"zip(list1, list2)",{"type":998,"value":3863},": Combine lists",{"type":993,"tag":1001,"props":3865,"children":3866},{},[3867,3872],{"type":993,"tag":1469,"props":3868,"children":3869},{},[3870],{"type":998,"value":3871},"Performance:",{"type":998,"value":3873}," Implemented in C, much faster than Python loops",{"type":993,"tag":1541,"props":3875,"children":3877},{"id":3876},"mathematical-functions",[3878],{"type":998,"value":3879},"Mathematical Functions",{"type":993,"tag":1012,"props":3881,"children":3882},{},[3883],{"type":993,"tag":1016,"props":3884,"children":3886},{"className":1018,"code":3885,"language":6,"meta":8,"style":8},"# Mathematical functions\nnumbers = [15, 8, 23, 42, 4, 16, 35]\nprint(\"Numbers:\", numbers)\nprint(\"Sum:\", sum(numbers))\nprint(\"Maximum:\", max(numbers))\nprint(\"Minimum:\", min(numbers))\nprint(\"Length:\", len(numbers))\nprint(\"Average:\", sum(numbers) / len(numbers))\n",[3887],{"type":993,"tag":1022,"props":3888,"children":3889},{"__ignoreMap":8},[3890,3898,3974,3994,4021,4049,4078,4105],{"type":993,"tag":1026,"props":3891,"children":3892},{"class":1028,"line":12},[3893],{"type":993,"tag":1026,"props":3894,"children":3895},{"style":1032},[3896],{"type":998,"value":3897},"# Mathematical functions\n",{"type":993,"tag":1026,"props":3899,"children":3900},{"class":1028,"line":27},[3901,3905,3909,3913,3918,3922,3926,3930,3935,3939,3944,3948,3952,3956,3961,3965,3970],{"type":993,"tag":1026,"props":3902,"children":3903},{"style":1041},[3904],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3906,"children":3907},{"style":1047},[3908],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3910,"children":3911},{"style":1041},[3912],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3914,"children":3915},{"style":1058},[3916],{"type":998,"value":3917},"15",{"type":993,"tag":1026,"props":3919,"children":3920},{"style":1041},[3921],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3923,"children":3924},{"style":1058},[3925],{"type":998,"value":1125},{"type":993,"tag":1026,"props":3927,"children":3928},{"style":1041},[3929],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3931,"children":3932},{"style":1058},[3933],{"type":998,"value":3934},"23",{"type":993,"tag":1026,"props":3936,"children":3937},{"style":1041},[3938],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3940,"children":3941},{"style":1058},[3942],{"type":998,"value":3943},"42",{"type":993,"tag":1026,"props":3945,"children":3946},{"style":1041},[3947],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3949,"children":3950},{"style":1058},[3951],{"type":998,"value":1089},{"type":993,"tag":1026,"props":3953,"children":3954},{"style":1041},[3955],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3957,"children":3958},{"style":1058},[3959],{"type":998,"value":3960},"16",{"type":993,"tag":1026,"props":3962,"children":3963},{"style":1041},[3964],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3966,"children":3967},{"style":1058},[3968],{"type":998,"value":3969},"35",{"type":993,"tag":1026,"props":3971,"children":3972},{"style":1041},[3973],{"type":998,"value":1148},{"type":993,"tag":1026,"props":3975,"children":3976},{"class":1028,"line":36},[3977,3981,3985,3990],{"type":993,"tag":1026,"props":3978,"children":3979},{"style":1058},[3980],{"type":998,"value":1218},{"type":993,"tag":1026,"props":3982,"children":3983},{"style":1041},[3984],{"type":998,"value":1223},{"type":993,"tag":1026,"props":3986,"children":3987},{"style":1226},[3988],{"type":998,"value":3989},"\"Numbers:\"",{"type":993,"tag":1026,"props":3991,"children":3992},{"style":1041},[3993],{"type":998,"value":3228},{"type":993,"tag":1026,"props":3995,"children":3996},{"class":1028,"line":45},[3997,4001,4005,4009,4013,4017],{"type":993,"tag":1026,"props":3998,"children":3999},{"style":1058},[4000],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4002,"children":4003},{"style":1041},[4004],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4006,"children":4007},{"style":1226},[4008],{"type":998,"value":1373},{"type":993,"tag":1026,"props":4010,"children":4011},{"style":1041},[4012],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4014,"children":4015},{"style":1058},[4016],{"type":998,"value":1382},{"type":993,"tag":1026,"props":4018,"children":4019},{"style":1041},[4020],{"type":998,"value":1387},{"type":993,"tag":1026,"props":4022,"children":4023},{"class":1028,"line":54},[4024,4028,4032,4037,4041,4045],{"type":993,"tag":1026,"props":4025,"children":4026},{"style":1058},[4027],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4029,"children":4030},{"style":1041},[4031],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4033,"children":4034},{"style":1226},[4035],{"type":998,"value":4036},"\"Maximum:\"",{"type":993,"tag":1026,"props":4038,"children":4039},{"style":1041},[4040],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4042,"children":4043},{"style":1058},[4044],{"type":998,"value":1412},{"type":993,"tag":1026,"props":4046,"children":4047},{"style":1041},[4048],{"type":998,"value":1387},{"type":993,"tag":1026,"props":4050,"children":4051},{"class":1028,"line":63},[4052,4056,4060,4065,4069,4074],{"type":993,"tag":1026,"props":4053,"children":4054},{"style":1058},[4055],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4057,"children":4058},{"style":1041},[4059],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4061,"children":4062},{"style":1226},[4063],{"type":998,"value":4064},"\"Minimum:\"",{"type":993,"tag":1026,"props":4066,"children":4067},{"style":1041},[4068],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4070,"children":4071},{"style":1058},[4072],{"type":998,"value":4073},"min",{"type":993,"tag":1026,"props":4075,"children":4076},{"style":1041},[4077],{"type":998,"value":1387},{"type":993,"tag":1026,"props":4079,"children":4080},{"class":1028,"line":72},[4081,4085,4089,4093,4097,4101],{"type":993,"tag":1026,"props":4082,"children":4083},{"style":1058},[4084],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4086,"children":4087},{"style":1041},[4088],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4090,"children":4091},{"style":1226},[4092],{"type":998,"value":1432},{"type":993,"tag":1026,"props":4094,"children":4095},{"style":1041},[4096],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4098,"children":4099},{"style":1058},[4100],{"type":998,"value":1441},{"type":993,"tag":1026,"props":4102,"children":4103},{"style":1041},[4104],{"type":998,"value":1387},{"type":993,"tag":1026,"props":4106,"children":4107},{"class":1028,"line":81},[4108,4112,4116,4121,4125,4129,4134,4139,4143],{"type":993,"tag":1026,"props":4109,"children":4110},{"style":1058},[4111],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4113,"children":4114},{"style":1041},[4115],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4117,"children":4118},{"style":1226},[4119],{"type":998,"value":4120},"\"Average:\"",{"type":993,"tag":1026,"props":4122,"children":4123},{"style":1041},[4124],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4126,"children":4127},{"style":1058},[4128],{"type":998,"value":1382},{"type":993,"tag":1026,"props":4130,"children":4131},{"style":1041},[4132],{"type":998,"value":4133},"(numbers) ",{"type":993,"tag":1026,"props":4135,"children":4136},{"style":1047},[4137],{"type":998,"value":4138},"/",{"type":993,"tag":1026,"props":4140,"children":4141},{"style":1058},[4142],{"type":998,"value":2717},{"type":993,"tag":1026,"props":4144,"children":4145},{"style":1041},[4146],{"type":998,"value":1387},{"type":993,"tag":1541,"props":4148,"children":4150},{"id":4149},"logical-functions",[4151],{"type":998,"value":4152},"Logical Functions",{"type":993,"tag":1012,"props":4154,"children":4155},{},[4156],{"type":993,"tag":1016,"props":4157,"children":4159},{"className":1018,"code":4158,"language":6,"meta":8,"style":8},"# Logical functions\nflags = [True, True, False, True]\ngrades = [85, 92, 78, 96, 88]\n\nprint(\"All flags true:\", all(flags))\nprint(\"Any flag true:\", any(flags))\nprint(\"All grades > 70:\", all(grade > 70 for grade in grades))\nprint(\"Any grade > 90:\", any(grade > 90 for grade in grades))\n",[4160],{"type":993,"tag":1022,"props":4161,"children":4162},{"__ignoreMap":8},[4163,4171,4221,4277,4284,4314,4343,4398],{"type":993,"tag":1026,"props":4164,"children":4165},{"class":1028,"line":12},[4166],{"type":993,"tag":1026,"props":4167,"children":4168},{"style":1032},[4169],{"type":998,"value":4170},"# Logical functions\n",{"type":993,"tag":1026,"props":4172,"children":4173},{"class":1028,"line":27},[4174,4179,4183,4187,4192,4196,4200,4204,4209,4213,4217],{"type":993,"tag":1026,"props":4175,"children":4176},{"style":1041},[4177],{"type":998,"value":4178},"flags ",{"type":993,"tag":1026,"props":4180,"children":4181},{"style":1047},[4182],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4184,"children":4185},{"style":1041},[4186],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4188,"children":4189},{"style":1058},[4190],{"type":998,"value":4191},"True",{"type":993,"tag":1026,"props":4193,"children":4194},{"style":1041},[4195],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4197,"children":4198},{"style":1058},[4199],{"type":998,"value":4191},{"type":993,"tag":1026,"props":4201,"children":4202},{"style":1041},[4203],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4205,"children":4206},{"style":1058},[4207],{"type":998,"value":4208},"False",{"type":993,"tag":1026,"props":4210,"children":4211},{"style":1041},[4212],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4214,"children":4215},{"style":1058},[4216],{"type":998,"value":4191},{"type":993,"tag":1026,"props":4218,"children":4219},{"style":1041},[4220],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4222,"children":4223},{"class":1028,"line":36},[4224,4229,4233,4237,4241,4245,4249,4253,4257,4261,4265,4269,4273],{"type":993,"tag":1026,"props":4225,"children":4226},{"style":1041},[4227],{"type":998,"value":4228},"grades ",{"type":993,"tag":1026,"props":4230,"children":4231},{"style":1047},[4232],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4234,"children":4235},{"style":1041},[4236],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4238,"children":4239},{"style":1058},[4240],{"type":998,"value":2819},{"type":993,"tag":1026,"props":4242,"children":4243},{"style":1041},[4244],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4246,"children":4247},{"style":1058},[4248],{"type":998,"value":3547},{"type":993,"tag":1026,"props":4250,"children":4251},{"style":1041},[4252],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4254,"children":4255},{"style":1058},[4256],{"type":998,"value":2837},{"type":993,"tag":1026,"props":4258,"children":4259},{"style":1041},[4260],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4262,"children":4263},{"style":1058},[4264],{"type":998,"value":3564},{"type":993,"tag":1026,"props":4266,"children":4267},{"style":1041},[4268],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4270,"children":4271},{"style":1058},[4272],{"type":998,"value":3573},{"type":993,"tag":1026,"props":4274,"children":4275},{"style":1041},[4276],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4278,"children":4279},{"class":1028,"line":45},[4280],{"type":993,"tag":1026,"props":4281,"children":4282},{"emptyLinePlaceholder":13},[4283],{"type":998,"value":1156},{"type":993,"tag":1026,"props":4285,"children":4286},{"class":1028,"line":54},[4287,4291,4295,4300,4304,4309],{"type":993,"tag":1026,"props":4288,"children":4289},{"style":1058},[4290],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4292,"children":4293},{"style":1041},[4294],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4296,"children":4297},{"style":1226},[4298],{"type":998,"value":4299},"\"All flags true:\"",{"type":993,"tag":1026,"props":4301,"children":4302},{"style":1041},[4303],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4305,"children":4306},{"style":1058},[4307],{"type":998,"value":4308},"all",{"type":993,"tag":1026,"props":4310,"children":4311},{"style":1041},[4312],{"type":998,"value":4313},"(flags))\n",{"type":993,"tag":1026,"props":4315,"children":4316},{"class":1028,"line":63},[4317,4321,4325,4330,4334,4339],{"type":993,"tag":1026,"props":4318,"children":4319},{"style":1058},[4320],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4322,"children":4323},{"style":1041},[4324],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4326,"children":4327},{"style":1226},[4328],{"type":998,"value":4329},"\"Any flag true:\"",{"type":993,"tag":1026,"props":4331,"children":4332},{"style":1041},[4333],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4335,"children":4336},{"style":1058},[4337],{"type":998,"value":4338},"any",{"type":993,"tag":1026,"props":4340,"children":4341},{"style":1041},[4342],{"type":998,"value":4313},{"type":993,"tag":1026,"props":4344,"children":4345},{"class":1028,"line":72},[4346,4350,4354,4359,4363,4367,4372,4376,4380,4384,4389,4393],{"type":993,"tag":1026,"props":4347,"children":4348},{"style":1058},[4349],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4351,"children":4352},{"style":1041},[4353],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4355,"children":4356},{"style":1226},[4357],{"type":998,"value":4358},"\"All grades > 70:\"",{"type":993,"tag":1026,"props":4360,"children":4361},{"style":1041},[4362],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4364,"children":4365},{"style":1058},[4366],{"type":998,"value":4308},{"type":993,"tag":1026,"props":4368,"children":4369},{"style":1041},[4370],{"type":998,"value":4371},"(grade ",{"type":993,"tag":1026,"props":4373,"children":4374},{"style":1047},[4375],{"type":998,"value":2727},{"type":993,"tag":1026,"props":4377,"children":4378},{"style":1058},[4379],{"type":998,"value":2912},{"type":993,"tag":1026,"props":4381,"children":4382},{"style":1047},[4383],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4385,"children":4386},{"style":1041},[4387],{"type":998,"value":4388}," grade ",{"type":993,"tag":1026,"props":4390,"children":4391},{"style":1047},[4392],{"type":998,"value":1205},{"type":993,"tag":1026,"props":4394,"children":4395},{"style":1041},[4396],{"type":998,"value":4397}," grades))\n",{"type":993,"tag":1026,"props":4399,"children":4400},{"class":1028,"line":81},[4401,4405,4409,4414,4418,4422,4426,4430,4435,4439,4443,4447],{"type":993,"tag":1026,"props":4402,"children":4403},{"style":1058},[4404],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4406,"children":4407},{"style":1041},[4408],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4410,"children":4411},{"style":1226},[4412],{"type":998,"value":4413},"\"Any grade > 90:\"",{"type":993,"tag":1026,"props":4415,"children":4416},{"style":1041},[4417],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4419,"children":4420},{"style":1058},[4421],{"type":998,"value":4338},{"type":993,"tag":1026,"props":4423,"children":4424},{"style":1041},[4425],{"type":998,"value":4371},{"type":993,"tag":1026,"props":4427,"children":4428},{"style":1047},[4429],{"type":998,"value":2727},{"type":993,"tag":1026,"props":4431,"children":4432},{"style":1058},[4433],{"type":998,"value":4434}," 90",{"type":993,"tag":1026,"props":4436,"children":4437},{"style":1047},[4438],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4440,"children":4441},{"style":1041},[4442],{"type":998,"value":4388},{"type":993,"tag":1026,"props":4444,"children":4445},{"style":1047},[4446],{"type":998,"value":1205},{"type":993,"tag":1026,"props":4448,"children":4449},{"style":1041},[4450],{"type":998,"value":4397},{"type":993,"tag":1541,"props":4452,"children":4453},{"id":355},[4454],{"type":998,"value":353},{"type":993,"tag":1012,"props":4456,"children":4457},{},[4458],{"type":993,"tag":1016,"props":4459,"children":4461},{"className":1018,"code":4460,"language":6,"meta":8,"style":8},"# Combining lists with zip\nnames = [\"Alice\", \"Bob\", \"Charlie\"]\nages = [25, 30, 35]\ncities = [\"New York\", \"London\", \"Tokyo\"]\n\nprint(\"Combined information:\")\nfor name, age, city in zip(names, ages, cities):\n    print(f\"{name}, {age}, {city}\")\n",[4462],{"type":993,"tag":1022,"props":4463,"children":4464},{"__ignoreMap":8},[4465,4473,4516,4557,4600,4607,4627,4653],{"type":993,"tag":1026,"props":4466,"children":4467},{"class":1028,"line":12},[4468],{"type":993,"tag":1026,"props":4469,"children":4470},{"style":1032},[4471],{"type":998,"value":4472},"# Combining lists with zip\n",{"type":993,"tag":1026,"props":4474,"children":4475},{"class":1028,"line":27},[4476,4481,4485,4489,4494,4498,4503,4507,4512],{"type":993,"tag":1026,"props":4477,"children":4478},{"style":1041},[4479],{"type":998,"value":4480},"names ",{"type":993,"tag":1026,"props":4482,"children":4483},{"style":1047},[4484],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4486,"children":4487},{"style":1041},[4488],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4490,"children":4491},{"style":1226},[4492],{"type":998,"value":4493},"\"Alice\"",{"type":993,"tag":1026,"props":4495,"children":4496},{"style":1041},[4497],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4499,"children":4500},{"style":1226},[4501],{"type":998,"value":4502},"\"Bob\"",{"type":993,"tag":1026,"props":4504,"children":4505},{"style":1041},[4506],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4508,"children":4509},{"style":1226},[4510],{"type":998,"value":4511},"\"Charlie\"",{"type":993,"tag":1026,"props":4513,"children":4514},{"style":1041},[4515],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4517,"children":4518},{"class":1028,"line":36},[4519,4524,4528,4532,4537,4541,4545,4549,4553],{"type":993,"tag":1026,"props":4520,"children":4521},{"style":1041},[4522],{"type":998,"value":4523},"ages ",{"type":993,"tag":1026,"props":4525,"children":4526},{"style":1047},[4527],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4529,"children":4530},{"style":1041},[4531],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4533,"children":4534},{"style":1058},[4535],{"type":998,"value":4536},"25",{"type":993,"tag":1026,"props":4538,"children":4539},{"style":1041},[4540],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4542,"children":4543},{"style":1058},[4544],{"type":998,"value":3311},{"type":993,"tag":1026,"props":4546,"children":4547},{"style":1041},[4548],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4550,"children":4551},{"style":1058},[4552],{"type":998,"value":3969},{"type":993,"tag":1026,"props":4554,"children":4555},{"style":1041},[4556],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4558,"children":4559},{"class":1028,"line":45},[4560,4565,4569,4573,4578,4582,4587,4591,4596],{"type":993,"tag":1026,"props":4561,"children":4562},{"style":1041},[4563],{"type":998,"value":4564},"cities ",{"type":993,"tag":1026,"props":4566,"children":4567},{"style":1047},[4568],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4570,"children":4571},{"style":1041},[4572],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4574,"children":4575},{"style":1226},[4576],{"type":998,"value":4577},"\"New York\"",{"type":993,"tag":1026,"props":4579,"children":4580},{"style":1041},[4581],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4583,"children":4584},{"style":1226},[4585],{"type":998,"value":4586},"\"London\"",{"type":993,"tag":1026,"props":4588,"children":4589},{"style":1041},[4590],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4592,"children":4593},{"style":1226},[4594],{"type":998,"value":4595},"\"Tokyo\"",{"type":993,"tag":1026,"props":4597,"children":4598},{"style":1041},[4599],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4601,"children":4602},{"class":1028,"line":54},[4603],{"type":993,"tag":1026,"props":4604,"children":4605},{"emptyLinePlaceholder":13},[4606],{"type":998,"value":1156},{"type":993,"tag":1026,"props":4608,"children":4609},{"class":1028,"line":63},[4610,4614,4618,4623],{"type":993,"tag":1026,"props":4611,"children":4612},{"style":1058},[4613],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4615,"children":4616},{"style":1041},[4617],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4619,"children":4620},{"style":1226},[4621],{"type":998,"value":4622},"\"Combined information:\"",{"type":993,"tag":1026,"props":4624,"children":4625},{"style":1041},[4626],{"type":998,"value":1644},{"type":993,"tag":1026,"props":4628,"children":4629},{"class":1028,"line":72},[4630,4634,4639,4643,4648],{"type":993,"tag":1026,"props":4631,"children":4632},{"style":1047},[4633],{"type":998,"value":1589},{"type":993,"tag":1026,"props":4635,"children":4636},{"style":1041},[4637],{"type":998,"value":4638}," name, age, city ",{"type":993,"tag":1026,"props":4640,"children":4641},{"style":1047},[4642],{"type":998,"value":1205},{"type":993,"tag":1026,"props":4644,"children":4645},{"style":1058},[4646],{"type":998,"value":4647}," zip",{"type":993,"tag":1026,"props":4649,"children":4650},{"style":1041},[4651],{"type":998,"value":4652},"(names, ages, cities):\n",{"type":993,"tag":1026,"props":4654,"children":4655},{"class":1028,"line":81},[4656,4661,4665,4670,4675,4680,4685,4690,4694,4698,4703,4707,4711,4715,4720,4724,4728],{"type":993,"tag":1026,"props":4657,"children":4658},{"style":1058},[4659],{"type":998,"value":4660},"    print",{"type":993,"tag":1026,"props":4662,"children":4663},{"style":1041},[4664],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4666,"children":4667},{"style":1047},[4668],{"type":998,"value":4669},"f",{"type":993,"tag":1026,"props":4671,"children":4672},{"style":1226},[4673],{"type":998,"value":4674},"\"",{"type":993,"tag":1026,"props":4676,"children":4677},{"style":1058},[4678],{"type":998,"value":4679},"{",{"type":993,"tag":1026,"props":4681,"children":4682},{"style":1041},[4683],{"type":998,"value":4684},"name",{"type":993,"tag":1026,"props":4686,"children":4687},{"style":1058},[4688],{"type":998,"value":4689},"}",{"type":993,"tag":1026,"props":4691,"children":4692},{"style":1226},[4693],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4695,"children":4696},{"style":1058},[4697],{"type":998,"value":4679},{"type":993,"tag":1026,"props":4699,"children":4700},{"style":1041},[4701],{"type":998,"value":4702},"age",{"type":993,"tag":1026,"props":4704,"children":4705},{"style":1058},[4706],{"type":998,"value":4689},{"type":993,"tag":1026,"props":4708,"children":4709},{"style":1226},[4710],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4712,"children":4713},{"style":1058},[4714],{"type":998,"value":4679},{"type":993,"tag":1026,"props":4716,"children":4717},{"style":1041},[4718],{"type":998,"value":4719},"city",{"type":993,"tag":1026,"props":4721,"children":4722},{"style":1058},[4723],{"type":998,"value":4689},{"type":993,"tag":1026,"props":4725,"children":4726},{"style":1226},[4727],{"type":998,"value":4674},{"type":993,"tag":1026,"props":4729,"children":4730},{"style":1041},[4731],{"type":998,"value":1644},{"type":993,"tag":1447,"props":4733,"children":4735},{"id":4734},"list-unpacking-and-multiple-assignment",[4736],{"type":998,"value":4737},"📦 List Unpacking and Multiple Assignment",{"type":993,"tag":1001,"props":4739,"children":4740},{},[4741],{"type":998,"value":4742},"Python allows you to unpack lists into multiple variables, which is useful for extracting values and working with structured data.",{"type":993,"tag":1459,"props":4744,"children":4747},{"emoji":4745,"title":4746,"type":2105},"📦","List Unpacking Patterns",[4748,4775,4783,4824],{"type":993,"tag":1001,"props":4749,"children":4750},{},[4751,4756,4757,4763,4768,4769],{"type":993,"tag":1469,"props":4752,"children":4753},{},[4754],{"type":998,"value":4755},"Basic Unpacking:",{"type":998,"value":1475},{"type":993,"tag":1022,"props":4758,"children":4760},{"className":4759},[],[4761],{"type":998,"value":4762},"a, b, c = [1, 2, 3]",{"type":993,"tag":1469,"props":4764,"children":4765},{},[4766],{"type":998,"value":4767},"Star Unpacking:",{"type":998,"value":1475},{"type":993,"tag":1022,"props":4770,"children":4772},{"className":4771},[],[4773],{"type":998,"value":4774},"first, *middle, last = list",{"type":993,"tag":1001,"props":4776,"children":4777},{},[4778],{"type":993,"tag":1469,"props":4779,"children":4780},{},[4781],{"type":998,"value":4782},"Use Cases:",{"type":993,"tag":1506,"props":4784,"children":4785},{},[4786,4791,4802,4813],{"type":993,"tag":1510,"props":4787,"children":4788},{},[4789],{"type":998,"value":4790},"Extracting specific values from lists",{"type":993,"tag":1510,"props":4792,"children":4793},{},[4794,4796],{"type":998,"value":4795},"Swapping variables: ",{"type":993,"tag":1022,"props":4797,"children":4799},{"className":4798},[],[4800],{"type":998,"value":4801},"a, b = b, a",{"type":993,"tag":1510,"props":4803,"children":4804},{},[4805,4807],{"type":998,"value":4806},"Function argument unpacking: ",{"type":993,"tag":1022,"props":4808,"children":4810},{"className":4809},[],[4811],{"type":998,"value":4812},"func(*args)",{"type":993,"tag":1510,"props":4814,"children":4815},{},[4816,4818],{"type":998,"value":4817},"Collecting remaining items: ",{"type":993,"tag":1022,"props":4819,"children":4821},{"className":4820},[],[4822],{"type":998,"value":4823},"head, *tail = list",{"type":993,"tag":1001,"props":4825,"children":4826},{},[4827,4832],{"type":993,"tag":1469,"props":4828,"children":4829},{},[4830],{"type":998,"value":4831},"Requirements:",{"type":998,"value":4833}," Use star (*) for collecting multiple items, only one starred variable per unpacking",{"type":993,"tag":1541,"props":4835,"children":4837},{"id":4836},"basic-unpacking",[4838],{"type":998,"value":4839},"Basic Unpacking",{"type":993,"tag":1012,"props":4841,"children":4842},{},[4843],{"type":993,"tag":1016,"props":4844,"children":4846},{"className":1018,"code":4845,"language":6,"meta":8,"style":8},"# Basic unpacking\ncoordinates = [10, 20, 30]\nx, y, z = coordinates\nprint(f\"X: {x}, Y: {y}, Z: {z}\")\n\n# Unpacking with different data types\nstudent_info = [\"Alice\", 20, 3.8]\nname, age, gpa = student_info\nprint(f\"Student: {name}, Age: {age}, GPA: {gpa}\")\n",[4847],{"type":993,"tag":1022,"props":4848,"children":4849},{"__ignoreMap":8},[4850,4858,4898,4915,4992,4999,5007,5048,5065],{"type":993,"tag":1026,"props":4851,"children":4852},{"class":1028,"line":12},[4853],{"type":993,"tag":1026,"props":4854,"children":4855},{"style":1032},[4856],{"type":998,"value":4857},"# Basic unpacking\n",{"type":993,"tag":1026,"props":4859,"children":4860},{"class":1028,"line":27},[4861,4866,4870,4874,4878,4882,4886,4890,4894],{"type":993,"tag":1026,"props":4862,"children":4863},{"style":1041},[4864],{"type":998,"value":4865},"coordinates ",{"type":993,"tag":1026,"props":4867,"children":4868},{"style":1047},[4869],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4871,"children":4872},{"style":1041},[4873],{"type":998,"value":1055},{"type":993,"tag":1026,"props":4875,"children":4876},{"style":1058},[4877],{"type":998,"value":1143},{"type":993,"tag":1026,"props":4879,"children":4880},{"style":1041},[4881],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4883,"children":4884},{"style":1058},[4885],{"type":998,"value":3302},{"type":993,"tag":1026,"props":4887,"children":4888},{"style":1041},[4889],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4891,"children":4892},{"style":1058},[4893],{"type":998,"value":3311},{"type":993,"tag":1026,"props":4895,"children":4896},{"style":1041},[4897],{"type":998,"value":1148},{"type":993,"tag":1026,"props":4899,"children":4900},{"class":1028,"line":36},[4901,4906,4910],{"type":993,"tag":1026,"props":4902,"children":4903},{"style":1041},[4904],{"type":998,"value":4905},"x, y, z ",{"type":993,"tag":1026,"props":4907,"children":4908},{"style":1047},[4909],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4911,"children":4912},{"style":1041},[4913],{"type":998,"value":4914}," coordinates\n",{"type":993,"tag":1026,"props":4916,"children":4917},{"class":1028,"line":45},[4918,4922,4926,4930,4935,4939,4944,4948,4953,4957,4962,4966,4971,4975,4980,4984,4988],{"type":993,"tag":1026,"props":4919,"children":4920},{"style":1058},[4921],{"type":998,"value":1218},{"type":993,"tag":1026,"props":4923,"children":4924},{"style":1041},[4925],{"type":998,"value":1223},{"type":993,"tag":1026,"props":4927,"children":4928},{"style":1047},[4929],{"type":998,"value":4669},{"type":993,"tag":1026,"props":4931,"children":4932},{"style":1226},[4933],{"type":998,"value":4934},"\"X: ",{"type":993,"tag":1026,"props":4936,"children":4937},{"style":1058},[4938],{"type":998,"value":4679},{"type":993,"tag":1026,"props":4940,"children":4941},{"style":1041},[4942],{"type":998,"value":4943},"x",{"type":993,"tag":1026,"props":4945,"children":4946},{"style":1058},[4947],{"type":998,"value":4689},{"type":993,"tag":1026,"props":4949,"children":4950},{"style":1226},[4951],{"type":998,"value":4952},", Y: ",{"type":993,"tag":1026,"props":4954,"children":4955},{"style":1058},[4956],{"type":998,"value":4679},{"type":993,"tag":1026,"props":4958,"children":4959},{"style":1041},[4960],{"type":998,"value":4961},"y",{"type":993,"tag":1026,"props":4963,"children":4964},{"style":1058},[4965],{"type":998,"value":4689},{"type":993,"tag":1026,"props":4967,"children":4968},{"style":1226},[4969],{"type":998,"value":4970},", Z: ",{"type":993,"tag":1026,"props":4972,"children":4973},{"style":1058},[4974],{"type":998,"value":4679},{"type":993,"tag":1026,"props":4976,"children":4977},{"style":1041},[4978],{"type":998,"value":4979},"z",{"type":993,"tag":1026,"props":4981,"children":4982},{"style":1058},[4983],{"type":998,"value":4689},{"type":993,"tag":1026,"props":4985,"children":4986},{"style":1226},[4987],{"type":998,"value":4674},{"type":993,"tag":1026,"props":4989,"children":4990},{"style":1041},[4991],{"type":998,"value":1644},{"type":993,"tag":1026,"props":4993,"children":4994},{"class":1028,"line":54},[4995],{"type":993,"tag":1026,"props":4996,"children":4997},{"emptyLinePlaceholder":13},[4998],{"type":998,"value":1156},{"type":993,"tag":1026,"props":5000,"children":5001},{"class":1028,"line":63},[5002],{"type":993,"tag":1026,"props":5003,"children":5004},{"style":1032},[5005],{"type":998,"value":5006},"# Unpacking with different data types\n",{"type":993,"tag":1026,"props":5008,"children":5009},{"class":1028,"line":72},[5010,5015,5019,5023,5027,5031,5035,5039,5044],{"type":993,"tag":1026,"props":5011,"children":5012},{"style":1041},[5013],{"type":998,"value":5014},"student_info ",{"type":993,"tag":1026,"props":5016,"children":5017},{"style":1047},[5018],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5020,"children":5021},{"style":1041},[5022],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5024,"children":5025},{"style":1226},[5026],{"type":998,"value":4493},{"type":993,"tag":1026,"props":5028,"children":5029},{"style":1041},[5030],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5032,"children":5033},{"style":1058},[5034],{"type":998,"value":3302},{"type":993,"tag":1026,"props":5036,"children":5037},{"style":1041},[5038],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5040,"children":5041},{"style":1058},[5042],{"type":998,"value":5043},"3.8",{"type":993,"tag":1026,"props":5045,"children":5046},{"style":1041},[5047],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5049,"children":5050},{"class":1028,"line":81},[5051,5056,5060],{"type":993,"tag":1026,"props":5052,"children":5053},{"style":1041},[5054],{"type":998,"value":5055},"name, age, gpa ",{"type":993,"tag":1026,"props":5057,"children":5058},{"style":1047},[5059],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5061,"children":5062},{"style":1041},[5063],{"type":998,"value":5064}," student_info\n",{"type":993,"tag":1026,"props":5066,"children":5067},{"class":1028,"line":91},[5068,5072,5076,5080,5085,5089,5093,5097,5102,5106,5110,5114,5119,5123,5128,5132,5136],{"type":993,"tag":1026,"props":5069,"children":5070},{"style":1058},[5071],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5073,"children":5074},{"style":1041},[5075],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5077,"children":5078},{"style":1047},[5079],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5081,"children":5082},{"style":1226},[5083],{"type":998,"value":5084},"\"Student: ",{"type":993,"tag":1026,"props":5086,"children":5087},{"style":1058},[5088],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5090,"children":5091},{"style":1041},[5092],{"type":998,"value":4684},{"type":993,"tag":1026,"props":5094,"children":5095},{"style":1058},[5096],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5098,"children":5099},{"style":1226},[5100],{"type":998,"value":5101},", Age: ",{"type":993,"tag":1026,"props":5103,"children":5104},{"style":1058},[5105],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5107,"children":5108},{"style":1041},[5109],{"type":998,"value":4702},{"type":993,"tag":1026,"props":5111,"children":5112},{"style":1058},[5113],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5115,"children":5116},{"style":1226},[5117],{"type":998,"value":5118},", GPA: ",{"type":993,"tag":1026,"props":5120,"children":5121},{"style":1058},[5122],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5124,"children":5125},{"style":1041},[5126],{"type":998,"value":5127},"gpa",{"type":993,"tag":1026,"props":5129,"children":5130},{"style":1058},[5131],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5133,"children":5134},{"style":1226},[5135],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5137,"children":5138},{"style":1041},[5139],{"type":998,"value":1644},{"type":993,"tag":1541,"props":5141,"children":5143},{"id":5142},"star-unpacking",[5144],{"type":998,"value":5145},"Star Unpacking",{"type":993,"tag":1012,"props":5147,"children":5148},{},[5149],{"type":993,"tag":1016,"props":5150,"children":5152},{"className":1018,"code":5151,"language":6,"meta":8,"style":8},"# Star unpacking\nnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nfirst, second, *rest = numbers\nprint(f\"First: {first}\")\nprint(f\"Second: {second}\")\nprint(f\"Rest: {rest}\")\n\n# Get first and last, ignore middle\nfirst, *middle, last = numbers\nprint(f\"First: {first}, Last: {last}, Middle count: {len(middle)}\")\n",[5153],{"type":993,"tag":1022,"props":5154,"children":5155},{"__ignoreMap":8},[5156,5164,5259,5285,5326,5367,5408,5415,5423,5448],{"type":993,"tag":1026,"props":5157,"children":5158},{"class":1028,"line":12},[5159],{"type":993,"tag":1026,"props":5160,"children":5161},{"style":1032},[5162],{"type":998,"value":5163},"# Star unpacking\n",{"type":993,"tag":1026,"props":5165,"children":5166},{"class":1028,"line":27},[5167,5171,5175,5179,5183,5187,5191,5195,5199,5203,5207,5211,5215,5219,5223,5227,5231,5235,5239,5243,5247,5251,5255],{"type":993,"tag":1026,"props":5168,"children":5169},{"style":1041},[5170],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5172,"children":5173},{"style":1047},[5174],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5176,"children":5177},{"style":1041},[5178],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5180,"children":5181},{"style":1058},[5182],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5184,"children":5185},{"style":1041},[5186],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5188,"children":5189},{"style":1058},[5190],{"type":998,"value":1071},{"type":993,"tag":1026,"props":5192,"children":5193},{"style":1041},[5194],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5196,"children":5197},{"style":1058},[5198],{"type":998,"value":1080},{"type":993,"tag":1026,"props":5200,"children":5201},{"style":1041},[5202],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5204,"children":5205},{"style":1058},[5206],{"type":998,"value":1089},{"type":993,"tag":1026,"props":5208,"children":5209},{"style":1041},[5210],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5212,"children":5213},{"style":1058},[5214],{"type":998,"value":1098},{"type":993,"tag":1026,"props":5216,"children":5217},{"style":1041},[5218],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5220,"children":5221},{"style":1058},[5222],{"type":998,"value":1107},{"type":993,"tag":1026,"props":5224,"children":5225},{"style":1041},[5226],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5228,"children":5229},{"style":1058},[5230],{"type":998,"value":1116},{"type":993,"tag":1026,"props":5232,"children":5233},{"style":1041},[5234],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5236,"children":5237},{"style":1058},[5238],{"type":998,"value":1125},{"type":993,"tag":1026,"props":5240,"children":5241},{"style":1041},[5242],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5244,"children":5245},{"style":1058},[5246],{"type":998,"value":1134},{"type":993,"tag":1026,"props":5248,"children":5249},{"style":1041},[5250],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5252,"children":5253},{"style":1058},[5254],{"type":998,"value":1143},{"type":993,"tag":1026,"props":5256,"children":5257},{"style":1041},[5258],{"type":998,"value":1148},{"type":993,"tag":1026,"props":5260,"children":5261},{"class":1028,"line":36},[5262,5267,5271,5276,5280],{"type":993,"tag":1026,"props":5263,"children":5264},{"style":1041},[5265],{"type":998,"value":5266},"first, second, ",{"type":993,"tag":1026,"props":5268,"children":5269},{"style":1047},[5270],{"type":998,"value":1984},{"type":993,"tag":1026,"props":5272,"children":5273},{"style":1041},[5274],{"type":998,"value":5275},"rest ",{"type":993,"tag":1026,"props":5277,"children":5278},{"style":1047},[5279],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5281,"children":5282},{"style":1041},[5283],{"type":998,"value":5284}," numbers\n",{"type":993,"tag":1026,"props":5286,"children":5287},{"class":1028,"line":45},[5288,5292,5296,5300,5305,5309,5314,5318,5322],{"type":993,"tag":1026,"props":5289,"children":5290},{"style":1058},[5291],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5293,"children":5294},{"style":1041},[5295],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5297,"children":5298},{"style":1047},[5299],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5301,"children":5302},{"style":1226},[5303],{"type":998,"value":5304},"\"First: ",{"type":993,"tag":1026,"props":5306,"children":5307},{"style":1058},[5308],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5310,"children":5311},{"style":1041},[5312],{"type":998,"value":5313},"first",{"type":993,"tag":1026,"props":5315,"children":5316},{"style":1058},[5317],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5319,"children":5320},{"style":1226},[5321],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5323,"children":5324},{"style":1041},[5325],{"type":998,"value":1644},{"type":993,"tag":1026,"props":5327,"children":5328},{"class":1028,"line":54},[5329,5333,5337,5341,5346,5350,5355,5359,5363],{"type":993,"tag":1026,"props":5330,"children":5331},{"style":1058},[5332],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5334,"children":5335},{"style":1041},[5336],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5338,"children":5339},{"style":1047},[5340],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5342,"children":5343},{"style":1226},[5344],{"type":998,"value":5345},"\"Second: ",{"type":993,"tag":1026,"props":5347,"children":5348},{"style":1058},[5349],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5351,"children":5352},{"style":1041},[5353],{"type":998,"value":5354},"second",{"type":993,"tag":1026,"props":5356,"children":5357},{"style":1058},[5358],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5360,"children":5361},{"style":1226},[5362],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5364,"children":5365},{"style":1041},[5366],{"type":998,"value":1644},{"type":993,"tag":1026,"props":5368,"children":5369},{"class":1028,"line":63},[5370,5374,5378,5382,5387,5391,5396,5400,5404],{"type":993,"tag":1026,"props":5371,"children":5372},{"style":1058},[5373],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5375,"children":5376},{"style":1041},[5377],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5379,"children":5380},{"style":1047},[5381],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5383,"children":5384},{"style":1226},[5385],{"type":998,"value":5386},"\"Rest: ",{"type":993,"tag":1026,"props":5388,"children":5389},{"style":1058},[5390],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5392,"children":5393},{"style":1041},[5394],{"type":998,"value":5395},"rest",{"type":993,"tag":1026,"props":5397,"children":5398},{"style":1058},[5399],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5401,"children":5402},{"style":1226},[5403],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5405,"children":5406},{"style":1041},[5407],{"type":998,"value":1644},{"type":993,"tag":1026,"props":5409,"children":5410},{"class":1028,"line":72},[5411],{"type":993,"tag":1026,"props":5412,"children":5413},{"emptyLinePlaceholder":13},[5414],{"type":998,"value":1156},{"type":993,"tag":1026,"props":5416,"children":5417},{"class":1028,"line":81},[5418],{"type":993,"tag":1026,"props":5419,"children":5420},{"style":1032},[5421],{"type":998,"value":5422},"# Get first and last, ignore middle\n",{"type":993,"tag":1026,"props":5424,"children":5425},{"class":1028,"line":91},[5426,5431,5435,5440,5444],{"type":993,"tag":1026,"props":5427,"children":5428},{"style":1041},[5429],{"type":998,"value":5430},"first, ",{"type":993,"tag":1026,"props":5432,"children":5433},{"style":1047},[5434],{"type":998,"value":1984},{"type":993,"tag":1026,"props":5436,"children":5437},{"style":1041},[5438],{"type":998,"value":5439},"middle, last ",{"type":993,"tag":1026,"props":5441,"children":5442},{"style":1047},[5443],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5445,"children":5446},{"style":1041},[5447],{"type":998,"value":5284},{"type":993,"tag":1026,"props":5449,"children":5450},{"class":1028,"line":100},[5451,5455,5459,5463,5467,5471,5475,5479,5484,5488,5493,5497,5502,5507,5512,5516,5520],{"type":993,"tag":1026,"props":5452,"children":5453},{"style":1058},[5454],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5456,"children":5457},{"style":1041},[5458],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5460,"children":5461},{"style":1047},[5462],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5464,"children":5465},{"style":1226},[5466],{"type":998,"value":5304},{"type":993,"tag":1026,"props":5468,"children":5469},{"style":1058},[5470],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5472,"children":5473},{"style":1041},[5474],{"type":998,"value":5313},{"type":993,"tag":1026,"props":5476,"children":5477},{"style":1058},[5478],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5480,"children":5481},{"style":1226},[5482],{"type":998,"value":5483},", Last: ",{"type":993,"tag":1026,"props":5485,"children":5486},{"style":1058},[5487],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5489,"children":5490},{"style":1041},[5491],{"type":998,"value":5492},"last",{"type":993,"tag":1026,"props":5494,"children":5495},{"style":1058},[5496],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5498,"children":5499},{"style":1226},[5500],{"type":998,"value":5501},", Middle count: ",{"type":993,"tag":1026,"props":5503,"children":5504},{"style":1058},[5505],{"type":998,"value":5506},"{len",{"type":993,"tag":1026,"props":5508,"children":5509},{"style":1041},[5510],{"type":998,"value":5511},"(middle)",{"type":993,"tag":1026,"props":5513,"children":5514},{"style":1058},[5515],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5517,"children":5518},{"style":1226},[5519],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5521,"children":5522},{"style":1041},[5523],{"type":998,"value":1644},{"type":993,"tag":1541,"props":5525,"children":5527},{"id":5526},"swapping-variables",[5528],{"type":998,"value":5529},"Swapping Variables",{"type":993,"tag":1012,"props":5531,"children":5532},{},[5533],{"type":993,"tag":1016,"props":5534,"children":5536},{"className":1018,"code":5535,"language":6,"meta":8,"style":8},"# Swapping variables\na = 10\nb = 20\nprint(f\"Before swap: a={a}, b={b}\")\n\na, b = b, a\nprint(f\"After swap: a={a}, b={b}\")\n",[5537],{"type":993,"tag":1022,"props":5538,"children":5539},{"__ignoreMap":8},[5540,5548,5565,5582,5641,5648,5665],{"type":993,"tag":1026,"props":5541,"children":5542},{"class":1028,"line":12},[5543],{"type":993,"tag":1026,"props":5544,"children":5545},{"style":1032},[5546],{"type":998,"value":5547},"# Swapping variables\n",{"type":993,"tag":1026,"props":5549,"children":5550},{"class":1028,"line":27},[5551,5556,5560],{"type":993,"tag":1026,"props":5552,"children":5553},{"style":1041},[5554],{"type":998,"value":5555},"a ",{"type":993,"tag":1026,"props":5557,"children":5558},{"style":1047},[5559],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5561,"children":5562},{"style":1058},[5563],{"type":998,"value":5564}," 10\n",{"type":993,"tag":1026,"props":5566,"children":5567},{"class":1028,"line":36},[5568,5573,5577],{"type":993,"tag":1026,"props":5569,"children":5570},{"style":1041},[5571],{"type":998,"value":5572},"b ",{"type":993,"tag":1026,"props":5574,"children":5575},{"style":1047},[5576],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5578,"children":5579},{"style":1058},[5580],{"type":998,"value":5581}," 20\n",{"type":993,"tag":1026,"props":5583,"children":5584},{"class":1028,"line":45},[5585,5589,5593,5597,5602,5606,5611,5615,5620,5624,5629,5633,5637],{"type":993,"tag":1026,"props":5586,"children":5587},{"style":1058},[5588],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5590,"children":5591},{"style":1041},[5592],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5594,"children":5595},{"style":1047},[5596],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5598,"children":5599},{"style":1226},[5600],{"type":998,"value":5601},"\"Before swap: a=",{"type":993,"tag":1026,"props":5603,"children":5604},{"style":1058},[5605],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5607,"children":5608},{"style":1041},[5609],{"type":998,"value":5610},"a",{"type":993,"tag":1026,"props":5612,"children":5613},{"style":1058},[5614],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5616,"children":5617},{"style":1226},[5618],{"type":998,"value":5619},", b=",{"type":993,"tag":1026,"props":5621,"children":5622},{"style":1058},[5623],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5625,"children":5626},{"style":1041},[5627],{"type":998,"value":5628},"b",{"type":993,"tag":1026,"props":5630,"children":5631},{"style":1058},[5632],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5634,"children":5635},{"style":1226},[5636],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5638,"children":5639},{"style":1041},[5640],{"type":998,"value":1644},{"type":993,"tag":1026,"props":5642,"children":5643},{"class":1028,"line":54},[5644],{"type":993,"tag":1026,"props":5645,"children":5646},{"emptyLinePlaceholder":13},[5647],{"type":998,"value":1156},{"type":993,"tag":1026,"props":5649,"children":5650},{"class":1028,"line":63},[5651,5656,5660],{"type":993,"tag":1026,"props":5652,"children":5653},{"style":1041},[5654],{"type":998,"value":5655},"a, b ",{"type":993,"tag":1026,"props":5657,"children":5658},{"style":1047},[5659],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5661,"children":5662},{"style":1041},[5663],{"type":998,"value":5664}," b, a\n",{"type":993,"tag":1026,"props":5666,"children":5667},{"class":1028,"line":72},[5668,5672,5676,5680,5685,5689,5693,5697,5701,5705,5709,5713,5717],{"type":993,"tag":1026,"props":5669,"children":5670},{"style":1058},[5671],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5673,"children":5674},{"style":1041},[5675],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5677,"children":5678},{"style":1047},[5679],{"type":998,"value":4669},{"type":993,"tag":1026,"props":5681,"children":5682},{"style":1226},[5683],{"type":998,"value":5684},"\"After swap: a=",{"type":993,"tag":1026,"props":5686,"children":5687},{"style":1058},[5688],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5690,"children":5691},{"style":1041},[5692],{"type":998,"value":5610},{"type":993,"tag":1026,"props":5694,"children":5695},{"style":1058},[5696],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5698,"children":5699},{"style":1226},[5700],{"type":998,"value":5619},{"type":993,"tag":1026,"props":5702,"children":5703},{"style":1058},[5704],{"type":998,"value":4679},{"type":993,"tag":1026,"props":5706,"children":5707},{"style":1041},[5708],{"type":998,"value":5628},{"type":993,"tag":1026,"props":5710,"children":5711},{"style":1058},[5712],{"type":998,"value":4689},{"type":993,"tag":1026,"props":5714,"children":5715},{"style":1226},[5716],{"type":998,"value":4674},{"type":993,"tag":1026,"props":5718,"children":5719},{"style":1041},[5720],{"type":998,"value":1644},{"type":993,"tag":1447,"props":5722,"children":5724},{"id":5723},"nested-list-comprehensions",[5725],{"type":998,"value":5726},"🌐 Nested List Comprehensions",{"type":993,"tag":1001,"props":5728,"children":5729},{},[5730],{"type":998,"value":5731},"For complex data structures like matrices or lists of lists, you can use nested list comprehensions to create and manipulate multi-dimensional data.",{"type":993,"tag":1541,"props":5733,"children":5735},{"id":5734},"creating-matrices",[5736],{"type":998,"value":5737},"Creating Matrices",{"type":993,"tag":1012,"props":5739,"children":5740},{},[5741],{"type":993,"tag":1016,"props":5742,"children":5744},{"className":1018,"code":5743,"language":6,"meta":8,"style":8},"# Create a matrix using nested comprehensions\nmatrix = [[i * j for j in range(1, 4)] for i in range(1, 4)]\nprint(\"Multiplication matrix:\")\nfor row in matrix:\n    print(row)\n",[5745],{"type":993,"tag":1022,"props":5746,"children":5747},{"__ignoreMap":8},[5748,5756,5856,5876,5897],{"type":993,"tag":1026,"props":5749,"children":5750},{"class":1028,"line":12},[5751],{"type":993,"tag":1026,"props":5752,"children":5753},{"style":1032},[5754],{"type":998,"value":5755},"# Create a matrix using nested comprehensions\n",{"type":993,"tag":1026,"props":5757,"children":5758},{"class":1028,"line":27},[5759,5764,5768,5773,5777,5782,5786,5790,5794,5798,5802,5806,5810,5814,5819,5823,5828,5832,5836,5840,5844,5848,5852],{"type":993,"tag":1026,"props":5760,"children":5761},{"style":1041},[5762],{"type":998,"value":5763},"matrix ",{"type":993,"tag":1026,"props":5765,"children":5766},{"style":1047},[5767],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5769,"children":5770},{"style":1041},[5771],{"type":998,"value":5772}," [[i ",{"type":993,"tag":1026,"props":5774,"children":5775},{"style":1047},[5776],{"type":998,"value":1984},{"type":993,"tag":1026,"props":5778,"children":5779},{"style":1041},[5780],{"type":998,"value":5781}," j ",{"type":993,"tag":1026,"props":5783,"children":5784},{"style":1047},[5785],{"type":998,"value":1589},{"type":993,"tag":1026,"props":5787,"children":5788},{"style":1041},[5789],{"type":998,"value":5781},{"type":993,"tag":1026,"props":5791,"children":5792},{"style":1047},[5793],{"type":998,"value":1205},{"type":993,"tag":1026,"props":5795,"children":5796},{"style":1058},[5797],{"type":998,"value":1602},{"type":993,"tag":1026,"props":5799,"children":5800},{"style":1041},[5801],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5803,"children":5804},{"style":1058},[5805],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5807,"children":5808},{"style":1041},[5809],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5811,"children":5812},{"style":1058},[5813],{"type":998,"value":1089},{"type":993,"tag":1026,"props":5815,"children":5816},{"style":1041},[5817],{"type":998,"value":5818},")] ",{"type":993,"tag":1026,"props":5820,"children":5821},{"style":1047},[5822],{"type":998,"value":1589},{"type":993,"tag":1026,"props":5824,"children":5825},{"style":1041},[5826],{"type":998,"value":5827}," i ",{"type":993,"tag":1026,"props":5829,"children":5830},{"style":1047},[5831],{"type":998,"value":1205},{"type":993,"tag":1026,"props":5833,"children":5834},{"style":1058},[5835],{"type":998,"value":1602},{"type":993,"tag":1026,"props":5837,"children":5838},{"style":1041},[5839],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5841,"children":5842},{"style":1058},[5843],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5845,"children":5846},{"style":1041},[5847],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5849,"children":5850},{"style":1058},[5851],{"type":998,"value":1089},{"type":993,"tag":1026,"props":5853,"children":5854},{"style":1041},[5855],{"type":998,"value":1741},{"type":993,"tag":1026,"props":5857,"children":5858},{"class":1028,"line":36},[5859,5863,5867,5872],{"type":993,"tag":1026,"props":5860,"children":5861},{"style":1058},[5862],{"type":998,"value":1218},{"type":993,"tag":1026,"props":5864,"children":5865},{"style":1041},[5866],{"type":998,"value":1223},{"type":993,"tag":1026,"props":5868,"children":5869},{"style":1226},[5870],{"type":998,"value":5871},"\"Multiplication matrix:\"",{"type":993,"tag":1026,"props":5873,"children":5874},{"style":1041},[5875],{"type":998,"value":1644},{"type":993,"tag":1026,"props":5877,"children":5878},{"class":1028,"line":45},[5879,5883,5888,5892],{"type":993,"tag":1026,"props":5880,"children":5881},{"style":1047},[5882],{"type":998,"value":1589},{"type":993,"tag":1026,"props":5884,"children":5885},{"style":1041},[5886],{"type":998,"value":5887}," row ",{"type":993,"tag":1026,"props":5889,"children":5890},{"style":1047},[5891],{"type":998,"value":1205},{"type":993,"tag":1026,"props":5893,"children":5894},{"style":1041},[5895],{"type":998,"value":5896}," matrix:\n",{"type":993,"tag":1026,"props":5898,"children":5899},{"class":1028,"line":54},[5900,5904],{"type":993,"tag":1026,"props":5901,"children":5902},{"style":1058},[5903],{"type":998,"value":4660},{"type":993,"tag":1026,"props":5905,"children":5906},{"style":1041},[5907],{"type":998,"value":5908},"(row)\n",{"type":993,"tag":1541,"props":5910,"children":5912},{"id":5911},"flattening-nested-lists",[5913],{"type":998,"value":5914},"Flattening Nested Lists",{"type":993,"tag":1012,"props":5916,"children":5917},{},[5918],{"type":993,"tag":1016,"props":5919,"children":5921},{"className":1018,"code":5920,"language":6,"meta":8,"style":8},"# Flatten nested lists\nnested_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\nflattened = [item for sublist in nested_list for item in sublist]\nprint(\"Nested list:\", nested_list)\nprint(\"Flattened:\", flattened)\n",[5922],{"type":993,"tag":1022,"props":5923,"children":5924},{"__ignoreMap":8},[5925,5933,6024,6077,6098],{"type":993,"tag":1026,"props":5926,"children":5927},{"class":1028,"line":12},[5928],{"type":993,"tag":1026,"props":5929,"children":5930},{"style":1032},[5931],{"type":998,"value":5932},"# Flatten nested lists\n",{"type":993,"tag":1026,"props":5934,"children":5935},{"class":1028,"line":27},[5936,5941,5945,5950,5954,5958,5962,5966,5970,5975,5979,5983,5987,5991,5995,5999,6003,6007,6011,6015,6019],{"type":993,"tag":1026,"props":5937,"children":5938},{"style":1041},[5939],{"type":998,"value":5940},"nested_list ",{"type":993,"tag":1026,"props":5942,"children":5943},{"style":1047},[5944],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5946,"children":5947},{"style":1041},[5948],{"type":998,"value":5949}," [[",{"type":993,"tag":1026,"props":5951,"children":5952},{"style":1058},[5953],{"type":998,"value":1061},{"type":993,"tag":1026,"props":5955,"children":5956},{"style":1041},[5957],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5959,"children":5960},{"style":1058},[5961],{"type":998,"value":1071},{"type":993,"tag":1026,"props":5963,"children":5964},{"style":1041},[5965],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5967,"children":5968},{"style":1058},[5969],{"type":998,"value":1080},{"type":993,"tag":1026,"props":5971,"children":5972},{"style":1041},[5973],{"type":998,"value":5974},"], [",{"type":993,"tag":1026,"props":5976,"children":5977},{"style":1058},[5978],{"type":998,"value":1089},{"type":993,"tag":1026,"props":5980,"children":5981},{"style":1041},[5982],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5984,"children":5985},{"style":1058},[5986],{"type":998,"value":1098},{"type":993,"tag":1026,"props":5988,"children":5989},{"style":1041},[5990],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5992,"children":5993},{"style":1058},[5994],{"type":998,"value":1107},{"type":993,"tag":1026,"props":5996,"children":5997},{"style":1041},[5998],{"type":998,"value":5974},{"type":993,"tag":1026,"props":6000,"children":6001},{"style":1058},[6002],{"type":998,"value":1116},{"type":993,"tag":1026,"props":6004,"children":6005},{"style":1041},[6006],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6008,"children":6009},{"style":1058},[6010],{"type":998,"value":1125},{"type":993,"tag":1026,"props":6012,"children":6013},{"style":1041},[6014],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6016,"children":6017},{"style":1058},[6018],{"type":998,"value":1134},{"type":993,"tag":1026,"props":6020,"children":6021},{"style":1041},[6022],{"type":998,"value":6023},"]]\n",{"type":993,"tag":1026,"props":6025,"children":6026},{"class":1028,"line":36},[6027,6032,6036,6041,6045,6050,6054,6059,6063,6068,6072],{"type":993,"tag":1026,"props":6028,"children":6029},{"style":1041},[6030],{"type":998,"value":6031},"flattened ",{"type":993,"tag":1026,"props":6033,"children":6034},{"style":1047},[6035],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6037,"children":6038},{"style":1041},[6039],{"type":998,"value":6040}," [item ",{"type":993,"tag":1026,"props":6042,"children":6043},{"style":1047},[6044],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6046,"children":6047},{"style":1041},[6048],{"type":998,"value":6049}," sublist ",{"type":993,"tag":1026,"props":6051,"children":6052},{"style":1047},[6053],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6055,"children":6056},{"style":1041},[6057],{"type":998,"value":6058}," nested_list ",{"type":993,"tag":1026,"props":6060,"children":6061},{"style":1047},[6062],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6064,"children":6065},{"style":1041},[6066],{"type":998,"value":6067}," item ",{"type":993,"tag":1026,"props":6069,"children":6070},{"style":1047},[6071],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6073,"children":6074},{"style":1041},[6075],{"type":998,"value":6076}," sublist]\n",{"type":993,"tag":1026,"props":6078,"children":6079},{"class":1028,"line":45},[6080,6084,6088,6093],{"type":993,"tag":1026,"props":6081,"children":6082},{"style":1058},[6083],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6085,"children":6086},{"style":1041},[6087],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6089,"children":6090},{"style":1226},[6091],{"type":998,"value":6092},"\"Nested list:\"",{"type":993,"tag":1026,"props":6094,"children":6095},{"style":1041},[6096],{"type":998,"value":6097},", nested_list)\n",{"type":993,"tag":1026,"props":6099,"children":6100},{"class":1028,"line":54},[6101,6105,6109,6114],{"type":993,"tag":1026,"props":6102,"children":6103},{"style":1058},[6104],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6106,"children":6107},{"style":1041},[6108],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6110,"children":6111},{"style":1226},[6112],{"type":998,"value":6113},"\"Flattened:\"",{"type":993,"tag":1026,"props":6115,"children":6116},{"style":1041},[6117],{"type":998,"value":6118},", flattened)\n",{"type":993,"tag":6120,"props":6121,"children":6124},"exercise",{"hint":6122,"prompt":6123},"Use a list comprehension with a condition that checks if a number has no divisors other than 1 and itself","Create a function that uses list comprehension to find all prime numbers between 1 and 50. A prime number is only divisible by 1 and itself.",[6125],{"type":993,"tag":1016,"props":6126,"children":6128},{"className":1018,"code":6127,"language":6,"meta":8,"style":8},"def find_primes(limit):\n    # TODO: Use list comprehension to find prime numbers\n    # A number is prime if it's only divisible by 1 and itself\n    # Hint: Use all() to check if no numbers from 2 to sqrt(n) divide n\n    # TODO: Your code here\n    return primes\n\n# Test the function\nprimes = find_primes(50)\nprint(\"Prime numbers from 1 to 50:\", primes)\nprint(\"Count of primes:\", len(primes))\n",[6129],{"type":993,"tag":1022,"props":6130,"children":6131},{"__ignoreMap":8},[6132,6151,6169,6177,6185,6201,6214,6221,6229,6254,6275],{"type":993,"tag":1026,"props":6133,"children":6134},{"class":1028,"line":12},[6135,6140,6146],{"type":993,"tag":1026,"props":6136,"children":6137},{"style":1047},[6138],{"type":998,"value":6139},"def",{"type":993,"tag":1026,"props":6141,"children":6143},{"style":6142},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[6144],{"type":998,"value":6145}," find_primes",{"type":993,"tag":1026,"props":6147,"children":6148},{"style":1041},[6149],{"type":998,"value":6150},"(limit):\n",{"type":993,"tag":1026,"props":6152,"children":6153},{"class":1028,"line":27},[6154,6159,6164],{"type":993,"tag":1026,"props":6155,"children":6156},{"style":1032},[6157],{"type":998,"value":6158},"    # ",{"type":993,"tag":1026,"props":6160,"children":6161},{"style":1047},[6162],{"type":998,"value":6163},"TODO",{"type":993,"tag":1026,"props":6165,"children":6166},{"style":1032},[6167],{"type":998,"value":6168},": Use list comprehension to find prime numbers\n",{"type":993,"tag":1026,"props":6170,"children":6171},{"class":1028,"line":36},[6172],{"type":993,"tag":1026,"props":6173,"children":6174},{"style":1032},[6175],{"type":998,"value":6176},"    # A number is prime if it's only divisible by 1 and itself\n",{"type":993,"tag":1026,"props":6178,"children":6179},{"class":1028,"line":45},[6180],{"type":993,"tag":1026,"props":6181,"children":6182},{"style":1032},[6183],{"type":998,"value":6184},"    # Hint: Use all() to check if no numbers from 2 to sqrt(n) divide n\n",{"type":993,"tag":1026,"props":6186,"children":6187},{"class":1028,"line":54},[6188,6192,6196],{"type":993,"tag":1026,"props":6189,"children":6190},{"style":1032},[6191],{"type":998,"value":6158},{"type":993,"tag":1026,"props":6193,"children":6194},{"style":1047},[6195],{"type":998,"value":6163},{"type":993,"tag":1026,"props":6197,"children":6198},{"style":1032},[6199],{"type":998,"value":6200},": Your code here\n",{"type":993,"tag":1026,"props":6202,"children":6203},{"class":1028,"line":63},[6204,6209],{"type":993,"tag":1026,"props":6205,"children":6206},{"style":1047},[6207],{"type":998,"value":6208},"    return",{"type":993,"tag":1026,"props":6210,"children":6211},{"style":1041},[6212],{"type":998,"value":6213}," primes\n",{"type":993,"tag":1026,"props":6215,"children":6216},{"class":1028,"line":72},[6217],{"type":993,"tag":1026,"props":6218,"children":6219},{"emptyLinePlaceholder":13},[6220],{"type":998,"value":1156},{"type":993,"tag":1026,"props":6222,"children":6223},{"class":1028,"line":81},[6224],{"type":993,"tag":1026,"props":6225,"children":6226},{"style":1032},[6227],{"type":998,"value":6228},"# Test the function\n",{"type":993,"tag":1026,"props":6230,"children":6231},{"class":1028,"line":91},[6232,6237,6241,6246,6250],{"type":993,"tag":1026,"props":6233,"children":6234},{"style":1041},[6235],{"type":998,"value":6236},"primes ",{"type":993,"tag":1026,"props":6238,"children":6239},{"style":1047},[6240],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6242,"children":6243},{"style":1041},[6244],{"type":998,"value":6245}," find_primes(",{"type":993,"tag":1026,"props":6247,"children":6248},{"style":1058},[6249],{"type":998,"value":3329},{"type":993,"tag":1026,"props":6251,"children":6252},{"style":1041},[6253],{"type":998,"value":1644},{"type":993,"tag":1026,"props":6255,"children":6256},{"class":1028,"line":100},[6257,6261,6265,6270],{"type":993,"tag":1026,"props":6258,"children":6259},{"style":1058},[6260],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6262,"children":6263},{"style":1041},[6264],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6266,"children":6267},{"style":1226},[6268],{"type":998,"value":6269},"\"Prime numbers from 1 to 50:\"",{"type":993,"tag":1026,"props":6271,"children":6272},{"style":1041},[6273],{"type":998,"value":6274},", primes)\n",{"type":993,"tag":1026,"props":6276,"children":6277},{"class":1028,"line":109},[6278,6282,6286,6291,6295,6299],{"type":993,"tag":1026,"props":6279,"children":6280},{"style":1058},[6281],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6283,"children":6284},{"style":1041},[6285],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6287,"children":6288},{"style":1226},[6289],{"type":998,"value":6290},"\"Count of primes:\"",{"type":993,"tag":1026,"props":6292,"children":6293},{"style":1041},[6294],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6296,"children":6297},{"style":1058},[6298],{"type":998,"value":1441},{"type":993,"tag":1026,"props":6300,"children":6301},{"style":1041},[6302],{"type":998,"value":6303},"(primes))\n",{"type":993,"tag":1541,"props":6305,"children":6307},{"id":6306},"solution-and-explanation",[6308],{"type":998,"value":6309},"Solution and Explanation 💡",{"type":993,"tag":6311,"props":6312,"children":6313},"details",{},[6314,6322,6609,6617],{"type":993,"tag":6315,"props":6316,"children":6319},"summary",{"className":6317},[6318],"cursor-pointer",[6320],{"type":998,"value":6321},"Click to see the complete solution",{"type":993,"tag":1012,"props":6323,"children":6324},{},[6325],{"type":993,"tag":1016,"props":6326,"children":6328},{"className":1018,"code":6327,"language":6,"meta":8,"style":8},"def find_primes(limit):\n    # Use list comprehension to find prime numbers\n    primes = [n for n in range(2, limit + 1) \n              if all(n % i != 0 for i in range(2, int(n**0.5) + 1))]\n    return primes\n\n# Test the function\nprimes = find_primes(50)\nprint(\"Prime numbers from 1 to 50:\", primes)\nprint(\"Count of primes:\", len(primes))\n",[6329],{"type":993,"tag":1022,"props":6330,"children":6331},{"__ignoreMap":8},[6332,6347,6355,6415,6515,6526,6533,6540,6563,6582],{"type":993,"tag":1026,"props":6333,"children":6334},{"class":1028,"line":12},[6335,6339,6343],{"type":993,"tag":1026,"props":6336,"children":6337},{"style":1047},[6338],{"type":998,"value":6139},{"type":993,"tag":1026,"props":6340,"children":6341},{"style":6142},[6342],{"type":998,"value":6145},{"type":993,"tag":1026,"props":6344,"children":6345},{"style":1041},[6346],{"type":998,"value":6150},{"type":993,"tag":1026,"props":6348,"children":6349},{"class":1028,"line":27},[6350],{"type":993,"tag":1026,"props":6351,"children":6352},{"style":1032},[6353],{"type":998,"value":6354},"    # Use list comprehension to find prime numbers\n",{"type":993,"tag":1026,"props":6356,"children":6357},{"class":1028,"line":36},[6358,6363,6367,6371,6375,6379,6383,6387,6391,6395,6400,6405,6410],{"type":993,"tag":1026,"props":6359,"children":6360},{"style":1041},[6361],{"type":998,"value":6362},"    primes ",{"type":993,"tag":1026,"props":6364,"children":6365},{"style":1047},[6366],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6368,"children":6369},{"style":1041},[6370],{"type":998,"value":1979},{"type":993,"tag":1026,"props":6372,"children":6373},{"style":1047},[6374],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6376,"children":6377},{"style":1041},[6378],{"type":998,"value":1998},{"type":993,"tag":1026,"props":6380,"children":6381},{"style":1047},[6382],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6384,"children":6385},{"style":1058},[6386],{"type":998,"value":1602},{"type":993,"tag":1026,"props":6388,"children":6389},{"style":1041},[6390],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6392,"children":6393},{"style":1058},[6394],{"type":998,"value":1071},{"type":993,"tag":1026,"props":6396,"children":6397},{"style":1041},[6398],{"type":998,"value":6399},", limit ",{"type":993,"tag":1026,"props":6401,"children":6402},{"style":1047},[6403],{"type":998,"value":6404},"+",{"type":993,"tag":1026,"props":6406,"children":6407},{"style":1058},[6408],{"type":998,"value":6409}," 1",{"type":993,"tag":1026,"props":6411,"children":6412},{"style":1041},[6413],{"type":998,"value":6414},") \n",{"type":993,"tag":1026,"props":6416,"children":6417},{"class":1028,"line":45},[6418,6423,6428,6433,6437,6441,6446,6450,6454,6458,6462,6466,6470,6474,6478,6483,6488,6492,6497,6502,6506,6510],{"type":993,"tag":1026,"props":6419,"children":6420},{"style":1047},[6421],{"type":998,"value":6422},"              if",{"type":993,"tag":1026,"props":6424,"children":6425},{"style":1058},[6426],{"type":998,"value":6427}," all",{"type":993,"tag":1026,"props":6429,"children":6430},{"style":1041},[6431],{"type":998,"value":6432},"(n ",{"type":993,"tag":1026,"props":6434,"children":6435},{"style":1047},[6436],{"type":998,"value":2340},{"type":993,"tag":1026,"props":6438,"children":6439},{"style":1041},[6440],{"type":998,"value":5827},{"type":993,"tag":1026,"props":6442,"children":6443},{"style":1047},[6444],{"type":998,"value":6445},"!=",{"type":993,"tag":1026,"props":6447,"children":6448},{"style":1058},[6449],{"type":998,"value":2354},{"type":993,"tag":1026,"props":6451,"children":6452},{"style":1047},[6453],{"type":998,"value":1195},{"type":993,"tag":1026,"props":6455,"children":6456},{"style":1041},[6457],{"type":998,"value":5827},{"type":993,"tag":1026,"props":6459,"children":6460},{"style":1047},[6461],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6463,"children":6464},{"style":1058},[6465],{"type":998,"value":1602},{"type":993,"tag":1026,"props":6467,"children":6468},{"style":1041},[6469],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6471,"children":6472},{"style":1058},[6473],{"type":998,"value":1071},{"type":993,"tag":1026,"props":6475,"children":6476},{"style":1041},[6477],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6479,"children":6480},{"style":1058},[6481],{"type":998,"value":6482},"int",{"type":993,"tag":1026,"props":6484,"children":6485},{"style":1041},[6486],{"type":998,"value":6487},"(n",{"type":993,"tag":1026,"props":6489,"children":6490},{"style":1047},[6491],{"type":998,"value":1186},{"type":993,"tag":1026,"props":6493,"children":6494},{"style":1058},[6495],{"type":998,"value":6496},"0.5",{"type":993,"tag":1026,"props":6498,"children":6499},{"style":1041},[6500],{"type":998,"value":6501},") ",{"type":993,"tag":1026,"props":6503,"children":6504},{"style":1047},[6505],{"type":998,"value":6404},{"type":993,"tag":1026,"props":6507,"children":6508},{"style":1058},[6509],{"type":998,"value":6409},{"type":993,"tag":1026,"props":6511,"children":6512},{"style":1041},[6513],{"type":998,"value":6514},"))]\n",{"type":993,"tag":1026,"props":6516,"children":6517},{"class":1028,"line":54},[6518,6522],{"type":993,"tag":1026,"props":6519,"children":6520},{"style":1047},[6521],{"type":998,"value":6208},{"type":993,"tag":1026,"props":6523,"children":6524},{"style":1041},[6525],{"type":998,"value":6213},{"type":993,"tag":1026,"props":6527,"children":6528},{"class":1028,"line":63},[6529],{"type":993,"tag":1026,"props":6530,"children":6531},{"emptyLinePlaceholder":13},[6532],{"type":998,"value":1156},{"type":993,"tag":1026,"props":6534,"children":6535},{"class":1028,"line":72},[6536],{"type":993,"tag":1026,"props":6537,"children":6538},{"style":1032},[6539],{"type":998,"value":6228},{"type":993,"tag":1026,"props":6541,"children":6542},{"class":1028,"line":81},[6543,6547,6551,6555,6559],{"type":993,"tag":1026,"props":6544,"children":6545},{"style":1041},[6546],{"type":998,"value":6236},{"type":993,"tag":1026,"props":6548,"children":6549},{"style":1047},[6550],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6552,"children":6553},{"style":1041},[6554],{"type":998,"value":6245},{"type":993,"tag":1026,"props":6556,"children":6557},{"style":1058},[6558],{"type":998,"value":3329},{"type":993,"tag":1026,"props":6560,"children":6561},{"style":1041},[6562],{"type":998,"value":1644},{"type":993,"tag":1026,"props":6564,"children":6565},{"class":1028,"line":91},[6566,6570,6574,6578],{"type":993,"tag":1026,"props":6567,"children":6568},{"style":1058},[6569],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6571,"children":6572},{"style":1041},[6573],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6575,"children":6576},{"style":1226},[6577],{"type":998,"value":6269},{"type":993,"tag":1026,"props":6579,"children":6580},{"style":1041},[6581],{"type":998,"value":6274},{"type":993,"tag":1026,"props":6583,"children":6584},{"class":1028,"line":100},[6585,6589,6593,6597,6601,6605],{"type":993,"tag":1026,"props":6586,"children":6587},{"style":1058},[6588],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6590,"children":6591},{"style":1041},[6592],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6594,"children":6595},{"style":1226},[6596],{"type":998,"value":6290},{"type":993,"tag":1026,"props":6598,"children":6599},{"style":1041},[6600],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6602,"children":6603},{"style":1058},[6604],{"type":998,"value":1441},{"type":993,"tag":1026,"props":6606,"children":6607},{"style":1041},[6608],{"type":998,"value":6303},{"type":993,"tag":1001,"props":6610,"children":6611},{},[6612],{"type":993,"tag":1469,"props":6613,"children":6614},{},[6615],{"type":998,"value":6616},"Key Learning Points:",{"type":993,"tag":1506,"props":6618,"children":6619},{},[6620,6632,6643,6654],{"type":993,"tag":1510,"props":6621,"children":6622},{},[6623,6625,6630],{"type":998,"value":6624},"📌 ",{"type":993,"tag":1469,"props":6626,"children":6627},{},[6628],{"type":998,"value":6629},"List comprehension",{"type":998,"value":6631},": Combine filtering and generation in one expression",{"type":993,"tag":1510,"props":6633,"children":6634},{},[6635,6636,6641],{"type":998,"value":6624},{"type":993,"tag":1469,"props":6637,"children":6638},{},[6639],{"type":998,"value":6640},"all() function",{"type":998,"value":6642},": Returns True if all conditions are met",{"type":993,"tag":1510,"props":6644,"children":6645},{},[6646,6647,6652],{"type":998,"value":6624},{"type":993,"tag":1469,"props":6648,"children":6649},{},[6650],{"type":998,"value":6651},"Prime logic",{"type":998,"value":6653},": Check divisibility only up to square root for efficiency",{"type":993,"tag":1510,"props":6655,"children":6656},{},[6657,6658,6663],{"type":998,"value":6624},{"type":993,"tag":1469,"props":6659,"children":6660},{},[6661],{"type":998,"value":6662},"Range usage",{"type":998,"value":6664},": Start from 2 (first prime) and check up to limit",{"type":993,"tag":1447,"props":6666,"children":6668},{"id":6667},"common-shortcut-patterns",[6669],{"type":998,"value":6670},"🎨 Common Shortcut Patterns",{"type":993,"tag":1541,"props":6672,"children":6674},{"id":6673},"data-transformation-pipeline",[6675],{"type":998,"value":6676},"Data Transformation Pipeline",{"type":993,"tag":1012,"props":6678,"children":6679},{},[6680],{"type":993,"tag":1016,"props":6681,"children":6683},{"className":1018,"code":6682,"language":6,"meta":8,"style":8},"# Data transformation pipeline\nraw_data = [\"  Alice  \", \"BOB\", \"charlie\", \"  DIANA  \"]\n\n# Clean, normalize, and filter in one comprehension\ncleaned_data = [name.strip().title() for name in raw_data if name.strip()]\nprint(\"Cleaned data:\", cleaned_data)\n",[6684],{"type":993,"tag":1022,"props":6685,"children":6686},{"__ignoreMap":8},[6687,6695,6747,6754,6762,6806],{"type":993,"tag":1026,"props":6688,"children":6689},{"class":1028,"line":12},[6690],{"type":993,"tag":1026,"props":6691,"children":6692},{"style":1032},[6693],{"type":998,"value":6694},"# Data transformation pipeline\n",{"type":993,"tag":1026,"props":6696,"children":6697},{"class":1028,"line":27},[6698,6703,6707,6711,6716,6720,6725,6729,6734,6738,6743],{"type":993,"tag":1026,"props":6699,"children":6700},{"style":1041},[6701],{"type":998,"value":6702},"raw_data ",{"type":993,"tag":1026,"props":6704,"children":6705},{"style":1047},[6706],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6708,"children":6709},{"style":1041},[6710],{"type":998,"value":1055},{"type":993,"tag":1026,"props":6712,"children":6713},{"style":1226},[6714],{"type":998,"value":6715},"\"  Alice  \"",{"type":993,"tag":1026,"props":6717,"children":6718},{"style":1041},[6719],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6721,"children":6722},{"style":1226},[6723],{"type":998,"value":6724},"\"BOB\"",{"type":993,"tag":1026,"props":6726,"children":6727},{"style":1041},[6728],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6730,"children":6731},{"style":1226},[6732],{"type":998,"value":6733},"\"charlie\"",{"type":993,"tag":1026,"props":6735,"children":6736},{"style":1041},[6737],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6739,"children":6740},{"style":1226},[6741],{"type":998,"value":6742},"\"  DIANA  \"",{"type":993,"tag":1026,"props":6744,"children":6745},{"style":1041},[6746],{"type":998,"value":1148},{"type":993,"tag":1026,"props":6748,"children":6749},{"class":1028,"line":36},[6750],{"type":993,"tag":1026,"props":6751,"children":6752},{"emptyLinePlaceholder":13},[6753],{"type":998,"value":1156},{"type":993,"tag":1026,"props":6755,"children":6756},{"class":1028,"line":45},[6757],{"type":993,"tag":1026,"props":6758,"children":6759},{"style":1032},[6760],{"type":998,"value":6761},"# Clean, normalize, and filter in one comprehension\n",{"type":993,"tag":1026,"props":6763,"children":6764},{"class":1028,"line":54},[6765,6770,6774,6779,6783,6788,6792,6797,6801],{"type":993,"tag":1026,"props":6766,"children":6767},{"style":1041},[6768],{"type":998,"value":6769},"cleaned_data ",{"type":993,"tag":1026,"props":6771,"children":6772},{"style":1047},[6773],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6775,"children":6776},{"style":1041},[6777],{"type":998,"value":6778}," [name.strip().title() ",{"type":993,"tag":1026,"props":6780,"children":6781},{"style":1047},[6782],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6784,"children":6785},{"style":1041},[6786],{"type":998,"value":6787}," name ",{"type":993,"tag":1026,"props":6789,"children":6790},{"style":1047},[6791],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6793,"children":6794},{"style":1041},[6795],{"type":998,"value":6796}," raw_data ",{"type":993,"tag":1026,"props":6798,"children":6799},{"style":1047},[6800],{"type":998,"value":2331},{"type":993,"tag":1026,"props":6802,"children":6803},{"style":1041},[6804],{"type":998,"value":6805}," name.strip()]\n",{"type":993,"tag":1026,"props":6807,"children":6808},{"class":1028,"line":63},[6809,6813,6817,6822],{"type":993,"tag":1026,"props":6810,"children":6811},{"style":1058},[6812],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6814,"children":6815},{"style":1041},[6816],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6818,"children":6819},{"style":1226},[6820],{"type":998,"value":6821},"\"Cleaned data:\"",{"type":993,"tag":1026,"props":6823,"children":6824},{"style":1041},[6825],{"type":998,"value":6826},", cleaned_data)\n",{"type":993,"tag":1541,"props":6828,"children":6830},{"id":6829},"quick-data-analysis",[6831],{"type":998,"value":6832},"Quick Data Analysis",{"type":993,"tag":1012,"props":6834,"children":6835},{},[6836],{"type":993,"tag":1016,"props":6837,"children":6839},{"className":1018,"code":6838,"language":6,"meta":8,"style":8},"# Quick data analysis\nsales_data = [1200, 1500, 980, 1800, 1350, 1600, 1100, 1750]\n\nprint(\"Sales Analysis:\")\nprint(f\"Total sales: ${sum(sales_data):,}\")\nprint(f\"Average: ${sum(sales_data)/len(sales_data):.2f}\")\nprint(f\"Best day: ${max(sales_data)}\")\nprint(f\"Worst day: ${min(sales_data)}\")\nprint(f\"Days above average: {len([s for s in sales_data if s > sum(sales_data)/len(sales_data)])}\")\n",[6840],{"type":993,"tag":1022,"props":6841,"children":6842},{"__ignoreMap":8},[6843,6851,6939,6946,6966,7013,7070,7111,7152],{"type":993,"tag":1026,"props":6844,"children":6845},{"class":1028,"line":12},[6846],{"type":993,"tag":1026,"props":6847,"children":6848},{"style":1032},[6849],{"type":998,"value":6850},"# Quick data analysis\n",{"type":993,"tag":1026,"props":6852,"children":6853},{"class":1028,"line":27},[6854,6859,6863,6867,6872,6876,6881,6885,6890,6894,6899,6903,6908,6912,6917,6921,6926,6930,6935],{"type":993,"tag":1026,"props":6855,"children":6856},{"style":1041},[6857],{"type":998,"value":6858},"sales_data ",{"type":993,"tag":1026,"props":6860,"children":6861},{"style":1047},[6862],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6864,"children":6865},{"style":1041},[6866],{"type":998,"value":1055},{"type":993,"tag":1026,"props":6868,"children":6869},{"style":1058},[6870],{"type":998,"value":6871},"1200",{"type":993,"tag":1026,"props":6873,"children":6874},{"style":1041},[6875],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6877,"children":6878},{"style":1058},[6879],{"type":998,"value":6880},"1500",{"type":993,"tag":1026,"props":6882,"children":6883},{"style":1041},[6884],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6886,"children":6887},{"style":1058},[6888],{"type":998,"value":6889},"980",{"type":993,"tag":1026,"props":6891,"children":6892},{"style":1041},[6893],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6895,"children":6896},{"style":1058},[6897],{"type":998,"value":6898},"1800",{"type":993,"tag":1026,"props":6900,"children":6901},{"style":1041},[6902],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6904,"children":6905},{"style":1058},[6906],{"type":998,"value":6907},"1350",{"type":993,"tag":1026,"props":6909,"children":6910},{"style":1041},[6911],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6913,"children":6914},{"style":1058},[6915],{"type":998,"value":6916},"1600",{"type":993,"tag":1026,"props":6918,"children":6919},{"style":1041},[6920],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6922,"children":6923},{"style":1058},[6924],{"type":998,"value":6925},"1100",{"type":993,"tag":1026,"props":6927,"children":6928},{"style":1041},[6929],{"type":998,"value":1066},{"type":993,"tag":1026,"props":6931,"children":6932},{"style":1058},[6933],{"type":998,"value":6934},"1750",{"type":993,"tag":1026,"props":6936,"children":6937},{"style":1041},[6938],{"type":998,"value":1148},{"type":993,"tag":1026,"props":6940,"children":6941},{"class":1028,"line":36},[6942],{"type":993,"tag":1026,"props":6943,"children":6944},{"emptyLinePlaceholder":13},[6945],{"type":998,"value":1156},{"type":993,"tag":1026,"props":6947,"children":6948},{"class":1028,"line":45},[6949,6953,6957,6962],{"type":993,"tag":1026,"props":6950,"children":6951},{"style":1058},[6952],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6954,"children":6955},{"style":1041},[6956],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6958,"children":6959},{"style":1226},[6960],{"type":998,"value":6961},"\"Sales Analysis:\"",{"type":993,"tag":1026,"props":6963,"children":6964},{"style":1041},[6965],{"type":998,"value":1644},{"type":993,"tag":1026,"props":6967,"children":6968},{"class":1028,"line":54},[6969,6973,6977,6981,6986,6991,6996,7001,7005,7009],{"type":993,"tag":1026,"props":6970,"children":6971},{"style":1058},[6972],{"type":998,"value":1218},{"type":993,"tag":1026,"props":6974,"children":6975},{"style":1041},[6976],{"type":998,"value":1223},{"type":993,"tag":1026,"props":6978,"children":6979},{"style":1047},[6980],{"type":998,"value":4669},{"type":993,"tag":1026,"props":6982,"children":6983},{"style":1226},[6984],{"type":998,"value":6985},"\"Total sales: $",{"type":993,"tag":1026,"props":6987,"children":6988},{"style":1058},[6989],{"type":998,"value":6990},"{sum",{"type":993,"tag":1026,"props":6992,"children":6993},{"style":1041},[6994],{"type":998,"value":6995},"(sales_data)",{"type":993,"tag":1026,"props":6997,"children":6998},{"style":1047},[6999],{"type":998,"value":7000},":,",{"type":993,"tag":1026,"props":7002,"children":7003},{"style":1058},[7004],{"type":998,"value":4689},{"type":993,"tag":1026,"props":7006,"children":7007},{"style":1226},[7008],{"type":998,"value":4674},{"type":993,"tag":1026,"props":7010,"children":7011},{"style":1041},[7012],{"type":998,"value":1644},{"type":993,"tag":1026,"props":7014,"children":7015},{"class":1028,"line":63},[7016,7020,7024,7028,7033,7037,7041,7045,7049,7053,7058,7062,7066],{"type":993,"tag":1026,"props":7017,"children":7018},{"style":1058},[7019],{"type":998,"value":1218},{"type":993,"tag":1026,"props":7021,"children":7022},{"style":1041},[7023],{"type":998,"value":1223},{"type":993,"tag":1026,"props":7025,"children":7026},{"style":1047},[7027],{"type":998,"value":4669},{"type":993,"tag":1026,"props":7029,"children":7030},{"style":1226},[7031],{"type":998,"value":7032},"\"Average: $",{"type":993,"tag":1026,"props":7034,"children":7035},{"style":1058},[7036],{"type":998,"value":6990},{"type":993,"tag":1026,"props":7038,"children":7039},{"style":1041},[7040],{"type":998,"value":6995},{"type":993,"tag":1026,"props":7042,"children":7043},{"style":1047},[7044],{"type":998,"value":4138},{"type":993,"tag":1026,"props":7046,"children":7047},{"style":1058},[7048],{"type":998,"value":1441},{"type":993,"tag":1026,"props":7050,"children":7051},{"style":1041},[7052],{"type":998,"value":6995},{"type":993,"tag":1026,"props":7054,"children":7055},{"style":1047},[7056],{"type":998,"value":7057},":.2f",{"type":993,"tag":1026,"props":7059,"children":7060},{"style":1058},[7061],{"type":998,"value":4689},{"type":993,"tag":1026,"props":7063,"children":7064},{"style":1226},[7065],{"type":998,"value":4674},{"type":993,"tag":1026,"props":7067,"children":7068},{"style":1041},[7069],{"type":998,"value":1644},{"type":993,"tag":1026,"props":7071,"children":7072},{"class":1028,"line":72},[7073,7077,7081,7085,7090,7095,7099,7103,7107],{"type":993,"tag":1026,"props":7074,"children":7075},{"style":1058},[7076],{"type":998,"value":1218},{"type":993,"tag":1026,"props":7078,"children":7079},{"style":1041},[7080],{"type":998,"value":1223},{"type":993,"tag":1026,"props":7082,"children":7083},{"style":1047},[7084],{"type":998,"value":4669},{"type":993,"tag":1026,"props":7086,"children":7087},{"style":1226},[7088],{"type":998,"value":7089},"\"Best day: $",{"type":993,"tag":1026,"props":7091,"children":7092},{"style":1058},[7093],{"type":998,"value":7094},"{max",{"type":993,"tag":1026,"props":7096,"children":7097},{"style":1041},[7098],{"type":998,"value":6995},{"type":993,"tag":1026,"props":7100,"children":7101},{"style":1058},[7102],{"type":998,"value":4689},{"type":993,"tag":1026,"props":7104,"children":7105},{"style":1226},[7106],{"type":998,"value":4674},{"type":993,"tag":1026,"props":7108,"children":7109},{"style":1041},[7110],{"type":998,"value":1644},{"type":993,"tag":1026,"props":7112,"children":7113},{"class":1028,"line":81},[7114,7118,7122,7126,7131,7136,7140,7144,7148],{"type":993,"tag":1026,"props":7115,"children":7116},{"style":1058},[7117],{"type":998,"value":1218},{"type":993,"tag":1026,"props":7119,"children":7120},{"style":1041},[7121],{"type":998,"value":1223},{"type":993,"tag":1026,"props":7123,"children":7124},{"style":1047},[7125],{"type":998,"value":4669},{"type":993,"tag":1026,"props":7127,"children":7128},{"style":1226},[7129],{"type":998,"value":7130},"\"Worst day: $",{"type":993,"tag":1026,"props":7132,"children":7133},{"style":1058},[7134],{"type":998,"value":7135},"{min",{"type":993,"tag":1026,"props":7137,"children":7138},{"style":1041},[7139],{"type":998,"value":6995},{"type":993,"tag":1026,"props":7141,"children":7142},{"style":1058},[7143],{"type":998,"value":4689},{"type":993,"tag":1026,"props":7145,"children":7146},{"style":1226},[7147],{"type":998,"value":4674},{"type":993,"tag":1026,"props":7149,"children":7150},{"style":1041},[7151],{"type":998,"value":1644},{"type":993,"tag":1026,"props":7153,"children":7154},{"class":1028,"line":91},[7155,7159,7163,7167,7172,7176,7181,7185,7190,7194,7199,7203,7207,7211,7216,7220,7224,7228,7233,7237,7241],{"type":993,"tag":1026,"props":7156,"children":7157},{"style":1058},[7158],{"type":998,"value":1218},{"type":993,"tag":1026,"props":7160,"children":7161},{"style":1041},[7162],{"type":998,"value":1223},{"type":993,"tag":1026,"props":7164,"children":7165},{"style":1047},[7166],{"type":998,"value":4669},{"type":993,"tag":1026,"props":7168,"children":7169},{"style":1226},[7170],{"type":998,"value":7171},"\"Days above average: ",{"type":993,"tag":1026,"props":7173,"children":7174},{"style":1058},[7175],{"type":998,"value":5506},{"type":993,"tag":1026,"props":7177,"children":7178},{"style":1041},[7179],{"type":998,"value":7180},"([s ",{"type":993,"tag":1026,"props":7182,"children":7183},{"style":1047},[7184],{"type":998,"value":1589},{"type":993,"tag":1026,"props":7186,"children":7187},{"style":1041},[7188],{"type":998,"value":7189}," s ",{"type":993,"tag":1026,"props":7191,"children":7192},{"style":1047},[7193],{"type":998,"value":1205},{"type":993,"tag":1026,"props":7195,"children":7196},{"style":1041},[7197],{"type":998,"value":7198}," sales_data ",{"type":993,"tag":1026,"props":7200,"children":7201},{"style":1047},[7202],{"type":998,"value":2331},{"type":993,"tag":1026,"props":7204,"children":7205},{"style":1041},[7206],{"type":998,"value":7189},{"type":993,"tag":1026,"props":7208,"children":7209},{"style":1047},[7210],{"type":998,"value":2727},{"type":993,"tag":1026,"props":7212,"children":7213},{"style":1058},[7214],{"type":998,"value":7215}," sum",{"type":993,"tag":1026,"props":7217,"children":7218},{"style":1041},[7219],{"type":998,"value":6995},{"type":993,"tag":1026,"props":7221,"children":7222},{"style":1047},[7223],{"type":998,"value":4138},{"type":993,"tag":1026,"props":7225,"children":7226},{"style":1058},[7227],{"type":998,"value":1441},{"type":993,"tag":1026,"props":7229,"children":7230},{"style":1041},[7231],{"type":998,"value":7232},"(sales_data)])",{"type":993,"tag":1026,"props":7234,"children":7235},{"style":1058},[7236],{"type":998,"value":4689},{"type":993,"tag":1026,"props":7238,"children":7239},{"style":1226},[7240],{"type":998,"value":4674},{"type":993,"tag":1026,"props":7242,"children":7243},{"style":1041},[7244],{"type":998,"value":1644},{"type":993,"tag":1459,"props":7246,"children":7249},{"emoji":7247,"title":7248,"type":2105},"⚡","List Shortcuts Best Practices",[7250,7258,7280,7288,7306,7314],{"type":993,"tag":1001,"props":7251,"children":7252},{},[7253],{"type":993,"tag":1469,"props":7254,"children":7255},{},[7256],{"type":998,"value":7257},"When to Use Shortcuts:",{"type":993,"tag":1506,"props":7259,"children":7260},{},[7261,7266,7271,7276],{"type":993,"tag":1510,"props":7262,"children":7263},{},[7264],{"type":998,"value":7265},"Simple transformations and filtering",{"type":993,"tag":1510,"props":7267,"children":7268},{},[7269],{"type":998,"value":7270},"Data analysis and statistics",{"type":993,"tag":1510,"props":7272,"children":7273},{},[7274],{"type":998,"value":7275},"Quick prototyping and exploration",{"type":993,"tag":1510,"props":7277,"children":7278},{},[7279],{"type":998,"value":1529},{"type":993,"tag":1001,"props":7281,"children":7282},{},[7283],{"type":993,"tag":1469,"props":7284,"children":7285},{},[7286],{"type":998,"value":7287},"When to Use Traditional Loops:",{"type":993,"tag":1506,"props":7289,"children":7290},{},[7291,7296,7301],{"type":993,"tag":1510,"props":7292,"children":7293},{},[7294],{"type":998,"value":7295},"Complex logic that's hard to read in comprehensions",{"type":993,"tag":1510,"props":7297,"children":7298},{},[7299],{"type":998,"value":7300},"Multiple operations that don't fit in one expression",{"type":993,"tag":1510,"props":7302,"children":7303},{},[7304],{"type":998,"value":7305},"When debugging is important",{"type":993,"tag":1001,"props":7307,"children":7308},{},[7309],{"type":993,"tag":1469,"props":7310,"children":7311},{},[7312],{"type":998,"value":7313},"Readability Guidelines:",{"type":993,"tag":1506,"props":7315,"children":7316},{},[7317,7322,7327,7332],{"type":993,"tag":1510,"props":7318,"children":7319},{},[7320],{"type":998,"value":7321},"Keep comprehensions simple and readable",{"type":993,"tag":1510,"props":7323,"children":7324},{},[7325],{"type":998,"value":7326},"Break complex operations into multiple steps",{"type":993,"tag":1510,"props":7328,"children":7329},{},[7330],{"type":998,"value":7331},"Use meaningful variable names",{"type":993,"tag":1510,"props":7333,"children":7334},{},[7335],{"type":998,"value":7336},"Comment complex comprehensions",{"type":993,"tag":1001,"props":7338,"children":7339},{},[7340,7342,7347],{"type":998,"value":7341},"Learn more about ",{"type":993,"tag":5610,"props":7343,"children":7344},{"href":243},[7345],{"type":998,"value":7346},"for loops",{"type":998,"value":7348}," to understand the foundation of list comprehensions and iteration patterns.",{"type":993,"tag":1447,"props":7350,"children":7352},{"id":7351},"test-your-knowledge",[7353],{"type":998,"value":7354},"Test Your Knowledge",{"type":993,"tag":1001,"props":7356,"children":7357},{},[7358],{"type":998,"value":7359},"Test what you've learned about Python list shortcuts:",{"type":993,"tag":7361,"props":7362,"children":7365},"redirect-button",{"label":7363,"url":7364},"Take Quiz","/tutorial-quiz/python/list-shortcuts",[],{"type":993,"tag":1447,"props":7367,"children":7369},{"id":7368},"whats-next",[7370],{"type":998,"value":7371},"What's Next?",{"type":993,"tag":1001,"props":7373,"children":7374},{},[7375],{"type":998,"value":7376},"Now that you've mastered list shortcuts and techniques, you're ready to learn about organizing lists. This includes sorting, reversing, and arranging list elements in various ways for better data presentation and analysis.",{"type":993,"tag":1001,"props":7378,"children":7379},{},[7380,7382,7386],{"type":998,"value":7381},"Ready to continue? Check out our lesson on ",{"type":993,"tag":5610,"props":7383,"children":7384},{"href":343},[7385],{"type":998,"value":344},{"type":998,"value":7387},".",{"type":993,"tag":7389,"props":7390,"children":7391},"style",{},[7392],{"type":998,"value":7393},"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":7395},[7396,7401,7407,7412,7417,7422,7427,7431,7432],{"id":1449,"depth":27,"text":1452,"children":7397},[7398,7399,7400],{"id":1543,"depth":36,"text":1546},{"id":1765,"depth":36,"text":1768},{"id":757,"depth":36,"text":755},{"id":2092,"depth":27,"text":2095,"children":7402},[7403,7404,7405,7406],{"id":2177,"depth":36,"text":2180},{"id":2382,"depth":36,"text":2385},{"id":2591,"depth":36,"text":2594},{"id":2759,"depth":36,"text":2762},{"id":2964,"depth":27,"text":2967,"children":7408},[7409,7410,7411],{"id":3061,"depth":36,"text":3064},{"id":3252,"depth":36,"text":3255},{"id":3497,"depth":36,"text":3500},{"id":3718,"depth":27,"text":3721,"children":7413},[7414,7415,7416],{"id":3876,"depth":36,"text":3879},{"id":4149,"depth":36,"text":4152},{"id":355,"depth":36,"text":353},{"id":4734,"depth":27,"text":4737,"children":7418},[7419,7420,7421],{"id":4836,"depth":36,"text":4839},{"id":5142,"depth":36,"text":5145},{"id":5526,"depth":36,"text":5529},{"id":5723,"depth":27,"text":5726,"children":7423},[7424,7425,7426],{"id":5734,"depth":36,"text":5737},{"id":5911,"depth":36,"text":5914},{"id":6306,"depth":36,"text":6309},{"id":6667,"depth":27,"text":6670,"children":7428},[7429,7430],{"id":6673,"depth":36,"text":6676},{"id":6829,"depth":36,"text":6832},{"id":7351,"depth":27,"text":7354},{"id":7368,"depth":27,"text":7371},1782373737385]