[{"data":1,"prerenderedAt":6327},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/organizing-lists":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",[342],{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":270,"order":347,"body":989,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},{"type":990,"children":991,"toc":6294},"root",[992,1000,1006,1011,1344,1351,1364,1464,1471,1615,1621,1747,1753,1907,1913,2053,2059,2071,2157,2163,2344,2350,2564,2569,2575,2580,2683,2689,2820,2826,2993,2999,3004,3104,3110,3349,3355,3617,3623,3842,3848,3853,3859,4262,4268,4687,4995,5001,5398,5404,5410,5569,5575,5758,5764,6143,6236,6249,6255,6260,6266,6272,6277,6288],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":346},[997],{"type":998,"value":999},"text","📊 Organizing Lists",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Organizing lists is essential for data management and presentation. Python provides powerful built-in methods to sort, reverse, and arrange list elements in various ways. Whether you need alphabetical order, numerical sorting, or custom arrangements, understanding these techniques will help you present data clearly and efficiently.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Proper list organization makes data easier to read, search, and process, which is crucial for data analysis and user interfaces.",{"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","# Basic list organization examples\nnumbers = [64, 34, 25, 12, 22, 11, 90]\nnames = [\"Charlie\", \"Alice\", \"Bob\", \"Diana\"]\n\nprint(\"Original numbers:\", numbers)\nprint(\"Sorted numbers:\", sorted(numbers))\n\nprint(\"Original names:\", names)\nprint(\"Sorted names:\", sorted(names))\n\n# Reverse a list\nprint(\"Reversed numbers:\", numbers[::-1])\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1122,1175,1183,1206,1236,1243,1264,1293,1300,1308],{"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},"# Basic list organization examples\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],{"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},"64",{"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},"34",{"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},"25",{"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},"12",{"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},"22",{"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},"11",{"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},"90",{"type":993,"tag":1026,"props":1118,"children":1119},{"style":1041},[1120],{"type":998,"value":1121},"]\n",{"type":993,"tag":1026,"props":1123,"children":1124},{"class":1028,"line":36},[1125,1130,1134,1138,1144,1148,1153,1157,1162,1166,1171],{"type":993,"tag":1026,"props":1126,"children":1127},{"style":1041},[1128],{"type":998,"value":1129},"names ",{"type":993,"tag":1026,"props":1131,"children":1132},{"style":1047},[1133],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1135,"children":1136},{"style":1041},[1137],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1139,"children":1141},{"style":1140},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1142],{"type":998,"value":1143},"\"Charlie\"",{"type":993,"tag":1026,"props":1145,"children":1146},{"style":1041},[1147],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1149,"children":1150},{"style":1140},[1151],{"type":998,"value":1152},"\"Alice\"",{"type":993,"tag":1026,"props":1154,"children":1155},{"style":1041},[1156],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1158,"children":1159},{"style":1140},[1160],{"type":998,"value":1161},"\"Bob\"",{"type":993,"tag":1026,"props":1163,"children":1164},{"style":1041},[1165],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1167,"children":1168},{"style":1140},[1169],{"type":998,"value":1170},"\"Diana\"",{"type":993,"tag":1026,"props":1172,"children":1173},{"style":1041},[1174],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1176,"children":1177},{"class":1028,"line":45},[1178],{"type":993,"tag":1026,"props":1179,"children":1180},{"emptyLinePlaceholder":13},[1181],{"type":998,"value":1182},"\n",{"type":993,"tag":1026,"props":1184,"children":1185},{"class":1028,"line":54},[1186,1191,1196,1201],{"type":993,"tag":1026,"props":1187,"children":1188},{"style":1058},[1189],{"type":998,"value":1190},"print",{"type":993,"tag":1026,"props":1192,"children":1193},{"style":1041},[1194],{"type":998,"value":1195},"(",{"type":993,"tag":1026,"props":1197,"children":1198},{"style":1140},[1199],{"type":998,"value":1200},"\"Original numbers:\"",{"type":993,"tag":1026,"props":1202,"children":1203},{"style":1041},[1204],{"type":998,"value":1205},", numbers)\n",{"type":993,"tag":1026,"props":1207,"children":1208},{"class":1028,"line":63},[1209,1213,1217,1222,1226,1231],{"type":993,"tag":1026,"props":1210,"children":1211},{"style":1058},[1212],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1214,"children":1215},{"style":1041},[1216],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1218,"children":1219},{"style":1140},[1220],{"type":998,"value":1221},"\"Sorted numbers:\"",{"type":993,"tag":1026,"props":1223,"children":1224},{"style":1041},[1225],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1227,"children":1228},{"style":1058},[1229],{"type":998,"value":1230},"sorted",{"type":993,"tag":1026,"props":1232,"children":1233},{"style":1041},[1234],{"type":998,"value":1235},"(numbers))\n",{"type":993,"tag":1026,"props":1237,"children":1238},{"class":1028,"line":72},[1239],{"type":993,"tag":1026,"props":1240,"children":1241},{"emptyLinePlaceholder":13},[1242],{"type":998,"value":1182},{"type":993,"tag":1026,"props":1244,"children":1245},{"class":1028,"line":81},[1246,1250,1254,1259],{"type":993,"tag":1026,"props":1247,"children":1248},{"style":1058},[1249],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1251,"children":1252},{"style":1041},[1253],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1255,"children":1256},{"style":1140},[1257],{"type":998,"value":1258},"\"Original names:\"",{"type":993,"tag":1026,"props":1260,"children":1261},{"style":1041},[1262],{"type":998,"value":1263},", names)\n",{"type":993,"tag":1026,"props":1265,"children":1266},{"class":1028,"line":91},[1267,1271,1275,1280,1284,1288],{"type":993,"tag":1026,"props":1268,"children":1269},{"style":1058},[1270],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1272,"children":1273},{"style":1041},[1274],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1276,"children":1277},{"style":1140},[1278],{"type":998,"value":1279},"\"Sorted names:\"",{"type":993,"tag":1026,"props":1281,"children":1282},{"style":1041},[1283],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1285,"children":1286},{"style":1058},[1287],{"type":998,"value":1230},{"type":993,"tag":1026,"props":1289,"children":1290},{"style":1041},[1291],{"type":998,"value":1292},"(names))\n",{"type":993,"tag":1026,"props":1294,"children":1295},{"class":1028,"line":100},[1296],{"type":993,"tag":1026,"props":1297,"children":1298},{"emptyLinePlaceholder":13},[1299],{"type":998,"value":1182},{"type":993,"tag":1026,"props":1301,"children":1302},{"class":1028,"line":109},[1303],{"type":993,"tag":1026,"props":1304,"children":1305},{"style":1032},[1306],{"type":998,"value":1307},"# Reverse a list\n",{"type":993,"tag":1026,"props":1309,"children":1310},{"class":1028,"line":118},[1311,1315,1319,1324,1329,1334,1339],{"type":993,"tag":1026,"props":1312,"children":1313},{"style":1058},[1314],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1316,"children":1317},{"style":1041},[1318],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1320,"children":1321},{"style":1140},[1322],{"type":998,"value":1323},"\"Reversed numbers:\"",{"type":993,"tag":1026,"props":1325,"children":1326},{"style":1041},[1327],{"type":998,"value":1328},", numbers[::",{"type":993,"tag":1026,"props":1330,"children":1331},{"style":1047},[1332],{"type":998,"value":1333},"-",{"type":993,"tag":1026,"props":1335,"children":1336},{"style":1058},[1337],{"type":998,"value":1338},"1",{"type":993,"tag":1026,"props":1340,"children":1341},{"style":1041},[1342],{"type":998,"value":1343},"])\n",{"type":993,"tag":1345,"props":1346,"children":1348},"h2",{"id":1347},"sorting-lists-with-sort",[1349],{"type":998,"value":1350},"🔢 Sorting Lists with sort()",{"type":993,"tag":1001,"props":1352,"children":1353},{},[1354,1356,1362],{"type":998,"value":1355},"The ",{"type":993,"tag":1022,"props":1357,"children":1359},{"className":1358},[],[1360],{"type":998,"value":1361},"sort()",{"type":998,"value":1363}," method sorts a list in place, meaning it modifies the original list. This method is efficient and convenient when you want to permanently change the list order.",{"type":993,"tag":1365,"props":1366,"children":1370},"info-box",{"emoji":1367,"title":1368,"type":1369},"🔢","sort() Method Characteristics","info",[1371,1380,1413,1421,1454],{"type":993,"tag":1001,"props":1372,"children":1373},{},[1374],{"type":993,"tag":1375,"props":1376,"children":1377},"strong",{},[1378],{"type":998,"value":1379},"Key Features:",{"type":993,"tag":1381,"props":1382,"children":1383},"ul",{},[1384,1390,1403,1408],{"type":993,"tag":1385,"props":1386,"children":1387},"li",{},[1388],{"type":998,"value":1389},"Modifies the original list (in-place sorting)",{"type":993,"tag":1385,"props":1391,"children":1392},{},[1393,1395,1401],{"type":998,"value":1394},"Returns ",{"type":993,"tag":1022,"props":1396,"children":1398},{"className":1397},[],[1399],{"type":998,"value":1400},"None",{"type":998,"value":1402}," (doesn't return a new list)",{"type":993,"tag":1385,"props":1404,"children":1405},{},[1406],{"type":998,"value":1407},"Sorts in ascending order by default",{"type":993,"tag":1385,"props":1409,"children":1410},{},[1411],{"type":998,"value":1412},"Stable sort (maintains relative order of equal elements)",{"type":993,"tag":1001,"props":1414,"children":1415},{},[1416],{"type":993,"tag":1375,"props":1417,"children":1418},{},[1419],{"type":998,"value":1420},"Parameters:",{"type":993,"tag":1381,"props":1422,"children":1423},{},[1424,1443],{"type":993,"tag":1385,"props":1425,"children":1426},{},[1427,1433,1435,1441],{"type":993,"tag":1022,"props":1428,"children":1430},{"className":1429},[],[1431],{"type":998,"value":1432},"reverse=False",{"type":998,"value":1434},": Set to ",{"type":993,"tag":1022,"props":1436,"children":1438},{"className":1437},[],[1439],{"type":998,"value":1440},"True",{"type":998,"value":1442}," for descending order",{"type":993,"tag":1385,"props":1444,"children":1445},{},[1446,1452],{"type":993,"tag":1022,"props":1447,"children":1449},{"className":1448},[],[1450],{"type":998,"value":1451},"key=None",{"type":998,"value":1453},": Function to customize sorting criteria",{"type":993,"tag":1001,"props":1455,"children":1456},{},[1457,1462],{"type":993,"tag":1375,"props":1458,"children":1459},{},[1460],{"type":998,"value":1461},"Performance:",{"type":998,"value":1463}," Very efficient, uses Timsort algorithm",{"type":993,"tag":1465,"props":1466,"children":1468},"h3",{"id":1467},"basic-sorting",[1469],{"type":998,"value":1470},"Basic Sorting",{"type":993,"tag":1012,"props":1472,"children":1473},{},[1474],{"type":993,"tag":1016,"props":1475,"children":1477},{"className":1018,"code":1476,"language":6,"meta":8,"style":8},"# Basic sorting with sort()\nnumbers = [64, 34, 25, 12, 22, 11, 90]\nprint(\"Original:\", numbers)\n\nnumbers.sort()\nprint(\"After sort():\", numbers)\n",[1478],{"type":993,"tag":1022,"props":1479,"children":1480},{"__ignoreMap":8},[1481,1489,1560,1580,1587,1595],{"type":993,"tag":1026,"props":1482,"children":1483},{"class":1028,"line":12},[1484],{"type":993,"tag":1026,"props":1485,"children":1486},{"style":1032},[1487],{"type":998,"value":1488},"# Basic sorting with sort()\n",{"type":993,"tag":1026,"props":1490,"children":1491},{"class":1028,"line":27},[1492,1496,1500,1504,1508,1512,1516,1520,1524,1528,1532,1536,1540,1544,1548,1552,1556],{"type":993,"tag":1026,"props":1493,"children":1494},{"style":1041},[1495],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1497,"children":1498},{"style":1047},[1499],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1501,"children":1502},{"style":1041},[1503],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1505,"children":1506},{"style":1058},[1507],{"type":998,"value":1061},{"type":993,"tag":1026,"props":1509,"children":1510},{"style":1041},[1511],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1513,"children":1514},{"style":1058},[1515],{"type":998,"value":1071},{"type":993,"tag":1026,"props":1517,"children":1518},{"style":1041},[1519],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1521,"children":1522},{"style":1058},[1523],{"type":998,"value":1080},{"type":993,"tag":1026,"props":1525,"children":1526},{"style":1041},[1527],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1529,"children":1530},{"style":1058},[1531],{"type":998,"value":1089},{"type":993,"tag":1026,"props":1533,"children":1534},{"style":1041},[1535],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1537,"children":1538},{"style":1058},[1539],{"type":998,"value":1098},{"type":993,"tag":1026,"props":1541,"children":1542},{"style":1041},[1543],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1545,"children":1546},{"style":1058},[1547],{"type":998,"value":1107},{"type":993,"tag":1026,"props":1549,"children":1550},{"style":1041},[1551],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1553,"children":1554},{"style":1058},[1555],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1557,"children":1558},{"style":1041},[1559],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1561,"children":1562},{"class":1028,"line":36},[1563,1567,1571,1576],{"type":993,"tag":1026,"props":1564,"children":1565},{"style":1058},[1566],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1568,"children":1569},{"style":1041},[1570],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1572,"children":1573},{"style":1140},[1574],{"type":998,"value":1575},"\"Original:\"",{"type":993,"tag":1026,"props":1577,"children":1578},{"style":1041},[1579],{"type":998,"value":1205},{"type":993,"tag":1026,"props":1581,"children":1582},{"class":1028,"line":45},[1583],{"type":993,"tag":1026,"props":1584,"children":1585},{"emptyLinePlaceholder":13},[1586],{"type":998,"value":1182},{"type":993,"tag":1026,"props":1588,"children":1589},{"class":1028,"line":54},[1590],{"type":993,"tag":1026,"props":1591,"children":1592},{"style":1041},[1593],{"type":998,"value":1594},"numbers.sort()\n",{"type":993,"tag":1026,"props":1596,"children":1597},{"class":1028,"line":63},[1598,1602,1606,1611],{"type":993,"tag":1026,"props":1599,"children":1600},{"style":1058},[1601],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1603,"children":1604},{"style":1041},[1605],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1607,"children":1608},{"style":1140},[1609],{"type":998,"value":1610},"\"After sort():\"",{"type":993,"tag":1026,"props":1612,"children":1613},{"style":1041},[1614],{"type":998,"value":1205},{"type":993,"tag":1465,"props":1616,"children":1618},{"id":1617},"sorting-strings",[1619],{"type":998,"value":1620},"Sorting Strings",{"type":993,"tag":1012,"props":1622,"children":1623},{},[1624],{"type":993,"tag":1016,"props":1625,"children":1627},{"className":1018,"code":1626,"language":6,"meta":8,"style":8},"# Sorting strings alphabetically\nfruits = [\"banana\", \"apple\", \"cherry\", \"date\"]\nprint(\"Original fruits:\", fruits)\n\nfruits.sort()\nprint(\"Sorted fruits:\", fruits)\n",[1628],{"type":993,"tag":1022,"props":1629,"children":1630},{"__ignoreMap":8},[1631,1639,1691,1712,1719,1727],{"type":993,"tag":1026,"props":1632,"children":1633},{"class":1028,"line":12},[1634],{"type":993,"tag":1026,"props":1635,"children":1636},{"style":1032},[1637],{"type":998,"value":1638},"# Sorting strings alphabetically\n",{"type":993,"tag":1026,"props":1640,"children":1641},{"class":1028,"line":27},[1642,1647,1651,1655,1660,1664,1669,1673,1678,1682,1687],{"type":993,"tag":1026,"props":1643,"children":1644},{"style":1041},[1645],{"type":998,"value":1646},"fruits ",{"type":993,"tag":1026,"props":1648,"children":1649},{"style":1047},[1650],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1652,"children":1653},{"style":1041},[1654],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1656,"children":1657},{"style":1140},[1658],{"type":998,"value":1659},"\"banana\"",{"type":993,"tag":1026,"props":1661,"children":1662},{"style":1041},[1663],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1665,"children":1666},{"style":1140},[1667],{"type":998,"value":1668},"\"apple\"",{"type":993,"tag":1026,"props":1670,"children":1671},{"style":1041},[1672],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1674,"children":1675},{"style":1140},[1676],{"type":998,"value":1677},"\"cherry\"",{"type":993,"tag":1026,"props":1679,"children":1680},{"style":1041},[1681],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1683,"children":1684},{"style":1140},[1685],{"type":998,"value":1686},"\"date\"",{"type":993,"tag":1026,"props":1688,"children":1689},{"style":1041},[1690],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1692,"children":1693},{"class":1028,"line":36},[1694,1698,1702,1707],{"type":993,"tag":1026,"props":1695,"children":1696},{"style":1058},[1697],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1699,"children":1700},{"style":1041},[1701],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1703,"children":1704},{"style":1140},[1705],{"type":998,"value":1706},"\"Original fruits:\"",{"type":993,"tag":1026,"props":1708,"children":1709},{"style":1041},[1710],{"type":998,"value":1711},", fruits)\n",{"type":993,"tag":1026,"props":1713,"children":1714},{"class":1028,"line":45},[1715],{"type":993,"tag":1026,"props":1716,"children":1717},{"emptyLinePlaceholder":13},[1718],{"type":998,"value":1182},{"type":993,"tag":1026,"props":1720,"children":1721},{"class":1028,"line":54},[1722],{"type":993,"tag":1026,"props":1723,"children":1724},{"style":1041},[1725],{"type":998,"value":1726},"fruits.sort()\n",{"type":993,"tag":1026,"props":1728,"children":1729},{"class":1028,"line":63},[1730,1734,1738,1743],{"type":993,"tag":1026,"props":1731,"children":1732},{"style":1058},[1733],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1735,"children":1736},{"style":1041},[1737],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1739,"children":1740},{"style":1140},[1741],{"type":998,"value":1742},"\"Sorted fruits:\"",{"type":993,"tag":1026,"props":1744,"children":1745},{"style":1041},[1746],{"type":998,"value":1711},{"type":993,"tag":1465,"props":1748,"children":1750},{"id":1749},"reverse-sorting",[1751],{"type":998,"value":1752},"Reverse Sorting",{"type":993,"tag":1012,"props":1754,"children":1755},{},[1756],{"type":993,"tag":1016,"props":1757,"children":1759},{"className":1018,"code":1758,"language":6,"meta":8,"style":8},"# Sorting in descending order\nscores = [85, 92, 78, 96, 88]\nprint(\"Original scores:\", scores)\n\nscores.sort(reverse=True)\nprint(\"Sorted descending:\", scores)\n",[1760],{"type":993,"tag":1022,"props":1761,"children":1762},{"__ignoreMap":8},[1763,1771,1832,1853,1860,1887],{"type":993,"tag":1026,"props":1764,"children":1765},{"class":1028,"line":12},[1766],{"type":993,"tag":1026,"props":1767,"children":1768},{"style":1032},[1769],{"type":998,"value":1770},"# Sorting in descending order\n",{"type":993,"tag":1026,"props":1772,"children":1773},{"class":1028,"line":27},[1774,1779,1783,1787,1792,1796,1801,1805,1810,1814,1819,1823,1828],{"type":993,"tag":1026,"props":1775,"children":1776},{"style":1041},[1777],{"type":998,"value":1778},"scores ",{"type":993,"tag":1026,"props":1780,"children":1781},{"style":1047},[1782],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1784,"children":1785},{"style":1041},[1786],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1788,"children":1789},{"style":1058},[1790],{"type":998,"value":1791},"85",{"type":993,"tag":1026,"props":1793,"children":1794},{"style":1041},[1795],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1797,"children":1798},{"style":1058},[1799],{"type":998,"value":1800},"92",{"type":993,"tag":1026,"props":1802,"children":1803},{"style":1041},[1804],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1806,"children":1807},{"style":1058},[1808],{"type":998,"value":1809},"78",{"type":993,"tag":1026,"props":1811,"children":1812},{"style":1041},[1813],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1815,"children":1816},{"style":1058},[1817],{"type":998,"value":1818},"96",{"type":993,"tag":1026,"props":1820,"children":1821},{"style":1041},[1822],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1824,"children":1825},{"style":1058},[1826],{"type":998,"value":1827},"88",{"type":993,"tag":1026,"props":1829,"children":1830},{"style":1041},[1831],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1833,"children":1834},{"class":1028,"line":36},[1835,1839,1843,1848],{"type":993,"tag":1026,"props":1836,"children":1837},{"style":1058},[1838],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1840,"children":1841},{"style":1041},[1842],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1844,"children":1845},{"style":1140},[1846],{"type":998,"value":1847},"\"Original scores:\"",{"type":993,"tag":1026,"props":1849,"children":1850},{"style":1041},[1851],{"type":998,"value":1852},", scores)\n",{"type":993,"tag":1026,"props":1854,"children":1855},{"class":1028,"line":45},[1856],{"type":993,"tag":1026,"props":1857,"children":1858},{"emptyLinePlaceholder":13},[1859],{"type":998,"value":1182},{"type":993,"tag":1026,"props":1861,"children":1862},{"class":1028,"line":54},[1863,1868,1874,1878,1882],{"type":993,"tag":1026,"props":1864,"children":1865},{"style":1041},[1866],{"type":998,"value":1867},"scores.sort(",{"type":993,"tag":1026,"props":1869,"children":1871},{"style":1870},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1872],{"type":998,"value":1873},"reverse",{"type":993,"tag":1026,"props":1875,"children":1876},{"style":1047},[1877],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1879,"children":1880},{"style":1058},[1881],{"type":998,"value":1440},{"type":993,"tag":1026,"props":1883,"children":1884},{"style":1041},[1885],{"type":998,"value":1886},")\n",{"type":993,"tag":1026,"props":1888,"children":1889},{"class":1028,"line":63},[1890,1894,1898,1903],{"type":993,"tag":1026,"props":1891,"children":1892},{"style":1058},[1893],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1895,"children":1896},{"style":1041},[1897],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1899,"children":1900},{"style":1140},[1901],{"type":998,"value":1902},"\"Sorted descending:\"",{"type":993,"tag":1026,"props":1904,"children":1905},{"style":1041},[1906],{"type":998,"value":1852},{"type":993,"tag":1465,"props":1908,"children":1910},{"id":1909},"case-insensitive-sorting",[1911],{"type":998,"value":1912},"Case-Insensitive Sorting",{"type":993,"tag":1012,"props":1914,"children":1915},{},[1916],{"type":993,"tag":1016,"props":1917,"children":1919},{"className":1018,"code":1918,"language":6,"meta":8,"style":8},"# Case-insensitive string sorting\nnames = [\"alice\", \"Bob\", \"Charlie\", \"diana\"]\nprint(\"Original names:\", names)\n\nnames.sort(key=str.lower)\nprint(\"Case-insensitive sort:\", names)\n",[1920],{"type":993,"tag":1022,"props":1921,"children":1922},{"__ignoreMap":8},[1923,1931,1980,1999,2006,2033],{"type":993,"tag":1026,"props":1924,"children":1925},{"class":1028,"line":12},[1926],{"type":993,"tag":1026,"props":1927,"children":1928},{"style":1032},[1929],{"type":998,"value":1930},"# Case-insensitive string sorting\n",{"type":993,"tag":1026,"props":1932,"children":1933},{"class":1028,"line":27},[1934,1938,1942,1946,1951,1955,1959,1963,1967,1971,1976],{"type":993,"tag":1026,"props":1935,"children":1936},{"style":1041},[1937],{"type":998,"value":1129},{"type":993,"tag":1026,"props":1939,"children":1940},{"style":1047},[1941],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1943,"children":1944},{"style":1041},[1945],{"type":998,"value":1055},{"type":993,"tag":1026,"props":1947,"children":1948},{"style":1140},[1949],{"type":998,"value":1950},"\"alice\"",{"type":993,"tag":1026,"props":1952,"children":1953},{"style":1041},[1954],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1956,"children":1957},{"style":1140},[1958],{"type":998,"value":1161},{"type":993,"tag":1026,"props":1960,"children":1961},{"style":1041},[1962],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1964,"children":1965},{"style":1140},[1966],{"type":998,"value":1143},{"type":993,"tag":1026,"props":1968,"children":1969},{"style":1041},[1970],{"type":998,"value":1066},{"type":993,"tag":1026,"props":1972,"children":1973},{"style":1140},[1974],{"type":998,"value":1975},"\"diana\"",{"type":993,"tag":1026,"props":1977,"children":1978},{"style":1041},[1979],{"type":998,"value":1121},{"type":993,"tag":1026,"props":1981,"children":1982},{"class":1028,"line":36},[1983,1987,1991,1995],{"type":993,"tag":1026,"props":1984,"children":1985},{"style":1058},[1986],{"type":998,"value":1190},{"type":993,"tag":1026,"props":1988,"children":1989},{"style":1041},[1990],{"type":998,"value":1195},{"type":993,"tag":1026,"props":1992,"children":1993},{"style":1140},[1994],{"type":998,"value":1258},{"type":993,"tag":1026,"props":1996,"children":1997},{"style":1041},[1998],{"type":998,"value":1263},{"type":993,"tag":1026,"props":2000,"children":2001},{"class":1028,"line":45},[2002],{"type":993,"tag":1026,"props":2003,"children":2004},{"emptyLinePlaceholder":13},[2005],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2007,"children":2008},{"class":1028,"line":54},[2009,2014,2019,2023,2028],{"type":993,"tag":1026,"props":2010,"children":2011},{"style":1041},[2012],{"type":998,"value":2013},"names.sort(",{"type":993,"tag":1026,"props":2015,"children":2016},{"style":1870},[2017],{"type":998,"value":2018},"key",{"type":993,"tag":1026,"props":2020,"children":2021},{"style":1047},[2022],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2024,"children":2025},{"style":1058},[2026],{"type":998,"value":2027},"str",{"type":993,"tag":1026,"props":2029,"children":2030},{"style":1041},[2031],{"type":998,"value":2032},".lower)\n",{"type":993,"tag":1026,"props":2034,"children":2035},{"class":1028,"line":63},[2036,2040,2044,2049],{"type":993,"tag":1026,"props":2037,"children":2038},{"style":1058},[2039],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2041,"children":2042},{"style":1041},[2043],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2045,"children":2046},{"style":1140},[2047],{"type":998,"value":2048},"\"Case-insensitive sort:\"",{"type":993,"tag":1026,"props":2050,"children":2051},{"style":1041},[2052],{"type":998,"value":1263},{"type":993,"tag":1345,"props":2054,"children":2056},{"id":2055},"using-sorted-function",[2057],{"type":998,"value":2058},"🎯 Using sorted() Function",{"type":993,"tag":1001,"props":2060,"children":2061},{},[2062,2063,2069],{"type":998,"value":1355},{"type":993,"tag":1022,"props":2064,"children":2066},{"className":2065},[],[2067],{"type":998,"value":2068},"sorted()",{"type":998,"value":2070}," function creates a new sorted list without modifying the original. This is useful when you need both the original and sorted versions of your data.",{"type":993,"tag":1365,"props":2072,"children":2076},{"emoji":2073,"title":2074,"type":2075},"🎯","sorted() Function Benefits","success",[2077,2085,2115,2123,2141],{"type":993,"tag":1001,"props":2078,"children":2079},{},[2080],{"type":993,"tag":1375,"props":2081,"children":2082},{},[2083],{"type":998,"value":2084},"Key Advantages:",{"type":993,"tag":1381,"props":2086,"children":2087},{},[2088,2093,2098,2103],{"type":993,"tag":1385,"props":2089,"children":2090},{},[2091],{"type":998,"value":2092},"Preserves original list unchanged",{"type":993,"tag":1385,"props":2094,"children":2095},{},[2096],{"type":998,"value":2097},"Returns a new sorted list",{"type":993,"tag":1385,"props":2099,"children":2100},{},[2101],{"type":998,"value":2102},"Works with any iterable (lists, tuples, strings)",{"type":993,"tag":1385,"props":2104,"children":2105},{},[2106,2108,2113],{"type":998,"value":2107},"Same sorting power as ",{"type":993,"tag":1022,"props":2109,"children":2111},{"className":2110},[],[2112],{"type":998,"value":1361},{"type":998,"value":2114}," method",{"type":993,"tag":1001,"props":2116,"children":2117},{},[2118],{"type":993,"tag":1375,"props":2119,"children":2120},{},[2121],{"type":998,"value":2122},"When to Use:",{"type":993,"tag":1381,"props":2124,"children":2125},{},[2126,2131,2136],{"type":993,"tag":1385,"props":2127,"children":2128},{},[2129],{"type":998,"value":2130},"Need to keep original order",{"type":993,"tag":1385,"props":2132,"children":2133},{},[2134],{"type":998,"value":2135},"Working with immutable data",{"type":993,"tag":1385,"props":2137,"children":2138},{},[2139],{"type":998,"value":2140},"Creating multiple sorted versions",{"type":993,"tag":1001,"props":2142,"children":2143},{},[2144,2149,2151],{"type":993,"tag":1375,"props":2145,"children":2146},{},[2147],{"type":998,"value":2148},"Syntax:",{"type":998,"value":2150}," ",{"type":993,"tag":1022,"props":2152,"children":2154},{"className":2153},[],[2155],{"type":998,"value":2156},"sorted(iterable, key=None, reverse=False)",{"type":993,"tag":1465,"props":2158,"children":2160},{"id":2159},"basic-sorted-usage",[2161],{"type":998,"value":2162},"Basic sorted() Usage",{"type":993,"tag":1012,"props":2164,"children":2165},{},[2166],{"type":993,"tag":1016,"props":2167,"children":2169},{"className":1018,"code":2168,"language":6,"meta":8,"style":8},"# Using sorted() function\noriginal = [64, 34, 25, 12, 22, 11, 90]\nprint(\"Original list:\", original)\n\nsorted_list = sorted(original)\nprint(\"Sorted copy:\", sorted_list)\nprint(\"Original unchanged:\", original)\n",[2170],{"type":993,"tag":1022,"props":2171,"children":2172},{"__ignoreMap":8},[2173,2181,2253,2274,2281,2303,2324],{"type":993,"tag":1026,"props":2174,"children":2175},{"class":1028,"line":12},[2176],{"type":993,"tag":1026,"props":2177,"children":2178},{"style":1032},[2179],{"type":998,"value":2180},"# Using sorted() function\n",{"type":993,"tag":1026,"props":2182,"children":2183},{"class":1028,"line":27},[2184,2189,2193,2197,2201,2205,2209,2213,2217,2221,2225,2229,2233,2237,2241,2245,2249],{"type":993,"tag":1026,"props":2185,"children":2186},{"style":1041},[2187],{"type":998,"value":2188},"original ",{"type":993,"tag":1026,"props":2190,"children":2191},{"style":1047},[2192],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2194,"children":2195},{"style":1041},[2196],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2198,"children":2199},{"style":1058},[2200],{"type":998,"value":1061},{"type":993,"tag":1026,"props":2202,"children":2203},{"style":1041},[2204],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2206,"children":2207},{"style":1058},[2208],{"type":998,"value":1071},{"type":993,"tag":1026,"props":2210,"children":2211},{"style":1041},[2212],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2214,"children":2215},{"style":1058},[2216],{"type":998,"value":1080},{"type":993,"tag":1026,"props":2218,"children":2219},{"style":1041},[2220],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2222,"children":2223},{"style":1058},[2224],{"type":998,"value":1089},{"type":993,"tag":1026,"props":2226,"children":2227},{"style":1041},[2228],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2230,"children":2231},{"style":1058},[2232],{"type":998,"value":1098},{"type":993,"tag":1026,"props":2234,"children":2235},{"style":1041},[2236],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2238,"children":2239},{"style":1058},[2240],{"type":998,"value":1107},{"type":993,"tag":1026,"props":2242,"children":2243},{"style":1041},[2244],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2246,"children":2247},{"style":1058},[2248],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2250,"children":2251},{"style":1041},[2252],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2254,"children":2255},{"class":1028,"line":36},[2256,2260,2264,2269],{"type":993,"tag":1026,"props":2257,"children":2258},{"style":1058},[2259],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2261,"children":2262},{"style":1041},[2263],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2265,"children":2266},{"style":1140},[2267],{"type":998,"value":2268},"\"Original list:\"",{"type":993,"tag":1026,"props":2270,"children":2271},{"style":1041},[2272],{"type":998,"value":2273},", original)\n",{"type":993,"tag":1026,"props":2275,"children":2276},{"class":1028,"line":45},[2277],{"type":993,"tag":1026,"props":2278,"children":2279},{"emptyLinePlaceholder":13},[2280],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2282,"children":2283},{"class":1028,"line":54},[2284,2289,2293,2298],{"type":993,"tag":1026,"props":2285,"children":2286},{"style":1041},[2287],{"type":998,"value":2288},"sorted_list ",{"type":993,"tag":1026,"props":2290,"children":2291},{"style":1047},[2292],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2294,"children":2295},{"style":1058},[2296],{"type":998,"value":2297}," sorted",{"type":993,"tag":1026,"props":2299,"children":2300},{"style":1041},[2301],{"type":998,"value":2302},"(original)\n",{"type":993,"tag":1026,"props":2304,"children":2305},{"class":1028,"line":63},[2306,2310,2314,2319],{"type":993,"tag":1026,"props":2307,"children":2308},{"style":1058},[2309],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2311,"children":2312},{"style":1041},[2313],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2315,"children":2316},{"style":1140},[2317],{"type":998,"value":2318},"\"Sorted copy:\"",{"type":993,"tag":1026,"props":2320,"children":2321},{"style":1041},[2322],{"type":998,"value":2323},", sorted_list)\n",{"type":993,"tag":1026,"props":2325,"children":2326},{"class":1028,"line":72},[2327,2331,2335,2340],{"type":993,"tag":1026,"props":2328,"children":2329},{"style":1058},[2330],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2332,"children":2333},{"style":1041},[2334],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2336,"children":2337},{"style":1140},[2338],{"type":998,"value":2339},"\"Original unchanged:\"",{"type":993,"tag":1026,"props":2341,"children":2342},{"style":1041},[2343],{"type":998,"value":2273},{"type":993,"tag":1465,"props":2345,"children":2347},{"id":2346},"sorting-different-data-types",[2348],{"type":998,"value":2349},"Sorting Different Data Types",{"type":993,"tag":1012,"props":2351,"children":2352},{},[2353],{"type":993,"tag":1016,"props":2354,"children":2356},{"className":1018,"code":2355,"language":6,"meta":8,"style":8},"# Sorting different types\nwords = [\"python\", \"java\", \"c++\", \"javascript\"]\nprint(\"Original words:\", words)\n\nsorted_words = sorted(words)\nprint(\"Sorted words:\", sorted_words)\n\n# Sorting by length\nsorted_by_length = sorted(words, key=len)\nprint(\"Sorted by length:\", sorted_by_length)\n",[2357],{"type":993,"tag":1022,"props":2358,"children":2359},{"__ignoreMap":8},[2360,2368,2420,2441,2448,2469,2490,2497,2505,2543],{"type":993,"tag":1026,"props":2361,"children":2362},{"class":1028,"line":12},[2363],{"type":993,"tag":1026,"props":2364,"children":2365},{"style":1032},[2366],{"type":998,"value":2367},"# Sorting different types\n",{"type":993,"tag":1026,"props":2369,"children":2370},{"class":1028,"line":27},[2371,2376,2380,2384,2389,2393,2398,2402,2407,2411,2416],{"type":993,"tag":1026,"props":2372,"children":2373},{"style":1041},[2374],{"type":998,"value":2375},"words ",{"type":993,"tag":1026,"props":2377,"children":2378},{"style":1047},[2379],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2381,"children":2382},{"style":1041},[2383],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2385,"children":2386},{"style":1140},[2387],{"type":998,"value":2388},"\"python\"",{"type":993,"tag":1026,"props":2390,"children":2391},{"style":1041},[2392],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2394,"children":2395},{"style":1140},[2396],{"type":998,"value":2397},"\"java\"",{"type":993,"tag":1026,"props":2399,"children":2400},{"style":1041},[2401],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2403,"children":2404},{"style":1140},[2405],{"type":998,"value":2406},"\"c++\"",{"type":993,"tag":1026,"props":2408,"children":2409},{"style":1041},[2410],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2412,"children":2413},{"style":1140},[2414],{"type":998,"value":2415},"\"javascript\"",{"type":993,"tag":1026,"props":2417,"children":2418},{"style":1041},[2419],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2421,"children":2422},{"class":1028,"line":36},[2423,2427,2431,2436],{"type":993,"tag":1026,"props":2424,"children":2425},{"style":1058},[2426],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2428,"children":2429},{"style":1041},[2430],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2432,"children":2433},{"style":1140},[2434],{"type":998,"value":2435},"\"Original words:\"",{"type":993,"tag":1026,"props":2437,"children":2438},{"style":1041},[2439],{"type":998,"value":2440},", words)\n",{"type":993,"tag":1026,"props":2442,"children":2443},{"class":1028,"line":45},[2444],{"type":993,"tag":1026,"props":2445,"children":2446},{"emptyLinePlaceholder":13},[2447],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2449,"children":2450},{"class":1028,"line":54},[2451,2456,2460,2464],{"type":993,"tag":1026,"props":2452,"children":2453},{"style":1041},[2454],{"type":998,"value":2455},"sorted_words ",{"type":993,"tag":1026,"props":2457,"children":2458},{"style":1047},[2459],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2461,"children":2462},{"style":1058},[2463],{"type":998,"value":2297},{"type":993,"tag":1026,"props":2465,"children":2466},{"style":1041},[2467],{"type":998,"value":2468},"(words)\n",{"type":993,"tag":1026,"props":2470,"children":2471},{"class":1028,"line":63},[2472,2476,2480,2485],{"type":993,"tag":1026,"props":2473,"children":2474},{"style":1058},[2475],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2477,"children":2478},{"style":1041},[2479],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2481,"children":2482},{"style":1140},[2483],{"type":998,"value":2484},"\"Sorted words:\"",{"type":993,"tag":1026,"props":2486,"children":2487},{"style":1041},[2488],{"type":998,"value":2489},", sorted_words)\n",{"type":993,"tag":1026,"props":2491,"children":2492},{"class":1028,"line":72},[2493],{"type":993,"tag":1026,"props":2494,"children":2495},{"emptyLinePlaceholder":13},[2496],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2498,"children":2499},{"class":1028,"line":81},[2500],{"type":993,"tag":1026,"props":2501,"children":2502},{"style":1032},[2503],{"type":998,"value":2504},"# Sorting by length\n",{"type":993,"tag":1026,"props":2506,"children":2507},{"class":1028,"line":91},[2508,2513,2517,2521,2526,2530,2534,2539],{"type":993,"tag":1026,"props":2509,"children":2510},{"style":1041},[2511],{"type":998,"value":2512},"sorted_by_length ",{"type":993,"tag":1026,"props":2514,"children":2515},{"style":1047},[2516],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2518,"children":2519},{"style":1058},[2520],{"type":998,"value":2297},{"type":993,"tag":1026,"props":2522,"children":2523},{"style":1041},[2524],{"type":998,"value":2525},"(words, ",{"type":993,"tag":1026,"props":2527,"children":2528},{"style":1870},[2529],{"type":998,"value":2018},{"type":993,"tag":1026,"props":2531,"children":2532},{"style":1047},[2533],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2535,"children":2536},{"style":1058},[2537],{"type":998,"value":2538},"len",{"type":993,"tag":1026,"props":2540,"children":2541},{"style":1041},[2542],{"type":998,"value":1886},{"type":993,"tag":1026,"props":2544,"children":2545},{"class":1028,"line":100},[2546,2550,2554,2559],{"type":993,"tag":1026,"props":2547,"children":2548},{"style":1058},[2549],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2551,"children":2552},{"style":1041},[2553],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2555,"children":2556},{"style":1140},[2557],{"type":998,"value":2558},"\"Sorted by length:\"",{"type":993,"tag":1026,"props":2560,"children":2561},{"style":1041},[2562],{"type":998,"value":2563},", sorted_by_length)\n",{"type":993,"tag":2565,"props":2566,"children":2568},"content-exercise",{":widget-view":2567,"category":6,"id":346},"true",[],{"type":993,"tag":1345,"props":2570,"children":2572},{"id":2571},"reversing-lists",[2573],{"type":998,"value":2574},"🔄 Reversing Lists",{"type":993,"tag":1001,"props":2576,"children":2577},{},[2578],{"type":998,"value":2579},"Python provides multiple ways to reverse lists, each suited for different scenarios. You can reverse in place or create a reversed copy.",{"type":993,"tag":1365,"props":2581,"children":2584},{"emoji":2582,"title":2583,"type":1369},"🔄","List Reversal Methods",[2585,2593,2629,2637,2673],{"type":993,"tag":1001,"props":2586,"children":2587},{},[2588],{"type":993,"tag":1375,"props":2589,"children":2590},{},[2591],{"type":998,"value":2592},"Three Main Approaches:",{"type":993,"tag":1381,"props":2594,"children":2595},{},[2596,2607,2618],{"type":993,"tag":1385,"props":2597,"children":2598},{},[2599,2605],{"type":993,"tag":1022,"props":2600,"children":2602},{"className":2601},[],[2603],{"type":998,"value":2604},"list.reverse()",{"type":998,"value":2606},": Modifies original list",{"type":993,"tag":1385,"props":2608,"children":2609},{},[2610,2616],{"type":993,"tag":1022,"props":2611,"children":2613},{"className":2612},[],[2614],{"type":998,"value":2615},"list[::-1]",{"type":998,"value":2617},": Creates reversed copy (slicing)",{"type":993,"tag":1385,"props":2619,"children":2620},{},[2621,2627],{"type":993,"tag":1022,"props":2622,"children":2624},{"className":2623},[],[2625],{"type":998,"value":2626},"reversed(list)",{"type":998,"value":2628},": Returns reverse iterator",{"type":993,"tag":1001,"props":2630,"children":2631},{},[2632],{"type":993,"tag":1375,"props":2633,"children":2634},{},[2635],{"type":998,"value":2636},"Performance Comparison:",{"type":993,"tag":1381,"props":2638,"children":2639},{},[2640,2651,2662],{"type":993,"tag":1385,"props":2641,"children":2642},{},[2643,2649],{"type":993,"tag":1022,"props":2644,"children":2646},{"className":2645},[],[2647],{"type":998,"value":2648},"reverse()",{"type":998,"value":2650},": Fastest for in-place reversal",{"type":993,"tag":1385,"props":2652,"children":2653},{},[2654,2660],{"type":993,"tag":1022,"props":2655,"children":2657},{"className":2656},[],[2658],{"type":998,"value":2659},"[::-1]",{"type":998,"value":2661},": Fastest for creating copy",{"type":993,"tag":1385,"props":2663,"children":2664},{},[2665,2671],{"type":993,"tag":1022,"props":2666,"children":2668},{"className":2667},[],[2669],{"type":998,"value":2670},"reversed()",{"type":998,"value":2672},": Memory efficient for iteration",{"type":993,"tag":1001,"props":2674,"children":2675},{},[2676,2681],{"type":993,"tag":1375,"props":2677,"children":2678},{},[2679],{"type":998,"value":2680},"Choose Based On:",{"type":998,"value":2682}," Whether you need to modify original or create copy",{"type":993,"tag":1465,"props":2684,"children":2686},{"id":2685},"using-reverse-method",[2687],{"type":998,"value":2688},"Using reverse() Method",{"type":993,"tag":1012,"props":2690,"children":2691},{},[2692],{"type":993,"tag":1016,"props":2693,"children":2695},{"className":1018,"code":2694,"language":6,"meta":8,"style":8},"# Using reverse() method (modifies original)\nnumbers = [1, 2, 3, 4, 5]\nprint(\"Original:\", numbers)\n\nnumbers.reverse()\nprint(\"After reverse():\", numbers)\n",[2696],{"type":993,"tag":1022,"props":2697,"children":2698},{"__ignoreMap":8},[2699,2707,2766,2785,2792,2800],{"type":993,"tag":1026,"props":2700,"children":2701},{"class":1028,"line":12},[2702],{"type":993,"tag":1026,"props":2703,"children":2704},{"style":1032},[2705],{"type":998,"value":2706},"# Using reverse() method (modifies original)\n",{"type":993,"tag":1026,"props":2708,"children":2709},{"class":1028,"line":27},[2710,2714,2718,2722,2726,2730,2735,2739,2744,2748,2753,2757,2762],{"type":993,"tag":1026,"props":2711,"children":2712},{"style":1041},[2713],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2715,"children":2716},{"style":1047},[2717],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2719,"children":2720},{"style":1041},[2721],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2723,"children":2724},{"style":1058},[2725],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2727,"children":2728},{"style":1041},[2729],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2731,"children":2732},{"style":1058},[2733],{"type":998,"value":2734},"2",{"type":993,"tag":1026,"props":2736,"children":2737},{"style":1041},[2738],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2740,"children":2741},{"style":1058},[2742],{"type":998,"value":2743},"3",{"type":993,"tag":1026,"props":2745,"children":2746},{"style":1041},[2747],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2749,"children":2750},{"style":1058},[2751],{"type":998,"value":2752},"4",{"type":993,"tag":1026,"props":2754,"children":2755},{"style":1041},[2756],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2758,"children":2759},{"style":1058},[2760],{"type":998,"value":2761},"5",{"type":993,"tag":1026,"props":2763,"children":2764},{"style":1041},[2765],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2767,"children":2768},{"class":1028,"line":36},[2769,2773,2777,2781],{"type":993,"tag":1026,"props":2770,"children":2771},{"style":1058},[2772],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2774,"children":2775},{"style":1041},[2776],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2778,"children":2779},{"style":1140},[2780],{"type":998,"value":1575},{"type":993,"tag":1026,"props":2782,"children":2783},{"style":1041},[2784],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2786,"children":2787},{"class":1028,"line":45},[2788],{"type":993,"tag":1026,"props":2789,"children":2790},{"emptyLinePlaceholder":13},[2791],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2793,"children":2794},{"class":1028,"line":54},[2795],{"type":993,"tag":1026,"props":2796,"children":2797},{"style":1041},[2798],{"type":998,"value":2799},"numbers.reverse()\n",{"type":993,"tag":1026,"props":2801,"children":2802},{"class":1028,"line":63},[2803,2807,2811,2816],{"type":993,"tag":1026,"props":2804,"children":2805},{"style":1058},[2806],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2808,"children":2809},{"style":1041},[2810],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2812,"children":2813},{"style":1140},[2814],{"type":998,"value":2815},"\"After reverse():\"",{"type":993,"tag":1026,"props":2817,"children":2818},{"style":1041},[2819],{"type":998,"value":1205},{"type":993,"tag":1465,"props":2821,"children":2823},{"id":2822},"using-slicing-for-reversal",[2824],{"type":998,"value":2825},"Using Slicing for Reversal",{"type":993,"tag":1012,"props":2827,"children":2828},{},[2829],{"type":993,"tag":1016,"props":2830,"children":2832},{"className":1018,"code":2831,"language":6,"meta":8,"style":8},"# Using slicing (creates new list)\ncolors = [\"red\", \"green\", \"blue\", \"yellow\"]\nprint(\"Original colors:\", colors)\n\nreversed_colors = colors[::-1]\nprint(\"Reversed copy:\", reversed_colors)\nprint(\"Original unchanged:\", colors)\n",[2833],{"type":993,"tag":1022,"props":2834,"children":2835},{"__ignoreMap":8},[2836,2844,2896,2917,2924,2953,2974],{"type":993,"tag":1026,"props":2837,"children":2838},{"class":1028,"line":12},[2839],{"type":993,"tag":1026,"props":2840,"children":2841},{"style":1032},[2842],{"type":998,"value":2843},"# Using slicing (creates new list)\n",{"type":993,"tag":1026,"props":2845,"children":2846},{"class":1028,"line":27},[2847,2852,2856,2860,2865,2869,2874,2878,2883,2887,2892],{"type":993,"tag":1026,"props":2848,"children":2849},{"style":1041},[2850],{"type":998,"value":2851},"colors ",{"type":993,"tag":1026,"props":2853,"children":2854},{"style":1047},[2855],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2857,"children":2858},{"style":1041},[2859],{"type":998,"value":1055},{"type":993,"tag":1026,"props":2861,"children":2862},{"style":1140},[2863],{"type":998,"value":2864},"\"red\"",{"type":993,"tag":1026,"props":2866,"children":2867},{"style":1041},[2868],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2870,"children":2871},{"style":1140},[2872],{"type":998,"value":2873},"\"green\"",{"type":993,"tag":1026,"props":2875,"children":2876},{"style":1041},[2877],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2879,"children":2880},{"style":1140},[2881],{"type":998,"value":2882},"\"blue\"",{"type":993,"tag":1026,"props":2884,"children":2885},{"style":1041},[2886],{"type":998,"value":1066},{"type":993,"tag":1026,"props":2888,"children":2889},{"style":1140},[2890],{"type":998,"value":2891},"\"yellow\"",{"type":993,"tag":1026,"props":2893,"children":2894},{"style":1041},[2895],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2897,"children":2898},{"class":1028,"line":36},[2899,2903,2907,2912],{"type":993,"tag":1026,"props":2900,"children":2901},{"style":1058},[2902],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2904,"children":2905},{"style":1041},[2906],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2908,"children":2909},{"style":1140},[2910],{"type":998,"value":2911},"\"Original colors:\"",{"type":993,"tag":1026,"props":2913,"children":2914},{"style":1041},[2915],{"type":998,"value":2916},", colors)\n",{"type":993,"tag":1026,"props":2918,"children":2919},{"class":1028,"line":45},[2920],{"type":993,"tag":1026,"props":2921,"children":2922},{"emptyLinePlaceholder":13},[2923],{"type":998,"value":1182},{"type":993,"tag":1026,"props":2925,"children":2926},{"class":1028,"line":54},[2927,2932,2936,2941,2945,2949],{"type":993,"tag":1026,"props":2928,"children":2929},{"style":1041},[2930],{"type":998,"value":2931},"reversed_colors ",{"type":993,"tag":1026,"props":2933,"children":2934},{"style":1047},[2935],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2937,"children":2938},{"style":1041},[2939],{"type":998,"value":2940}," colors[::",{"type":993,"tag":1026,"props":2942,"children":2943},{"style":1047},[2944],{"type":998,"value":1333},{"type":993,"tag":1026,"props":2946,"children":2947},{"style":1058},[2948],{"type":998,"value":1338},{"type":993,"tag":1026,"props":2950,"children":2951},{"style":1041},[2952],{"type":998,"value":1121},{"type":993,"tag":1026,"props":2954,"children":2955},{"class":1028,"line":63},[2956,2960,2964,2969],{"type":993,"tag":1026,"props":2957,"children":2958},{"style":1058},[2959],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2961,"children":2962},{"style":1041},[2963],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2965,"children":2966},{"style":1140},[2967],{"type":998,"value":2968},"\"Reversed copy:\"",{"type":993,"tag":1026,"props":2970,"children":2971},{"style":1041},[2972],{"type":998,"value":2973},", reversed_colors)\n",{"type":993,"tag":1026,"props":2975,"children":2976},{"class":1028,"line":72},[2977,2981,2985,2989],{"type":993,"tag":1026,"props":2978,"children":2979},{"style":1058},[2980],{"type":998,"value":1190},{"type":993,"tag":1026,"props":2982,"children":2983},{"style":1041},[2984],{"type":998,"value":1195},{"type":993,"tag":1026,"props":2986,"children":2987},{"style":1140},[2988],{"type":998,"value":2339},{"type":993,"tag":1026,"props":2990,"children":2991},{"style":1041},[2992],{"type":998,"value":2916},{"type":993,"tag":1345,"props":2994,"children":2996},{"id":2995},"custom-sorting-with-key-functions",[2997],{"type":998,"value":2998},"🎨 Custom Sorting with Key Functions",{"type":993,"tag":1001,"props":3000,"children":3001},{},[3002],{"type":998,"value":3003},"Custom sorting allows you to sort lists based on specific criteria using key functions. This powerful feature enables complex sorting scenarios.",{"type":993,"tag":1365,"props":3005,"children":3008},{"emoji":3006,"title":3007,"type":2075},"🎨","Key Function Guidelines",[3009,3017,3040,3048,3094],{"type":993,"tag":1001,"props":3010,"children":3011},{},[3012],{"type":993,"tag":1375,"props":3013,"children":3014},{},[3015],{"type":998,"value":3016},"How Key Functions Work:",{"type":993,"tag":1381,"props":3018,"children":3019},{},[3020,3025,3030,3035],{"type":993,"tag":1385,"props":3021,"children":3022},{},[3023],{"type":998,"value":3024},"Applied to each element before comparison",{"type":993,"tag":1385,"props":3026,"children":3027},{},[3028],{"type":998,"value":3029},"Should return a comparable value",{"type":993,"tag":1385,"props":3031,"children":3032},{},[3033],{"type":998,"value":3034},"Can be lambda functions or regular functions",{"type":993,"tag":1385,"props":3036,"children":3037},{},[3038],{"type":998,"value":3039},"Enable sorting by any criteria",{"type":993,"tag":1001,"props":3041,"children":3042},{},[3043],{"type":993,"tag":1375,"props":3044,"children":3045},{},[3046],{"type":998,"value":3047},"Common Key Functions:",{"type":993,"tag":1381,"props":3049,"children":3050},{},[3051,3061,3072,3083],{"type":993,"tag":1385,"props":3052,"children":3053},{},[3054,3059],{"type":993,"tag":1022,"props":3055,"children":3057},{"className":3056},[],[3058],{"type":998,"value":2538},{"type":998,"value":3060},": Sort by length",{"type":993,"tag":1385,"props":3062,"children":3063},{},[3064,3070],{"type":993,"tag":1022,"props":3065,"children":3067},{"className":3066},[],[3068],{"type":998,"value":3069},"str.lower",{"type":998,"value":3071},": Case-insensitive sorting",{"type":993,"tag":1385,"props":3073,"children":3074},{},[3075,3081],{"type":993,"tag":1022,"props":3076,"children":3078},{"className":3077},[],[3079],{"type":998,"value":3080},"abs",{"type":998,"value":3082},": Sort by absolute value",{"type":993,"tag":1385,"props":3084,"children":3085},{},[3086,3092],{"type":993,"tag":1022,"props":3087,"children":3089},{"className":3088},[],[3090],{"type":998,"value":3091},"lambda x: x[1]",{"type":998,"value":3093},": Sort by second element",{"type":993,"tag":1001,"props":3095,"children":3096},{},[3097,3102],{"type":993,"tag":1375,"props":3098,"children":3099},{},[3100],{"type":998,"value":3101},"Advanced:",{"type":998,"value":3103}," Use tuples for multi-criteria sorting",{"type":993,"tag":1465,"props":3105,"children":3107},{"id":3106},"sorting-by-string-length",[3108],{"type":998,"value":3109},"Sorting by String Length",{"type":993,"tag":1012,"props":3111,"children":3112},{},[3113],{"type":993,"tag":1016,"props":3114,"children":3116},{"className":1018,"code":3115,"language":6,"meta":8,"style":8},"# Sorting by string length\nwords = [\"cat\", \"elephant\", \"dog\", \"hippopotamus\"]\nprint(\"Original words:\", words)\n\nby_length = sorted(words, key=len)\nprint(\"Sorted by length:\", by_length)\n\n# Longest first\nlongest_first = sorted(words, key=len, reverse=True)\nprint(\"Longest first:\", longest_first)\n",[3117],{"type":993,"tag":1022,"props":3118,"children":3119},{"__ignoreMap":8},[3120,3128,3179,3198,3205,3241,3261,3268,3276,3328],{"type":993,"tag":1026,"props":3121,"children":3122},{"class":1028,"line":12},[3123],{"type":993,"tag":1026,"props":3124,"children":3125},{"style":1032},[3126],{"type":998,"value":3127},"# Sorting by string length\n",{"type":993,"tag":1026,"props":3129,"children":3130},{"class":1028,"line":27},[3131,3135,3139,3143,3148,3152,3157,3161,3166,3170,3175],{"type":993,"tag":1026,"props":3132,"children":3133},{"style":1041},[3134],{"type":998,"value":2375},{"type":993,"tag":1026,"props":3136,"children":3137},{"style":1047},[3138],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3140,"children":3141},{"style":1041},[3142],{"type":998,"value":1055},{"type":993,"tag":1026,"props":3144,"children":3145},{"style":1140},[3146],{"type":998,"value":3147},"\"cat\"",{"type":993,"tag":1026,"props":3149,"children":3150},{"style":1041},[3151],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3153,"children":3154},{"style":1140},[3155],{"type":998,"value":3156},"\"elephant\"",{"type":993,"tag":1026,"props":3158,"children":3159},{"style":1041},[3160],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3162,"children":3163},{"style":1140},[3164],{"type":998,"value":3165},"\"dog\"",{"type":993,"tag":1026,"props":3167,"children":3168},{"style":1041},[3169],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3171,"children":3172},{"style":1140},[3173],{"type":998,"value":3174},"\"hippopotamus\"",{"type":993,"tag":1026,"props":3176,"children":3177},{"style":1041},[3178],{"type":998,"value":1121},{"type":993,"tag":1026,"props":3180,"children":3181},{"class":1028,"line":36},[3182,3186,3190,3194],{"type":993,"tag":1026,"props":3183,"children":3184},{"style":1058},[3185],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3187,"children":3188},{"style":1041},[3189],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3191,"children":3192},{"style":1140},[3193],{"type":998,"value":2435},{"type":993,"tag":1026,"props":3195,"children":3196},{"style":1041},[3197],{"type":998,"value":2440},{"type":993,"tag":1026,"props":3199,"children":3200},{"class":1028,"line":45},[3201],{"type":993,"tag":1026,"props":3202,"children":3203},{"emptyLinePlaceholder":13},[3204],{"type":998,"value":1182},{"type":993,"tag":1026,"props":3206,"children":3207},{"class":1028,"line":54},[3208,3213,3217,3221,3225,3229,3233,3237],{"type":993,"tag":1026,"props":3209,"children":3210},{"style":1041},[3211],{"type":998,"value":3212},"by_length ",{"type":993,"tag":1026,"props":3214,"children":3215},{"style":1047},[3216],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3218,"children":3219},{"style":1058},[3220],{"type":998,"value":2297},{"type":993,"tag":1026,"props":3222,"children":3223},{"style":1041},[3224],{"type":998,"value":2525},{"type":993,"tag":1026,"props":3226,"children":3227},{"style":1870},[3228],{"type":998,"value":2018},{"type":993,"tag":1026,"props":3230,"children":3231},{"style":1047},[3232],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3234,"children":3235},{"style":1058},[3236],{"type":998,"value":2538},{"type":993,"tag":1026,"props":3238,"children":3239},{"style":1041},[3240],{"type":998,"value":1886},{"type":993,"tag":1026,"props":3242,"children":3243},{"class":1028,"line":63},[3244,3248,3252,3256],{"type":993,"tag":1026,"props":3245,"children":3246},{"style":1058},[3247],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3249,"children":3250},{"style":1041},[3251],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3253,"children":3254},{"style":1140},[3255],{"type":998,"value":2558},{"type":993,"tag":1026,"props":3257,"children":3258},{"style":1041},[3259],{"type":998,"value":3260},", by_length)\n",{"type":993,"tag":1026,"props":3262,"children":3263},{"class":1028,"line":72},[3264],{"type":993,"tag":1026,"props":3265,"children":3266},{"emptyLinePlaceholder":13},[3267],{"type":998,"value":1182},{"type":993,"tag":1026,"props":3269,"children":3270},{"class":1028,"line":81},[3271],{"type":993,"tag":1026,"props":3272,"children":3273},{"style":1032},[3274],{"type":998,"value":3275},"# Longest first\n",{"type":993,"tag":1026,"props":3277,"children":3278},{"class":1028,"line":91},[3279,3284,3288,3292,3296,3300,3304,3308,3312,3316,3320,3324],{"type":993,"tag":1026,"props":3280,"children":3281},{"style":1041},[3282],{"type":998,"value":3283},"longest_first ",{"type":993,"tag":1026,"props":3285,"children":3286},{"style":1047},[3287],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3289,"children":3290},{"style":1058},[3291],{"type":998,"value":2297},{"type":993,"tag":1026,"props":3293,"children":3294},{"style":1041},[3295],{"type":998,"value":2525},{"type":993,"tag":1026,"props":3297,"children":3298},{"style":1870},[3299],{"type":998,"value":2018},{"type":993,"tag":1026,"props":3301,"children":3302},{"style":1047},[3303],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3305,"children":3306},{"style":1058},[3307],{"type":998,"value":2538},{"type":993,"tag":1026,"props":3309,"children":3310},{"style":1041},[3311],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3313,"children":3314},{"style":1870},[3315],{"type":998,"value":1873},{"type":993,"tag":1026,"props":3317,"children":3318},{"style":1047},[3319],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3321,"children":3322},{"style":1058},[3323],{"type":998,"value":1440},{"type":993,"tag":1026,"props":3325,"children":3326},{"style":1041},[3327],{"type":998,"value":1886},{"type":993,"tag":1026,"props":3329,"children":3330},{"class":1028,"line":100},[3331,3335,3339,3344],{"type":993,"tag":1026,"props":3332,"children":3333},{"style":1058},[3334],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3336,"children":3337},{"style":1041},[3338],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3340,"children":3341},{"style":1140},[3342],{"type":998,"value":3343},"\"Longest first:\"",{"type":993,"tag":1026,"props":3345,"children":3346},{"style":1041},[3347],{"type":998,"value":3348},", longest_first)\n",{"type":993,"tag":1465,"props":3350,"children":3352},{"id":3351},"sorting-nested-lists",[3353],{"type":998,"value":3354},"Sorting Nested Lists",{"type":993,"tag":1012,"props":3356,"children":3357},{},[3358],{"type":993,"tag":1016,"props":3359,"children":3361},{"className":1018,"code":3360,"language":6,"meta":8,"style":8},"# Sorting lists of lists\nstudents = [[\"Alice\", 85], [\"Bob\", 92], [\"Charlie\", 78]]\nprint(\"Original students:\", students)\n\n# Sort by grade (second element)\nby_grade = sorted(students, key=lambda x: x[1])\nprint(\"Sorted by grade:\", by_grade)\n\n# Sort by name (first element)\nby_name = sorted(students, key=lambda x: x[0])\nprint(\"Sorted by name:\", by_name)\n",[3362],{"type":993,"tag":1022,"props":3363,"children":3364},{"__ignoreMap":8},[3365,3373,3440,3461,3468,3476,3519,3540,3547,3555,3596],{"type":993,"tag":1026,"props":3366,"children":3367},{"class":1028,"line":12},[3368],{"type":993,"tag":1026,"props":3369,"children":3370},{"style":1032},[3371],{"type":998,"value":3372},"# Sorting lists of lists\n",{"type":993,"tag":1026,"props":3374,"children":3375},{"class":1028,"line":27},[3376,3381,3385,3390,3394,3398,3402,3407,3411,3415,3419,3423,3427,3431,3435],{"type":993,"tag":1026,"props":3377,"children":3378},{"style":1041},[3379],{"type":998,"value":3380},"students ",{"type":993,"tag":1026,"props":3382,"children":3383},{"style":1047},[3384],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3386,"children":3387},{"style":1041},[3388],{"type":998,"value":3389}," [[",{"type":993,"tag":1026,"props":3391,"children":3392},{"style":1140},[3393],{"type":998,"value":1152},{"type":993,"tag":1026,"props":3395,"children":3396},{"style":1041},[3397],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3399,"children":3400},{"style":1058},[3401],{"type":998,"value":1791},{"type":993,"tag":1026,"props":3403,"children":3404},{"style":1041},[3405],{"type":998,"value":3406},"], [",{"type":993,"tag":1026,"props":3408,"children":3409},{"style":1140},[3410],{"type":998,"value":1161},{"type":993,"tag":1026,"props":3412,"children":3413},{"style":1041},[3414],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3416,"children":3417},{"style":1058},[3418],{"type":998,"value":1800},{"type":993,"tag":1026,"props":3420,"children":3421},{"style":1041},[3422],{"type":998,"value":3406},{"type":993,"tag":1026,"props":3424,"children":3425},{"style":1140},[3426],{"type":998,"value":1143},{"type":993,"tag":1026,"props":3428,"children":3429},{"style":1041},[3430],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3432,"children":3433},{"style":1058},[3434],{"type":998,"value":1809},{"type":993,"tag":1026,"props":3436,"children":3437},{"style":1041},[3438],{"type":998,"value":3439},"]]\n",{"type":993,"tag":1026,"props":3441,"children":3442},{"class":1028,"line":36},[3443,3447,3451,3456],{"type":993,"tag":1026,"props":3444,"children":3445},{"style":1058},[3446],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3448,"children":3449},{"style":1041},[3450],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3452,"children":3453},{"style":1140},[3454],{"type":998,"value":3455},"\"Original students:\"",{"type":993,"tag":1026,"props":3457,"children":3458},{"style":1041},[3459],{"type":998,"value":3460},", students)\n",{"type":993,"tag":1026,"props":3462,"children":3463},{"class":1028,"line":45},[3464],{"type":993,"tag":1026,"props":3465,"children":3466},{"emptyLinePlaceholder":13},[3467],{"type":998,"value":1182},{"type":993,"tag":1026,"props":3469,"children":3470},{"class":1028,"line":54},[3471],{"type":993,"tag":1026,"props":3472,"children":3473},{"style":1032},[3474],{"type":998,"value":3475},"# Sort by grade (second element)\n",{"type":993,"tag":1026,"props":3477,"children":3478},{"class":1028,"line":63},[3479,3484,3488,3492,3497,3501,3506,3511,3515],{"type":993,"tag":1026,"props":3480,"children":3481},{"style":1041},[3482],{"type":998,"value":3483},"by_grade ",{"type":993,"tag":1026,"props":3485,"children":3486},{"style":1047},[3487],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3489,"children":3490},{"style":1058},[3491],{"type":998,"value":2297},{"type":993,"tag":1026,"props":3493,"children":3494},{"style":1041},[3495],{"type":998,"value":3496},"(students, ",{"type":993,"tag":1026,"props":3498,"children":3499},{"style":1870},[3500],{"type":998,"value":2018},{"type":993,"tag":1026,"props":3502,"children":3503},{"style":1047},[3504],{"type":998,"value":3505},"=lambda",{"type":993,"tag":1026,"props":3507,"children":3508},{"style":1041},[3509],{"type":998,"value":3510}," x: x[",{"type":993,"tag":1026,"props":3512,"children":3513},{"style":1058},[3514],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3516,"children":3517},{"style":1041},[3518],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3520,"children":3521},{"class":1028,"line":72},[3522,3526,3530,3535],{"type":993,"tag":1026,"props":3523,"children":3524},{"style":1058},[3525],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3527,"children":3528},{"style":1041},[3529],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3531,"children":3532},{"style":1140},[3533],{"type":998,"value":3534},"\"Sorted by grade:\"",{"type":993,"tag":1026,"props":3536,"children":3537},{"style":1041},[3538],{"type":998,"value":3539},", by_grade)\n",{"type":993,"tag":1026,"props":3541,"children":3542},{"class":1028,"line":81},[3543],{"type":993,"tag":1026,"props":3544,"children":3545},{"emptyLinePlaceholder":13},[3546],{"type":998,"value":1182},{"type":993,"tag":1026,"props":3548,"children":3549},{"class":1028,"line":91},[3550],{"type":993,"tag":1026,"props":3551,"children":3552},{"style":1032},[3553],{"type":998,"value":3554},"# Sort by name (first element)\n",{"type":993,"tag":1026,"props":3556,"children":3557},{"class":1028,"line":100},[3558,3563,3567,3571,3575,3579,3583,3587,3592],{"type":993,"tag":1026,"props":3559,"children":3560},{"style":1041},[3561],{"type":998,"value":3562},"by_name ",{"type":993,"tag":1026,"props":3564,"children":3565},{"style":1047},[3566],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3568,"children":3569},{"style":1058},[3570],{"type":998,"value":2297},{"type":993,"tag":1026,"props":3572,"children":3573},{"style":1041},[3574],{"type":998,"value":3496},{"type":993,"tag":1026,"props":3576,"children":3577},{"style":1870},[3578],{"type":998,"value":2018},{"type":993,"tag":1026,"props":3580,"children":3581},{"style":1047},[3582],{"type":998,"value":3505},{"type":993,"tag":1026,"props":3584,"children":3585},{"style":1041},[3586],{"type":998,"value":3510},{"type":993,"tag":1026,"props":3588,"children":3589},{"style":1058},[3590],{"type":998,"value":3591},"0",{"type":993,"tag":1026,"props":3593,"children":3594},{"style":1041},[3595],{"type":998,"value":1343},{"type":993,"tag":1026,"props":3597,"children":3598},{"class":1028,"line":109},[3599,3603,3607,3612],{"type":993,"tag":1026,"props":3600,"children":3601},{"style":1058},[3602],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3604,"children":3605},{"style":1041},[3606],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3608,"children":3609},{"style":1140},[3610],{"type":998,"value":3611},"\"Sorted by name:\"",{"type":993,"tag":1026,"props":3613,"children":3614},{"style":1041},[3615],{"type":998,"value":3616},", by_name)\n",{"type":993,"tag":1465,"props":3618,"children":3620},{"id":3619},"sorting-with-multiple-criteria",[3621],{"type":998,"value":3622},"Sorting with Multiple Criteria",{"type":993,"tag":1012,"props":3624,"children":3625},{},[3626],{"type":993,"tag":1016,"props":3627,"children":3629},{"className":1018,"code":3628,"language":6,"meta":8,"style":8},"# Sorting with multiple criteria\npeople = [(\"Alice\", 25, 85), (\"Bob\", 30, 92), (\"Charlie\", 25, 78)]\nprint(\"Original people:\", people)\n\n# Sort by age, then by score\nby_age_score = sorted(people, key=lambda x: (x[1], x[2]))\nprint(\"By age, then score:\", by_age_score)\n",[3630],{"type":993,"tag":1022,"props":3631,"children":3632},{"__ignoreMap":8},[3633,3641,3733,3754,3761,3769,3821],{"type":993,"tag":1026,"props":3634,"children":3635},{"class":1028,"line":12},[3636],{"type":993,"tag":1026,"props":3637,"children":3638},{"style":1032},[3639],{"type":998,"value":3640},"# Sorting with multiple criteria\n",{"type":993,"tag":1026,"props":3642,"children":3643},{"class":1028,"line":27},[3644,3649,3653,3658,3662,3666,3670,3674,3678,3683,3687,3691,3696,3700,3704,3708,3712,3716,3720,3724,3728],{"type":993,"tag":1026,"props":3645,"children":3646},{"style":1041},[3647],{"type":998,"value":3648},"people ",{"type":993,"tag":1026,"props":3650,"children":3651},{"style":1047},[3652],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3654,"children":3655},{"style":1041},[3656],{"type":998,"value":3657}," [(",{"type":993,"tag":1026,"props":3659,"children":3660},{"style":1140},[3661],{"type":998,"value":1152},{"type":993,"tag":1026,"props":3663,"children":3664},{"style":1041},[3665],{"type":998,"value":1066},{"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":1066},{"type":993,"tag":1026,"props":3675,"children":3676},{"style":1058},[3677],{"type":998,"value":1791},{"type":993,"tag":1026,"props":3679,"children":3680},{"style":1041},[3681],{"type":998,"value":3682},"), (",{"type":993,"tag":1026,"props":3684,"children":3685},{"style":1140},[3686],{"type":998,"value":1161},{"type":993,"tag":1026,"props":3688,"children":3689},{"style":1041},[3690],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3692,"children":3693},{"style":1058},[3694],{"type":998,"value":3695},"30",{"type":993,"tag":1026,"props":3697,"children":3698},{"style":1041},[3699],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3701,"children":3702},{"style":1058},[3703],{"type":998,"value":1800},{"type":993,"tag":1026,"props":3705,"children":3706},{"style":1041},[3707],{"type":998,"value":3682},{"type":993,"tag":1026,"props":3709,"children":3710},{"style":1140},[3711],{"type":998,"value":1143},{"type":993,"tag":1026,"props":3713,"children":3714},{"style":1041},[3715],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3717,"children":3718},{"style":1058},[3719],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3721,"children":3722},{"style":1041},[3723],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3725,"children":3726},{"style":1058},[3727],{"type":998,"value":1809},{"type":993,"tag":1026,"props":3729,"children":3730},{"style":1041},[3731],{"type":998,"value":3732},")]\n",{"type":993,"tag":1026,"props":3734,"children":3735},{"class":1028,"line":36},[3736,3740,3744,3749],{"type":993,"tag":1026,"props":3737,"children":3738},{"style":1058},[3739],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3741,"children":3742},{"style":1041},[3743],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3745,"children":3746},{"style":1140},[3747],{"type":998,"value":3748},"\"Original people:\"",{"type":993,"tag":1026,"props":3750,"children":3751},{"style":1041},[3752],{"type":998,"value":3753},", people)\n",{"type":993,"tag":1026,"props":3755,"children":3756},{"class":1028,"line":45},[3757],{"type":993,"tag":1026,"props":3758,"children":3759},{"emptyLinePlaceholder":13},[3760],{"type":998,"value":1182},{"type":993,"tag":1026,"props":3762,"children":3763},{"class":1028,"line":54},[3764],{"type":993,"tag":1026,"props":3765,"children":3766},{"style":1032},[3767],{"type":998,"value":3768},"# Sort by age, then by score\n",{"type":993,"tag":1026,"props":3770,"children":3771},{"class":1028,"line":63},[3772,3777,3781,3785,3790,3794,3798,3803,3807,3812,3816],{"type":993,"tag":1026,"props":3773,"children":3774},{"style":1041},[3775],{"type":998,"value":3776},"by_age_score ",{"type":993,"tag":1026,"props":3778,"children":3779},{"style":1047},[3780],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3782,"children":3783},{"style":1058},[3784],{"type":998,"value":2297},{"type":993,"tag":1026,"props":3786,"children":3787},{"style":1041},[3788],{"type":998,"value":3789},"(people, ",{"type":993,"tag":1026,"props":3791,"children":3792},{"style":1870},[3793],{"type":998,"value":2018},{"type":993,"tag":1026,"props":3795,"children":3796},{"style":1047},[3797],{"type":998,"value":3505},{"type":993,"tag":1026,"props":3799,"children":3800},{"style":1041},[3801],{"type":998,"value":3802}," x: (x[",{"type":993,"tag":1026,"props":3804,"children":3805},{"style":1058},[3806],{"type":998,"value":1338},{"type":993,"tag":1026,"props":3808,"children":3809},{"style":1041},[3810],{"type":998,"value":3811},"], x[",{"type":993,"tag":1026,"props":3813,"children":3814},{"style":1058},[3815],{"type":998,"value":2734},{"type":993,"tag":1026,"props":3817,"children":3818},{"style":1041},[3819],{"type":998,"value":3820},"]))\n",{"type":993,"tag":1026,"props":3822,"children":3823},{"class":1028,"line":72},[3824,3828,3832,3837],{"type":993,"tag":1026,"props":3825,"children":3826},{"style":1058},[3827],{"type":998,"value":1190},{"type":993,"tag":1026,"props":3829,"children":3830},{"style":1041},[3831],{"type":998,"value":1195},{"type":993,"tag":1026,"props":3833,"children":3834},{"style":1140},[3835],{"type":998,"value":3836},"\"By age, then score:\"",{"type":993,"tag":1026,"props":3838,"children":3839},{"style":1041},[3840],{"type":998,"value":3841},", by_age_score)\n",{"type":993,"tag":1345,"props":3843,"children":3845},{"id":3844},"️-sorting-complex-data-structures",[3846],{"type":998,"value":3847},"🏗️ Sorting Complex Data Structures",{"type":993,"tag":1001,"props":3849,"children":3850},{},[3851],{"type":998,"value":3852},"When working with complex data like dictionaries in lists, you need specialized sorting approaches.",{"type":993,"tag":1465,"props":3854,"children":3856},{"id":3855},"sorting-lists-of-dictionaries",[3857],{"type":998,"value":3858},"Sorting Lists of Dictionaries",{"type":993,"tag":1012,"props":3860,"children":3861},{},[3862],{"type":993,"tag":1016,"props":3863,"children":3865},{"className":1018,"code":3864,"language":6,"meta":8,"style":8},"# Sorting lists of dictionaries\nproducts = [\n    {\"name\": \"laptop\", \"price\": 999},\n    {\"name\": \"mouse\", \"price\": 25},\n    {\"name\": \"keyboard\", \"price\": 75}\n]\nprint(\"Original products:\")\nfor product in products:\n    print(f\"  {product}\")\n\n# Sort by price\nby_price = sorted(products, key=lambda x: x[\"price\"])\nprint(\"\\nSorted by price:\")\nfor product in by_price:\n    print(f\"  {product}\")\n",[3866],{"type":993,"tag":1022,"props":3867,"children":3868},{"__ignoreMap":8},[3869,3877,3894,3940,3980,4022,4029,4049,4072,4118,4125,4133,4174,4203,4223],{"type":993,"tag":1026,"props":3870,"children":3871},{"class":1028,"line":12},[3872],{"type":993,"tag":1026,"props":3873,"children":3874},{"style":1032},[3875],{"type":998,"value":3876},"# Sorting lists of dictionaries\n",{"type":993,"tag":1026,"props":3878,"children":3879},{"class":1028,"line":27},[3880,3885,3889],{"type":993,"tag":1026,"props":3881,"children":3882},{"style":1041},[3883],{"type":998,"value":3884},"products ",{"type":993,"tag":1026,"props":3886,"children":3887},{"style":1047},[3888],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3890,"children":3891},{"style":1041},[3892],{"type":998,"value":3893}," [\n",{"type":993,"tag":1026,"props":3895,"children":3896},{"class":1028,"line":36},[3897,3902,3907,3912,3917,3921,3926,3930,3935],{"type":993,"tag":1026,"props":3898,"children":3899},{"style":1041},[3900],{"type":998,"value":3901},"    {",{"type":993,"tag":1026,"props":3903,"children":3904},{"style":1140},[3905],{"type":998,"value":3906},"\"name\"",{"type":993,"tag":1026,"props":3908,"children":3909},{"style":1041},[3910],{"type":998,"value":3911},": ",{"type":993,"tag":1026,"props":3913,"children":3914},{"style":1140},[3915],{"type":998,"value":3916},"\"laptop\"",{"type":993,"tag":1026,"props":3918,"children":3919},{"style":1041},[3920],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3922,"children":3923},{"style":1140},[3924],{"type":998,"value":3925},"\"price\"",{"type":993,"tag":1026,"props":3927,"children":3928},{"style":1041},[3929],{"type":998,"value":3911},{"type":993,"tag":1026,"props":3931,"children":3932},{"style":1058},[3933],{"type":998,"value":3934},"999",{"type":993,"tag":1026,"props":3936,"children":3937},{"style":1041},[3938],{"type":998,"value":3939},"},\n",{"type":993,"tag":1026,"props":3941,"children":3942},{"class":1028,"line":45},[3943,3947,3951,3955,3960,3964,3968,3972,3976],{"type":993,"tag":1026,"props":3944,"children":3945},{"style":1041},[3946],{"type":998,"value":3901},{"type":993,"tag":1026,"props":3948,"children":3949},{"style":1140},[3950],{"type":998,"value":3906},{"type":993,"tag":1026,"props":3952,"children":3953},{"style":1041},[3954],{"type":998,"value":3911},{"type":993,"tag":1026,"props":3956,"children":3957},{"style":1140},[3958],{"type":998,"value":3959},"\"mouse\"",{"type":993,"tag":1026,"props":3961,"children":3962},{"style":1041},[3963],{"type":998,"value":1066},{"type":993,"tag":1026,"props":3965,"children":3966},{"style":1140},[3967],{"type":998,"value":3925},{"type":993,"tag":1026,"props":3969,"children":3970},{"style":1041},[3971],{"type":998,"value":3911},{"type":993,"tag":1026,"props":3973,"children":3974},{"style":1058},[3975],{"type":998,"value":1080},{"type":993,"tag":1026,"props":3977,"children":3978},{"style":1041},[3979],{"type":998,"value":3939},{"type":993,"tag":1026,"props":3981,"children":3982},{"class":1028,"line":54},[3983,3987,3991,3995,4000,4004,4008,4012,4017],{"type":993,"tag":1026,"props":3984,"children":3985},{"style":1041},[3986],{"type":998,"value":3901},{"type":993,"tag":1026,"props":3988,"children":3989},{"style":1140},[3990],{"type":998,"value":3906},{"type":993,"tag":1026,"props":3992,"children":3993},{"style":1041},[3994],{"type":998,"value":3911},{"type":993,"tag":1026,"props":3996,"children":3997},{"style":1140},[3998],{"type":998,"value":3999},"\"keyboard\"",{"type":993,"tag":1026,"props":4001,"children":4002},{"style":1041},[4003],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4005,"children":4006},{"style":1140},[4007],{"type":998,"value":3925},{"type":993,"tag":1026,"props":4009,"children":4010},{"style":1041},[4011],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4013,"children":4014},{"style":1058},[4015],{"type":998,"value":4016},"75",{"type":993,"tag":1026,"props":4018,"children":4019},{"style":1041},[4020],{"type":998,"value":4021},"}\n",{"type":993,"tag":1026,"props":4023,"children":4024},{"class":1028,"line":63},[4025],{"type":993,"tag":1026,"props":4026,"children":4027},{"style":1041},[4028],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4030,"children":4031},{"class":1028,"line":72},[4032,4036,4040,4045],{"type":993,"tag":1026,"props":4033,"children":4034},{"style":1058},[4035],{"type":998,"value":1190},{"type":993,"tag":1026,"props":4037,"children":4038},{"style":1041},[4039],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4041,"children":4042},{"style":1140},[4043],{"type":998,"value":4044},"\"Original products:\"",{"type":993,"tag":1026,"props":4046,"children":4047},{"style":1041},[4048],{"type":998,"value":1886},{"type":993,"tag":1026,"props":4050,"children":4051},{"class":1028,"line":81},[4052,4057,4062,4067],{"type":993,"tag":1026,"props":4053,"children":4054},{"style":1047},[4055],{"type":998,"value":4056},"for",{"type":993,"tag":1026,"props":4058,"children":4059},{"style":1041},[4060],{"type":998,"value":4061}," product ",{"type":993,"tag":1026,"props":4063,"children":4064},{"style":1047},[4065],{"type":998,"value":4066},"in",{"type":993,"tag":1026,"props":4068,"children":4069},{"style":1041},[4070],{"type":998,"value":4071}," products:\n",{"type":993,"tag":1026,"props":4073,"children":4074},{"class":1028,"line":91},[4075,4080,4084,4089,4094,4099,4104,4109,4114],{"type":993,"tag":1026,"props":4076,"children":4077},{"style":1058},[4078],{"type":998,"value":4079},"    print",{"type":993,"tag":1026,"props":4081,"children":4082},{"style":1041},[4083],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4085,"children":4086},{"style":1047},[4087],{"type":998,"value":4088},"f",{"type":993,"tag":1026,"props":4090,"children":4091},{"style":1140},[4092],{"type":998,"value":4093},"\"  ",{"type":993,"tag":1026,"props":4095,"children":4096},{"style":1058},[4097],{"type":998,"value":4098},"{",{"type":993,"tag":1026,"props":4100,"children":4101},{"style":1041},[4102],{"type":998,"value":4103},"product",{"type":993,"tag":1026,"props":4105,"children":4106},{"style":1058},[4107],{"type":998,"value":4108},"}",{"type":993,"tag":1026,"props":4110,"children":4111},{"style":1140},[4112],{"type":998,"value":4113},"\"",{"type":993,"tag":1026,"props":4115,"children":4116},{"style":1041},[4117],{"type":998,"value":1886},{"type":993,"tag":1026,"props":4119,"children":4120},{"class":1028,"line":100},[4121],{"type":993,"tag":1026,"props":4122,"children":4123},{"emptyLinePlaceholder":13},[4124],{"type":998,"value":1182},{"type":993,"tag":1026,"props":4126,"children":4127},{"class":1028,"line":109},[4128],{"type":993,"tag":1026,"props":4129,"children":4130},{"style":1032},[4131],{"type":998,"value":4132},"# Sort by price\n",{"type":993,"tag":1026,"props":4134,"children":4135},{"class":1028,"line":118},[4136,4141,4145,4149,4154,4158,4162,4166,4170],{"type":993,"tag":1026,"props":4137,"children":4138},{"style":1041},[4139],{"type":998,"value":4140},"by_price ",{"type":993,"tag":1026,"props":4142,"children":4143},{"style":1047},[4144],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4146,"children":4147},{"style":1058},[4148],{"type":998,"value":2297},{"type":993,"tag":1026,"props":4150,"children":4151},{"style":1041},[4152],{"type":998,"value":4153},"(products, ",{"type":993,"tag":1026,"props":4155,"children":4156},{"style":1870},[4157],{"type":998,"value":2018},{"type":993,"tag":1026,"props":4159,"children":4160},{"style":1047},[4161],{"type":998,"value":3505},{"type":993,"tag":1026,"props":4163,"children":4164},{"style":1041},[4165],{"type":998,"value":3510},{"type":993,"tag":1026,"props":4167,"children":4168},{"style":1140},[4169],{"type":998,"value":3925},{"type":993,"tag":1026,"props":4171,"children":4172},{"style":1041},[4173],{"type":998,"value":1343},{"type":993,"tag":1026,"props":4175,"children":4176},{"class":1028,"line":127},[4177,4181,4185,4189,4194,4199],{"type":993,"tag":1026,"props":4178,"children":4179},{"style":1058},[4180],{"type":998,"value":1190},{"type":993,"tag":1026,"props":4182,"children":4183},{"style":1041},[4184],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4186,"children":4187},{"style":1140},[4188],{"type":998,"value":4113},{"type":993,"tag":1026,"props":4190,"children":4191},{"style":1058},[4192],{"type":998,"value":4193},"\\n",{"type":993,"tag":1026,"props":4195,"children":4196},{"style":1140},[4197],{"type":998,"value":4198},"Sorted by price:\"",{"type":993,"tag":1026,"props":4200,"children":4201},{"style":1041},[4202],{"type":998,"value":1886},{"type":993,"tag":1026,"props":4204,"children":4205},{"class":1028,"line":136},[4206,4210,4214,4218],{"type":993,"tag":1026,"props":4207,"children":4208},{"style":1047},[4209],{"type":998,"value":4056},{"type":993,"tag":1026,"props":4211,"children":4212},{"style":1041},[4213],{"type":998,"value":4061},{"type":993,"tag":1026,"props":4215,"children":4216},{"style":1047},[4217],{"type":998,"value":4066},{"type":993,"tag":1026,"props":4219,"children":4220},{"style":1041},[4221],{"type":998,"value":4222}," by_price:\n",{"type":993,"tag":1026,"props":4224,"children":4225},{"class":1028,"line":146},[4226,4230,4234,4238,4242,4246,4250,4254,4258],{"type":993,"tag":1026,"props":4227,"children":4228},{"style":1058},[4229],{"type":998,"value":4079},{"type":993,"tag":1026,"props":4231,"children":4232},{"style":1041},[4233],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4235,"children":4236},{"style":1047},[4237],{"type":998,"value":4088},{"type":993,"tag":1026,"props":4239,"children":4240},{"style":1140},[4241],{"type":998,"value":4093},{"type":993,"tag":1026,"props":4243,"children":4244},{"style":1058},[4245],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4247,"children":4248},{"style":1041},[4249],{"type":998,"value":4103},{"type":993,"tag":1026,"props":4251,"children":4252},{"style":1058},[4253],{"type":998,"value":4108},{"type":993,"tag":1026,"props":4255,"children":4256},{"style":1140},[4257],{"type":998,"value":4113},{"type":993,"tag":1026,"props":4259,"children":4260},{"style":1041},[4261],{"type":998,"value":1886},{"type":993,"tag":1465,"props":4263,"children":4265},{"id":4264},"sorting-by-multiple-dictionary-keys",[4266],{"type":998,"value":4267},"Sorting by Multiple Dictionary Keys",{"type":993,"tag":1012,"props":4269,"children":4270},{},[4271],{"type":993,"tag":1016,"props":4272,"children":4274},{"className":1018,"code":4273,"language":6,"meta":8,"style":8},"# Sorting by multiple keys\nemployees = [\n    {\"name\": \"Alice\", \"dept\": \"IT\", \"salary\": 70000},\n    {\"name\": \"Bob\", \"dept\": \"HR\", \"salary\": 65000},\n    {\"name\": \"Charlie\", \"dept\": \"IT\", \"salary\": 75000}\n]\n\n# Sort by department, then by salary\nby_dept_salary = sorted(employees, key=lambda x: (x[\"dept\"], x[\"salary\"]))\nprint(\"Sorted by dept, then salary:\")\nfor emp in by_dept_salary:\n    print(f\"  {emp['name']}: {emp['dept']}, ${emp['salary']}\")\n",[4275],{"type":993,"tag":1022,"props":4276,"children":4277},{"__ignoreMap":8},[4278,4286,4302,4361,4418,4474,4481,4488,4496,4545,4565,4586],{"type":993,"tag":1026,"props":4279,"children":4280},{"class":1028,"line":12},[4281],{"type":993,"tag":1026,"props":4282,"children":4283},{"style":1032},[4284],{"type":998,"value":4285},"# Sorting by multiple keys\n",{"type":993,"tag":1026,"props":4287,"children":4288},{"class":1028,"line":27},[4289,4294,4298],{"type":993,"tag":1026,"props":4290,"children":4291},{"style":1041},[4292],{"type":998,"value":4293},"employees ",{"type":993,"tag":1026,"props":4295,"children":4296},{"style":1047},[4297],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4299,"children":4300},{"style":1041},[4301],{"type":998,"value":3893},{"type":993,"tag":1026,"props":4303,"children":4304},{"class":1028,"line":36},[4305,4309,4313,4317,4321,4325,4330,4334,4339,4343,4348,4352,4357],{"type":993,"tag":1026,"props":4306,"children":4307},{"style":1041},[4308],{"type":998,"value":3901},{"type":993,"tag":1026,"props":4310,"children":4311},{"style":1140},[4312],{"type":998,"value":3906},{"type":993,"tag":1026,"props":4314,"children":4315},{"style":1041},[4316],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4318,"children":4319},{"style":1140},[4320],{"type":998,"value":1152},{"type":993,"tag":1026,"props":4322,"children":4323},{"style":1041},[4324],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4326,"children":4327},{"style":1140},[4328],{"type":998,"value":4329},"\"dept\"",{"type":993,"tag":1026,"props":4331,"children":4332},{"style":1041},[4333],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4335,"children":4336},{"style":1140},[4337],{"type":998,"value":4338},"\"IT\"",{"type":993,"tag":1026,"props":4340,"children":4341},{"style":1041},[4342],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4344,"children":4345},{"style":1140},[4346],{"type":998,"value":4347},"\"salary\"",{"type":993,"tag":1026,"props":4349,"children":4350},{"style":1041},[4351],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4353,"children":4354},{"style":1058},[4355],{"type":998,"value":4356},"70000",{"type":993,"tag":1026,"props":4358,"children":4359},{"style":1041},[4360],{"type":998,"value":3939},{"type":993,"tag":1026,"props":4362,"children":4363},{"class":1028,"line":45},[4364,4368,4372,4376,4380,4384,4388,4392,4397,4401,4405,4409,4414],{"type":993,"tag":1026,"props":4365,"children":4366},{"style":1041},[4367],{"type":998,"value":3901},{"type":993,"tag":1026,"props":4369,"children":4370},{"style":1140},[4371],{"type":998,"value":3906},{"type":993,"tag":1026,"props":4373,"children":4374},{"style":1041},[4375],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4377,"children":4378},{"style":1140},[4379],{"type":998,"value":1161},{"type":993,"tag":1026,"props":4381,"children":4382},{"style":1041},[4383],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4385,"children":4386},{"style":1140},[4387],{"type":998,"value":4329},{"type":993,"tag":1026,"props":4389,"children":4390},{"style":1041},[4391],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4393,"children":4394},{"style":1140},[4395],{"type":998,"value":4396},"\"HR\"",{"type":993,"tag":1026,"props":4398,"children":4399},{"style":1041},[4400],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4402,"children":4403},{"style":1140},[4404],{"type":998,"value":4347},{"type":993,"tag":1026,"props":4406,"children":4407},{"style":1041},[4408],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4410,"children":4411},{"style":1058},[4412],{"type":998,"value":4413},"65000",{"type":993,"tag":1026,"props":4415,"children":4416},{"style":1041},[4417],{"type":998,"value":3939},{"type":993,"tag":1026,"props":4419,"children":4420},{"class":1028,"line":54},[4421,4425,4429,4433,4437,4441,4445,4449,4453,4457,4461,4465,4470],{"type":993,"tag":1026,"props":4422,"children":4423},{"style":1041},[4424],{"type":998,"value":3901},{"type":993,"tag":1026,"props":4426,"children":4427},{"style":1140},[4428],{"type":998,"value":3906},{"type":993,"tag":1026,"props":4430,"children":4431},{"style":1041},[4432],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4434,"children":4435},{"style":1140},[4436],{"type":998,"value":1143},{"type":993,"tag":1026,"props":4438,"children":4439},{"style":1041},[4440],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4442,"children":4443},{"style":1140},[4444],{"type":998,"value":4329},{"type":993,"tag":1026,"props":4446,"children":4447},{"style":1041},[4448],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4450,"children":4451},{"style":1140},[4452],{"type":998,"value":4338},{"type":993,"tag":1026,"props":4454,"children":4455},{"style":1041},[4456],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4458,"children":4459},{"style":1140},[4460],{"type":998,"value":4347},{"type":993,"tag":1026,"props":4462,"children":4463},{"style":1041},[4464],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4466,"children":4467},{"style":1058},[4468],{"type":998,"value":4469},"75000",{"type":993,"tag":1026,"props":4471,"children":4472},{"style":1041},[4473],{"type":998,"value":4021},{"type":993,"tag":1026,"props":4475,"children":4476},{"class":1028,"line":63},[4477],{"type":993,"tag":1026,"props":4478,"children":4479},{"style":1041},[4480],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4482,"children":4483},{"class":1028,"line":72},[4484],{"type":993,"tag":1026,"props":4485,"children":4486},{"emptyLinePlaceholder":13},[4487],{"type":998,"value":1182},{"type":993,"tag":1026,"props":4489,"children":4490},{"class":1028,"line":81},[4491],{"type":993,"tag":1026,"props":4492,"children":4493},{"style":1032},[4494],{"type":998,"value":4495},"# Sort by department, then by salary\n",{"type":993,"tag":1026,"props":4497,"children":4498},{"class":1028,"line":91},[4499,4504,4508,4512,4517,4521,4525,4529,4533,4537,4541],{"type":993,"tag":1026,"props":4500,"children":4501},{"style":1041},[4502],{"type":998,"value":4503},"by_dept_salary ",{"type":993,"tag":1026,"props":4505,"children":4506},{"style":1047},[4507],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4509,"children":4510},{"style":1058},[4511],{"type":998,"value":2297},{"type":993,"tag":1026,"props":4513,"children":4514},{"style":1041},[4515],{"type":998,"value":4516},"(employees, ",{"type":993,"tag":1026,"props":4518,"children":4519},{"style":1870},[4520],{"type":998,"value":2018},{"type":993,"tag":1026,"props":4522,"children":4523},{"style":1047},[4524],{"type":998,"value":3505},{"type":993,"tag":1026,"props":4526,"children":4527},{"style":1041},[4528],{"type":998,"value":3802},{"type":993,"tag":1026,"props":4530,"children":4531},{"style":1140},[4532],{"type":998,"value":4329},{"type":993,"tag":1026,"props":4534,"children":4535},{"style":1041},[4536],{"type":998,"value":3811},{"type":993,"tag":1026,"props":4538,"children":4539},{"style":1140},[4540],{"type":998,"value":4347},{"type":993,"tag":1026,"props":4542,"children":4543},{"style":1041},[4544],{"type":998,"value":3820},{"type":993,"tag":1026,"props":4546,"children":4547},{"class":1028,"line":100},[4548,4552,4556,4561],{"type":993,"tag":1026,"props":4549,"children":4550},{"style":1058},[4551],{"type":998,"value":1190},{"type":993,"tag":1026,"props":4553,"children":4554},{"style":1041},[4555],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4557,"children":4558},{"style":1140},[4559],{"type":998,"value":4560},"\"Sorted by dept, then salary:\"",{"type":993,"tag":1026,"props":4562,"children":4563},{"style":1041},[4564],{"type":998,"value":1886},{"type":993,"tag":1026,"props":4566,"children":4567},{"class":1028,"line":109},[4568,4572,4577,4581],{"type":993,"tag":1026,"props":4569,"children":4570},{"style":1047},[4571],{"type":998,"value":4056},{"type":993,"tag":1026,"props":4573,"children":4574},{"style":1041},[4575],{"type":998,"value":4576}," emp ",{"type":993,"tag":1026,"props":4578,"children":4579},{"style":1047},[4580],{"type":998,"value":4066},{"type":993,"tag":1026,"props":4582,"children":4583},{"style":1041},[4584],{"type":998,"value":4585}," by_dept_salary:\n",{"type":993,"tag":1026,"props":4587,"children":4588},{"class":1028,"line":118},[4589,4593,4597,4601,4605,4609,4614,4619,4624,4628,4632,4636,4640,4645,4649,4653,4658,4662,4666,4671,4675,4679,4683],{"type":993,"tag":1026,"props":4590,"children":4591},{"style":1058},[4592],{"type":998,"value":4079},{"type":993,"tag":1026,"props":4594,"children":4595},{"style":1041},[4596],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4598,"children":4599},{"style":1047},[4600],{"type":998,"value":4088},{"type":993,"tag":1026,"props":4602,"children":4603},{"style":1140},[4604],{"type":998,"value":4093},{"type":993,"tag":1026,"props":4606,"children":4607},{"style":1058},[4608],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4610,"children":4611},{"style":1041},[4612],{"type":998,"value":4613},"emp[",{"type":993,"tag":1026,"props":4615,"children":4616},{"style":1140},[4617],{"type":998,"value":4618},"'name'",{"type":993,"tag":1026,"props":4620,"children":4621},{"style":1041},[4622],{"type":998,"value":4623},"]",{"type":993,"tag":1026,"props":4625,"children":4626},{"style":1058},[4627],{"type":998,"value":4108},{"type":993,"tag":1026,"props":4629,"children":4630},{"style":1140},[4631],{"type":998,"value":3911},{"type":993,"tag":1026,"props":4633,"children":4634},{"style":1058},[4635],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4637,"children":4638},{"style":1041},[4639],{"type":998,"value":4613},{"type":993,"tag":1026,"props":4641,"children":4642},{"style":1140},[4643],{"type":998,"value":4644},"'dept'",{"type":993,"tag":1026,"props":4646,"children":4647},{"style":1041},[4648],{"type":998,"value":4623},{"type":993,"tag":1026,"props":4650,"children":4651},{"style":1058},[4652],{"type":998,"value":4108},{"type":993,"tag":1026,"props":4654,"children":4655},{"style":1140},[4656],{"type":998,"value":4657},", $",{"type":993,"tag":1026,"props":4659,"children":4660},{"style":1058},[4661],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4663,"children":4664},{"style":1041},[4665],{"type":998,"value":4613},{"type":993,"tag":1026,"props":4667,"children":4668},{"style":1140},[4669],{"type":998,"value":4670},"'salary'",{"type":993,"tag":1026,"props":4672,"children":4673},{"style":1041},[4674],{"type":998,"value":4623},{"type":993,"tag":1026,"props":4676,"children":4677},{"style":1058},[4678],{"type":998,"value":4108},{"type":993,"tag":1026,"props":4680,"children":4681},{"style":1140},[4682],{"type":998,"value":4113},{"type":993,"tag":1026,"props":4684,"children":4685},{"style":1041},[4686],{"type":998,"value":1886},{"type":993,"tag":4688,"props":4689,"children":4692},"exercise",{"hint":4690,"prompt":4691},"Use a tuple in the key function to sort by multiple criteria","Create a function that sorts a list of student records by grade (highest first), and for students with the same grade, sort by name alphabetically",[4693],{"type":993,"tag":1016,"props":4694,"children":4696},{"className":1018,"code":4695,"language":6,"meta":8,"style":8},"def sort_students(students):\n    # TODO: Sort by grade (descending) then by name (ascending)\n    # Use a tuple in the key function: (-grade, name)\n    # TODO: Your code here\n    return sorted_students\n\n# Test the function\nstudent_list = [\n    (\"Charlie\", 85),\n    (\"Alice\", 92),\n    (\"Bob\", 85),\n    (\"Diana\", 92),\n    (\"Eve\", 78)\n]\n\nprint(\"Original students:\", student_list)\nsorted_students = sort_students(student_list)\nprint(\"Sorted students:\", sorted_students)\n",[4697],{"type":993,"tag":1022,"props":4698,"children":4699},{"__ignoreMap":8},[4700,4719,4737,4745,4761,4774,4781,4789,4805,4830,4853,4876,4899,4923,4930,4937,4957,4974],{"type":993,"tag":1026,"props":4701,"children":4702},{"class":1028,"line":12},[4703,4708,4714],{"type":993,"tag":1026,"props":4704,"children":4705},{"style":1047},[4706],{"type":998,"value":4707},"def",{"type":993,"tag":1026,"props":4709,"children":4711},{"style":4710},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[4712],{"type":998,"value":4713}," sort_students",{"type":993,"tag":1026,"props":4715,"children":4716},{"style":1041},[4717],{"type":998,"value":4718},"(students):\n",{"type":993,"tag":1026,"props":4720,"children":4721},{"class":1028,"line":27},[4722,4727,4732],{"type":993,"tag":1026,"props":4723,"children":4724},{"style":1032},[4725],{"type":998,"value":4726},"    # ",{"type":993,"tag":1026,"props":4728,"children":4729},{"style":1047},[4730],{"type":998,"value":4731},"TODO",{"type":993,"tag":1026,"props":4733,"children":4734},{"style":1032},[4735],{"type":998,"value":4736},": Sort by grade (descending) then by name (ascending)\n",{"type":993,"tag":1026,"props":4738,"children":4739},{"class":1028,"line":36},[4740],{"type":993,"tag":1026,"props":4741,"children":4742},{"style":1032},[4743],{"type":998,"value":4744},"    # Use a tuple in the key function: (-grade, name)\n",{"type":993,"tag":1026,"props":4746,"children":4747},{"class":1028,"line":45},[4748,4752,4756],{"type":993,"tag":1026,"props":4749,"children":4750},{"style":1032},[4751],{"type":998,"value":4726},{"type":993,"tag":1026,"props":4753,"children":4754},{"style":1047},[4755],{"type":998,"value":4731},{"type":993,"tag":1026,"props":4757,"children":4758},{"style":1032},[4759],{"type":998,"value":4760},": Your code here\n",{"type":993,"tag":1026,"props":4762,"children":4763},{"class":1028,"line":54},[4764,4769],{"type":993,"tag":1026,"props":4765,"children":4766},{"style":1047},[4767],{"type":998,"value":4768},"    return",{"type":993,"tag":1026,"props":4770,"children":4771},{"style":1041},[4772],{"type":998,"value":4773}," sorted_students\n",{"type":993,"tag":1026,"props":4775,"children":4776},{"class":1028,"line":63},[4777],{"type":993,"tag":1026,"props":4778,"children":4779},{"emptyLinePlaceholder":13},[4780],{"type":998,"value":1182},{"type":993,"tag":1026,"props":4782,"children":4783},{"class":1028,"line":72},[4784],{"type":993,"tag":1026,"props":4785,"children":4786},{"style":1032},[4787],{"type":998,"value":4788},"# Test the function\n",{"type":993,"tag":1026,"props":4790,"children":4791},{"class":1028,"line":81},[4792,4797,4801],{"type":993,"tag":1026,"props":4793,"children":4794},{"style":1041},[4795],{"type":998,"value":4796},"student_list ",{"type":993,"tag":1026,"props":4798,"children":4799},{"style":1047},[4800],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4802,"children":4803},{"style":1041},[4804],{"type":998,"value":3893},{"type":993,"tag":1026,"props":4806,"children":4807},{"class":1028,"line":91},[4808,4813,4817,4821,4825],{"type":993,"tag":1026,"props":4809,"children":4810},{"style":1041},[4811],{"type":998,"value":4812},"    (",{"type":993,"tag":1026,"props":4814,"children":4815},{"style":1140},[4816],{"type":998,"value":1143},{"type":993,"tag":1026,"props":4818,"children":4819},{"style":1041},[4820],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4822,"children":4823},{"style":1058},[4824],{"type":998,"value":1791},{"type":993,"tag":1026,"props":4826,"children":4827},{"style":1041},[4828],{"type":998,"value":4829},"),\n",{"type":993,"tag":1026,"props":4831,"children":4832},{"class":1028,"line":100},[4833,4837,4841,4845,4849],{"type":993,"tag":1026,"props":4834,"children":4835},{"style":1041},[4836],{"type":998,"value":4812},{"type":993,"tag":1026,"props":4838,"children":4839},{"style":1140},[4840],{"type":998,"value":1152},{"type":993,"tag":1026,"props":4842,"children":4843},{"style":1041},[4844],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4846,"children":4847},{"style":1058},[4848],{"type":998,"value":1800},{"type":993,"tag":1026,"props":4850,"children":4851},{"style":1041},[4852],{"type":998,"value":4829},{"type":993,"tag":1026,"props":4854,"children":4855},{"class":1028,"line":109},[4856,4860,4864,4868,4872],{"type":993,"tag":1026,"props":4857,"children":4858},{"style":1041},[4859],{"type":998,"value":4812},{"type":993,"tag":1026,"props":4861,"children":4862},{"style":1140},[4863],{"type":998,"value":1161},{"type":993,"tag":1026,"props":4865,"children":4866},{"style":1041},[4867],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4869,"children":4870},{"style":1058},[4871],{"type":998,"value":1791},{"type":993,"tag":1026,"props":4873,"children":4874},{"style":1041},[4875],{"type":998,"value":4829},{"type":993,"tag":1026,"props":4877,"children":4878},{"class":1028,"line":118},[4879,4883,4887,4891,4895],{"type":993,"tag":1026,"props":4880,"children":4881},{"style":1041},[4882],{"type":998,"value":4812},{"type":993,"tag":1026,"props":4884,"children":4885},{"style":1140},[4886],{"type":998,"value":1170},{"type":993,"tag":1026,"props":4888,"children":4889},{"style":1041},[4890],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4892,"children":4893},{"style":1058},[4894],{"type":998,"value":1800},{"type":993,"tag":1026,"props":4896,"children":4897},{"style":1041},[4898],{"type":998,"value":4829},{"type":993,"tag":1026,"props":4900,"children":4901},{"class":1028,"line":127},[4902,4906,4911,4915,4919],{"type":993,"tag":1026,"props":4903,"children":4904},{"style":1041},[4905],{"type":998,"value":4812},{"type":993,"tag":1026,"props":4907,"children":4908},{"style":1140},[4909],{"type":998,"value":4910},"\"Eve\"",{"type":993,"tag":1026,"props":4912,"children":4913},{"style":1041},[4914],{"type":998,"value":1066},{"type":993,"tag":1026,"props":4916,"children":4917},{"style":1058},[4918],{"type":998,"value":1809},{"type":993,"tag":1026,"props":4920,"children":4921},{"style":1041},[4922],{"type":998,"value":1886},{"type":993,"tag":1026,"props":4924,"children":4925},{"class":1028,"line":136},[4926],{"type":993,"tag":1026,"props":4927,"children":4928},{"style":1041},[4929],{"type":998,"value":1121},{"type":993,"tag":1026,"props":4931,"children":4932},{"class":1028,"line":146},[4933],{"type":993,"tag":1026,"props":4934,"children":4935},{"emptyLinePlaceholder":13},[4936],{"type":998,"value":1182},{"type":993,"tag":1026,"props":4938,"children":4939},{"class":1028,"line":155},[4940,4944,4948,4952],{"type":993,"tag":1026,"props":4941,"children":4942},{"style":1058},[4943],{"type":998,"value":1190},{"type":993,"tag":1026,"props":4945,"children":4946},{"style":1041},[4947],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4949,"children":4950},{"style":1140},[4951],{"type":998,"value":3455},{"type":993,"tag":1026,"props":4953,"children":4954},{"style":1041},[4955],{"type":998,"value":4956},", student_list)\n",{"type":993,"tag":1026,"props":4958,"children":4959},{"class":1028,"line":164},[4960,4965,4969],{"type":993,"tag":1026,"props":4961,"children":4962},{"style":1041},[4963],{"type":998,"value":4964},"sorted_students ",{"type":993,"tag":1026,"props":4966,"children":4967},{"style":1047},[4968],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4970,"children":4971},{"style":1041},[4972],{"type":998,"value":4973}," sort_students(student_list)\n",{"type":993,"tag":1026,"props":4975,"children":4976},{"class":1028,"line":173},[4977,4981,4985,4990],{"type":993,"tag":1026,"props":4978,"children":4979},{"style":1058},[4980],{"type":998,"value":1190},{"type":993,"tag":1026,"props":4982,"children":4983},{"style":1041},[4984],{"type":998,"value":1195},{"type":993,"tag":1026,"props":4986,"children":4987},{"style":1140},[4988],{"type":998,"value":4989},"\"Sorted students:\"",{"type":993,"tag":1026,"props":4991,"children":4992},{"style":1041},[4993],{"type":998,"value":4994},", sorted_students)\n",{"type":993,"tag":1465,"props":4996,"children":4998},{"id":4997},"solution-and-explanation",[4999],{"type":998,"value":5000},"Solution and Explanation 💡",{"type":993,"tag":5002,"props":5003,"children":5004},"details",{},[5005,5013,5334,5342],{"type":993,"tag":5006,"props":5007,"children":5010},"summary",{"className":5008},[5009],"cursor-pointer",[5011],{"type":998,"value":5012},"Click to see the complete solution",{"type":993,"tag":1012,"props":5014,"children":5015},{},[5016],{"type":993,"tag":1016,"props":5017,"children":5019},{"className":1018,"code":5018,"language":6,"meta":8,"style":8},"def sort_students(students):\n    # Sort by grade (descending) then by name (ascending)\n    # Use negative grade for descending order, positive name for ascending\n    sorted_students = sorted(students, key=lambda x: (-x[1], x[0]))\n    return sorted_students\n\n# Test the function\nstudent_list = [\n    (\"Charlie\", 85),\n    (\"Alice\", 92),\n    (\"Bob\", 85),\n    (\"Diana\", 92),\n    (\"Eve\", 78)\n]\n\nprint(\"Original students:\", student_list)\nsorted_students = sort_students(student_list)\nprint(\"Sorted students:\", sorted_students)\n",[5020],{"type":993,"tag":1022,"props":5021,"children":5022},{"__ignoreMap":8},[5023,5038,5046,5054,5112,5123,5130,5137,5152,5175,5198,5221,5244,5267,5274,5281,5300,5315],{"type":993,"tag":1026,"props":5024,"children":5025},{"class":1028,"line":12},[5026,5030,5034],{"type":993,"tag":1026,"props":5027,"children":5028},{"style":1047},[5029],{"type":998,"value":4707},{"type":993,"tag":1026,"props":5031,"children":5032},{"style":4710},[5033],{"type":998,"value":4713},{"type":993,"tag":1026,"props":5035,"children":5036},{"style":1041},[5037],{"type":998,"value":4718},{"type":993,"tag":1026,"props":5039,"children":5040},{"class":1028,"line":27},[5041],{"type":993,"tag":1026,"props":5042,"children":5043},{"style":1032},[5044],{"type":998,"value":5045},"    # Sort by grade (descending) then by name (ascending)\n",{"type":993,"tag":1026,"props":5047,"children":5048},{"class":1028,"line":36},[5049],{"type":993,"tag":1026,"props":5050,"children":5051},{"style":1032},[5052],{"type":998,"value":5053},"    # Use negative grade for descending order, positive name for ascending\n",{"type":993,"tag":1026,"props":5055,"children":5056},{"class":1028,"line":45},[5057,5062,5066,5070,5074,5078,5082,5087,5091,5096,5100,5104,5108],{"type":993,"tag":1026,"props":5058,"children":5059},{"style":1041},[5060],{"type":998,"value":5061},"    sorted_students ",{"type":993,"tag":1026,"props":5063,"children":5064},{"style":1047},[5065],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5067,"children":5068},{"style":1058},[5069],{"type":998,"value":2297},{"type":993,"tag":1026,"props":5071,"children":5072},{"style":1041},[5073],{"type":998,"value":3496},{"type":993,"tag":1026,"props":5075,"children":5076},{"style":1870},[5077],{"type":998,"value":2018},{"type":993,"tag":1026,"props":5079,"children":5080},{"style":1047},[5081],{"type":998,"value":3505},{"type":993,"tag":1026,"props":5083,"children":5084},{"style":1041},[5085],{"type":998,"value":5086}," x: (",{"type":993,"tag":1026,"props":5088,"children":5089},{"style":1047},[5090],{"type":998,"value":1333},{"type":993,"tag":1026,"props":5092,"children":5093},{"style":1041},[5094],{"type":998,"value":5095},"x[",{"type":993,"tag":1026,"props":5097,"children":5098},{"style":1058},[5099],{"type":998,"value":1338},{"type":993,"tag":1026,"props":5101,"children":5102},{"style":1041},[5103],{"type":998,"value":3811},{"type":993,"tag":1026,"props":5105,"children":5106},{"style":1058},[5107],{"type":998,"value":3591},{"type":993,"tag":1026,"props":5109,"children":5110},{"style":1041},[5111],{"type":998,"value":3820},{"type":993,"tag":1026,"props":5113,"children":5114},{"class":1028,"line":54},[5115,5119],{"type":993,"tag":1026,"props":5116,"children":5117},{"style":1047},[5118],{"type":998,"value":4768},{"type":993,"tag":1026,"props":5120,"children":5121},{"style":1041},[5122],{"type":998,"value":4773},{"type":993,"tag":1026,"props":5124,"children":5125},{"class":1028,"line":63},[5126],{"type":993,"tag":1026,"props":5127,"children":5128},{"emptyLinePlaceholder":13},[5129],{"type":998,"value":1182},{"type":993,"tag":1026,"props":5131,"children":5132},{"class":1028,"line":72},[5133],{"type":993,"tag":1026,"props":5134,"children":5135},{"style":1032},[5136],{"type":998,"value":4788},{"type":993,"tag":1026,"props":5138,"children":5139},{"class":1028,"line":81},[5140,5144,5148],{"type":993,"tag":1026,"props":5141,"children":5142},{"style":1041},[5143],{"type":998,"value":4796},{"type":993,"tag":1026,"props":5145,"children":5146},{"style":1047},[5147],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5149,"children":5150},{"style":1041},[5151],{"type":998,"value":3893},{"type":993,"tag":1026,"props":5153,"children":5154},{"class":1028,"line":91},[5155,5159,5163,5167,5171],{"type":993,"tag":1026,"props":5156,"children":5157},{"style":1041},[5158],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5160,"children":5161},{"style":1140},[5162],{"type":998,"value":1143},{"type":993,"tag":1026,"props":5164,"children":5165},{"style":1041},[5166],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5168,"children":5169},{"style":1058},[5170],{"type":998,"value":1791},{"type":993,"tag":1026,"props":5172,"children":5173},{"style":1041},[5174],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5176,"children":5177},{"class":1028,"line":100},[5178,5182,5186,5190,5194],{"type":993,"tag":1026,"props":5179,"children":5180},{"style":1041},[5181],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5183,"children":5184},{"style":1140},[5185],{"type":998,"value":1152},{"type":993,"tag":1026,"props":5187,"children":5188},{"style":1041},[5189],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5191,"children":5192},{"style":1058},[5193],{"type":998,"value":1800},{"type":993,"tag":1026,"props":5195,"children":5196},{"style":1041},[5197],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5199,"children":5200},{"class":1028,"line":109},[5201,5205,5209,5213,5217],{"type":993,"tag":1026,"props":5202,"children":5203},{"style":1041},[5204],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5206,"children":5207},{"style":1140},[5208],{"type":998,"value":1161},{"type":993,"tag":1026,"props":5210,"children":5211},{"style":1041},[5212],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5214,"children":5215},{"style":1058},[5216],{"type":998,"value":1791},{"type":993,"tag":1026,"props":5218,"children":5219},{"style":1041},[5220],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5222,"children":5223},{"class":1028,"line":118},[5224,5228,5232,5236,5240],{"type":993,"tag":1026,"props":5225,"children":5226},{"style":1041},[5227],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5229,"children":5230},{"style":1140},[5231],{"type":998,"value":1170},{"type":993,"tag":1026,"props":5233,"children":5234},{"style":1041},[5235],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5237,"children":5238},{"style":1058},[5239],{"type":998,"value":1800},{"type":993,"tag":1026,"props":5241,"children":5242},{"style":1041},[5243],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5245,"children":5246},{"class":1028,"line":127},[5247,5251,5255,5259,5263],{"type":993,"tag":1026,"props":5248,"children":5249},{"style":1041},[5250],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5252,"children":5253},{"style":1140},[5254],{"type":998,"value":4910},{"type":993,"tag":1026,"props":5256,"children":5257},{"style":1041},[5258],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5260,"children":5261},{"style":1058},[5262],{"type":998,"value":1809},{"type":993,"tag":1026,"props":5264,"children":5265},{"style":1041},[5266],{"type":998,"value":1886},{"type":993,"tag":1026,"props":5268,"children":5269},{"class":1028,"line":136},[5270],{"type":993,"tag":1026,"props":5271,"children":5272},{"style":1041},[5273],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5275,"children":5276},{"class":1028,"line":146},[5277],{"type":993,"tag":1026,"props":5278,"children":5279},{"emptyLinePlaceholder":13},[5280],{"type":998,"value":1182},{"type":993,"tag":1026,"props":5282,"children":5283},{"class":1028,"line":155},[5284,5288,5292,5296],{"type":993,"tag":1026,"props":5285,"children":5286},{"style":1058},[5287],{"type":998,"value":1190},{"type":993,"tag":1026,"props":5289,"children":5290},{"style":1041},[5291],{"type":998,"value":1195},{"type":993,"tag":1026,"props":5293,"children":5294},{"style":1140},[5295],{"type":998,"value":3455},{"type":993,"tag":1026,"props":5297,"children":5298},{"style":1041},[5299],{"type":998,"value":4956},{"type":993,"tag":1026,"props":5301,"children":5302},{"class":1028,"line":164},[5303,5307,5311],{"type":993,"tag":1026,"props":5304,"children":5305},{"style":1041},[5306],{"type":998,"value":4964},{"type":993,"tag":1026,"props":5308,"children":5309},{"style":1047},[5310],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5312,"children":5313},{"style":1041},[5314],{"type":998,"value":4973},{"type":993,"tag":1026,"props":5316,"children":5317},{"class":1028,"line":173},[5318,5322,5326,5330],{"type":993,"tag":1026,"props":5319,"children":5320},{"style":1058},[5321],{"type":998,"value":1190},{"type":993,"tag":1026,"props":5323,"children":5324},{"style":1041},[5325],{"type":998,"value":1195},{"type":993,"tag":1026,"props":5327,"children":5328},{"style":1140},[5329],{"type":998,"value":4989},{"type":993,"tag":1026,"props":5331,"children":5332},{"style":1041},[5333],{"type":998,"value":4994},{"type":993,"tag":1001,"props":5335,"children":5336},{},[5337],{"type":993,"tag":1375,"props":5338,"children":5339},{},[5340],{"type":998,"value":5341},"Key Learning Points:",{"type":993,"tag":1381,"props":5343,"children":5344},{},[5345,5357,5376,5387],{"type":993,"tag":1385,"props":5346,"children":5347},{},[5348,5350,5355],{"type":998,"value":5349},"📌 ",{"type":993,"tag":1375,"props":5351,"children":5352},{},[5353],{"type":998,"value":5354},"Multiple criteria",{"type":998,"value":5356},": Use tuple in key function for multiple sort criteria",{"type":993,"tag":1385,"props":5358,"children":5359},{},[5360,5361,5366,5368,5374],{"type":998,"value":5349},{"type":993,"tag":1375,"props":5362,"children":5363},{},[5364],{"type":998,"value":5365},"Negative values",{"type":998,"value":5367},": Use ",{"type":993,"tag":1022,"props":5369,"children":5371},{"className":5370},[],[5372],{"type":998,"value":5373},"-x[1]",{"type":998,"value":5375}," to sort numbers in descending order",{"type":993,"tag":1385,"props":5377,"children":5378},{},[5379,5380,5385],{"type":998,"value":5349},{"type":993,"tag":1375,"props":5381,"children":5382},{},[5383],{"type":998,"value":5384},"Lambda functions",{"type":998,"value":5386},": Perfect for custom sorting logic",{"type":993,"tag":1385,"props":5388,"children":5389},{},[5390,5391,5396],{"type":998,"value":5349},{"type":993,"tag":1375,"props":5392,"children":5393},{},[5394],{"type":998,"value":5395},"Stable sorting",{"type":998,"value":5397},": Python's sort is stable, maintaining relative order for equal elements",{"type":993,"tag":1345,"props":5399,"children":5401},{"id":5400},"common-organization-patterns",[5402],{"type":998,"value":5403},"🎪 Common Organization Patterns",{"type":993,"tag":1465,"props":5405,"children":5407},{"id":5406},"alphabetical-organization",[5408],{"type":998,"value":5409},"Alphabetical Organization",{"type":993,"tag":1012,"props":5411,"children":5412},{},[5413],{"type":993,"tag":1016,"props":5414,"children":5416},{"className":1018,"code":5415,"language":6,"meta":8,"style":8},"# Alphabetical organization\nnames = [\"charlie\", \"Alice\", \"bob\", \"Diana\"]\nprint(\"Original names:\", names)\n\n# Case-insensitive alphabetical\nalphabetical = sorted(names, key=str.lower)\nprint(\"Alphabetical:\", alphabetical)\n",[5417],{"type":993,"tag":1022,"props":5418,"children":5419},{"__ignoreMap":8},[5420,5428,5477,5496,5503,5511,5548],{"type":993,"tag":1026,"props":5421,"children":5422},{"class":1028,"line":12},[5423],{"type":993,"tag":1026,"props":5424,"children":5425},{"style":1032},[5426],{"type":998,"value":5427},"# Alphabetical organization\n",{"type":993,"tag":1026,"props":5429,"children":5430},{"class":1028,"line":27},[5431,5435,5439,5443,5448,5452,5456,5460,5465,5469,5473],{"type":993,"tag":1026,"props":5432,"children":5433},{"style":1041},[5434],{"type":998,"value":1129},{"type":993,"tag":1026,"props":5436,"children":5437},{"style":1047},[5438],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5440,"children":5441},{"style":1041},[5442],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5444,"children":5445},{"style":1140},[5446],{"type":998,"value":5447},"\"charlie\"",{"type":993,"tag":1026,"props":5449,"children":5450},{"style":1041},[5451],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5453,"children":5454},{"style":1140},[5455],{"type":998,"value":1152},{"type":993,"tag":1026,"props":5457,"children":5458},{"style":1041},[5459],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5461,"children":5462},{"style":1140},[5463],{"type":998,"value":5464},"\"bob\"",{"type":993,"tag":1026,"props":5466,"children":5467},{"style":1041},[5468],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5470,"children":5471},{"style":1140},[5472],{"type":998,"value":1170},{"type":993,"tag":1026,"props":5474,"children":5475},{"style":1041},[5476],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5478,"children":5479},{"class":1028,"line":36},[5480,5484,5488,5492],{"type":993,"tag":1026,"props":5481,"children":5482},{"style":1058},[5483],{"type":998,"value":1190},{"type":993,"tag":1026,"props":5485,"children":5486},{"style":1041},[5487],{"type":998,"value":1195},{"type":993,"tag":1026,"props":5489,"children":5490},{"style":1140},[5491],{"type":998,"value":1258},{"type":993,"tag":1026,"props":5493,"children":5494},{"style":1041},[5495],{"type":998,"value":1263},{"type":993,"tag":1026,"props":5497,"children":5498},{"class":1028,"line":45},[5499],{"type":993,"tag":1026,"props":5500,"children":5501},{"emptyLinePlaceholder":13},[5502],{"type":998,"value":1182},{"type":993,"tag":1026,"props":5504,"children":5505},{"class":1028,"line":54},[5506],{"type":993,"tag":1026,"props":5507,"children":5508},{"style":1032},[5509],{"type":998,"value":5510},"# Case-insensitive alphabetical\n",{"type":993,"tag":1026,"props":5512,"children":5513},{"class":1028,"line":63},[5514,5519,5523,5527,5532,5536,5540,5544],{"type":993,"tag":1026,"props":5515,"children":5516},{"style":1041},[5517],{"type":998,"value":5518},"alphabetical ",{"type":993,"tag":1026,"props":5520,"children":5521},{"style":1047},[5522],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5524,"children":5525},{"style":1058},[5526],{"type":998,"value":2297},{"type":993,"tag":1026,"props":5528,"children":5529},{"style":1041},[5530],{"type":998,"value":5531},"(names, ",{"type":993,"tag":1026,"props":5533,"children":5534},{"style":1870},[5535],{"type":998,"value":2018},{"type":993,"tag":1026,"props":5537,"children":5538},{"style":1047},[5539],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5541,"children":5542},{"style":1058},[5543],{"type":998,"value":2027},{"type":993,"tag":1026,"props":5545,"children":5546},{"style":1041},[5547],{"type":998,"value":2032},{"type":993,"tag":1026,"props":5549,"children":5550},{"class":1028,"line":72},[5551,5555,5559,5564],{"type":993,"tag":1026,"props":5552,"children":5553},{"style":1058},[5554],{"type":998,"value":1190},{"type":993,"tag":1026,"props":5556,"children":5557},{"style":1041},[5558],{"type":998,"value":1195},{"type":993,"tag":1026,"props":5560,"children":5561},{"style":1140},[5562],{"type":998,"value":5563},"\"Alphabetical:\"",{"type":993,"tag":1026,"props":5565,"children":5566},{"style":1041},[5567],{"type":998,"value":5568},", alphabetical)\n",{"type":993,"tag":1465,"props":5570,"children":5572},{"id":5571},"numerical-organization",[5573],{"type":998,"value":5574},"Numerical Organization",{"type":993,"tag":1012,"props":5576,"children":5577},{},[5578],{"type":993,"tag":1016,"props":5579,"children":5581},{"className":1018,"code":5580,"language":6,"meta":8,"style":8},"# Numerical organization\nscores = [85, 92, 78, 96, 88, 73, 91]\nprint(\"Original scores:\", scores)\n\n# Highest to lowest\nhighest_first = sorted(scores, reverse=True)\nprint(\"Highest first:\", highest_first)\n",[5582],{"type":993,"tag":1022,"props":5583,"children":5584},{"__ignoreMap":8},[5585,5593,5666,5685,5692,5700,5737],{"type":993,"tag":1026,"props":5586,"children":5587},{"class":1028,"line":12},[5588],{"type":993,"tag":1026,"props":5589,"children":5590},{"style":1032},[5591],{"type":998,"value":5592},"# Numerical organization\n",{"type":993,"tag":1026,"props":5594,"children":5595},{"class":1028,"line":27},[5596,5600,5604,5608,5612,5616,5620,5624,5628,5632,5636,5640,5644,5648,5653,5657,5662],{"type":993,"tag":1026,"props":5597,"children":5598},{"style":1041},[5599],{"type":998,"value":1778},{"type":993,"tag":1026,"props":5601,"children":5602},{"style":1047},[5603],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5605,"children":5606},{"style":1041},[5607],{"type":998,"value":1055},{"type":993,"tag":1026,"props":5609,"children":5610},{"style":1058},[5611],{"type":998,"value":1791},{"type":993,"tag":1026,"props":5613,"children":5614},{"style":1041},[5615],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5617,"children":5618},{"style":1058},[5619],{"type":998,"value":1800},{"type":993,"tag":1026,"props":5621,"children":5622},{"style":1041},[5623],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5625,"children":5626},{"style":1058},[5627],{"type":998,"value":1809},{"type":993,"tag":1026,"props":5629,"children":5630},{"style":1041},[5631],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5633,"children":5634},{"style":1058},[5635],{"type":998,"value":1818},{"type":993,"tag":1026,"props":5637,"children":5638},{"style":1041},[5639],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5641,"children":5642},{"style":1058},[5643],{"type":998,"value":1827},{"type":993,"tag":1026,"props":5645,"children":5646},{"style":1041},[5647],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5649,"children":5650},{"style":1058},[5651],{"type":998,"value":5652},"73",{"type":993,"tag":1026,"props":5654,"children":5655},{"style":1041},[5656],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5658,"children":5659},{"style":1058},[5660],{"type":998,"value":5661},"91",{"type":993,"tag":1026,"props":5663,"children":5664},{"style":1041},[5665],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5667,"children":5668},{"class":1028,"line":36},[5669,5673,5677,5681],{"type":993,"tag":1026,"props":5670,"children":5671},{"style":1058},[5672],{"type":998,"value":1190},{"type":993,"tag":1026,"props":5674,"children":5675},{"style":1041},[5676],{"type":998,"value":1195},{"type":993,"tag":1026,"props":5678,"children":5679},{"style":1140},[5680],{"type":998,"value":1847},{"type":993,"tag":1026,"props":5682,"children":5683},{"style":1041},[5684],{"type":998,"value":1852},{"type":993,"tag":1026,"props":5686,"children":5687},{"class":1028,"line":45},[5688],{"type":993,"tag":1026,"props":5689,"children":5690},{"emptyLinePlaceholder":13},[5691],{"type":998,"value":1182},{"type":993,"tag":1026,"props":5693,"children":5694},{"class":1028,"line":54},[5695],{"type":993,"tag":1026,"props":5696,"children":5697},{"style":1032},[5698],{"type":998,"value":5699},"# Highest to lowest\n",{"type":993,"tag":1026,"props":5701,"children":5702},{"class":1028,"line":63},[5703,5708,5712,5716,5721,5725,5729,5733],{"type":993,"tag":1026,"props":5704,"children":5705},{"style":1041},[5706],{"type":998,"value":5707},"highest_first ",{"type":993,"tag":1026,"props":5709,"children":5710},{"style":1047},[5711],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5713,"children":5714},{"style":1058},[5715],{"type":998,"value":2297},{"type":993,"tag":1026,"props":5717,"children":5718},{"style":1041},[5719],{"type":998,"value":5720},"(scores, ",{"type":993,"tag":1026,"props":5722,"children":5723},{"style":1870},[5724],{"type":998,"value":1873},{"type":993,"tag":1026,"props":5726,"children":5727},{"style":1047},[5728],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5730,"children":5731},{"style":1058},[5732],{"type":998,"value":1440},{"type":993,"tag":1026,"props":5734,"children":5735},{"style":1041},[5736],{"type":998,"value":1886},{"type":993,"tag":1026,"props":5738,"children":5739},{"class":1028,"line":72},[5740,5744,5748,5753],{"type":993,"tag":1026,"props":5741,"children":5742},{"style":1058},[5743],{"type":998,"value":1190},{"type":993,"tag":1026,"props":5745,"children":5746},{"style":1041},[5747],{"type":998,"value":1195},{"type":993,"tag":1026,"props":5749,"children":5750},{"style":1140},[5751],{"type":998,"value":5752},"\"Highest first:\"",{"type":993,"tag":1026,"props":5754,"children":5755},{"style":1041},[5756],{"type":998,"value":5757},", highest_first)\n",{"type":993,"tag":1465,"props":5759,"children":5761},{"id":5760},"priority-organization",[5762],{"type":998,"value":5763},"Priority Organization",{"type":993,"tag":1012,"props":5765,"children":5766},{},[5767],{"type":993,"tag":1016,"props":5768,"children":5770},{"className":1018,"code":5769,"language":6,"meta":8,"style":8},"# Priority-based organization\ntasks = [\n    (\"Email client\", \"high\"),\n    (\"Update website\", \"low\"),\n    (\"Fix bug\", \"urgent\"),\n    (\"Write docs\", \"medium\")\n]\n\npriority_order = {\"urgent\": 1, \"high\": 2, \"medium\": 3, \"low\": 4}\nby_priority = sorted(tasks, key=lambda x: priority_order[x[1]])\n\nprint(\"Tasks by priority:\")\nfor task, priority in by_priority:\n    print(f\"  {task} ({priority})\")\n",[5771],{"type":993,"tag":1022,"props":5772,"children":5773},{"__ignoreMap":8},[5774,5782,5798,5823,5848,5873,5898,5905,5912,5993,6036,6043,6063,6084],{"type":993,"tag":1026,"props":5775,"children":5776},{"class":1028,"line":12},[5777],{"type":993,"tag":1026,"props":5778,"children":5779},{"style":1032},[5780],{"type":998,"value":5781},"# Priority-based organization\n",{"type":993,"tag":1026,"props":5783,"children":5784},{"class":1028,"line":27},[5785,5790,5794],{"type":993,"tag":1026,"props":5786,"children":5787},{"style":1041},[5788],{"type":998,"value":5789},"tasks ",{"type":993,"tag":1026,"props":5791,"children":5792},{"style":1047},[5793],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5795,"children":5796},{"style":1041},[5797],{"type":998,"value":3893},{"type":993,"tag":1026,"props":5799,"children":5800},{"class":1028,"line":36},[5801,5805,5810,5814,5819],{"type":993,"tag":1026,"props":5802,"children":5803},{"style":1041},[5804],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5806,"children":5807},{"style":1140},[5808],{"type":998,"value":5809},"\"Email client\"",{"type":993,"tag":1026,"props":5811,"children":5812},{"style":1041},[5813],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5815,"children":5816},{"style":1140},[5817],{"type":998,"value":5818},"\"high\"",{"type":993,"tag":1026,"props":5820,"children":5821},{"style":1041},[5822],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5824,"children":5825},{"class":1028,"line":45},[5826,5830,5835,5839,5844],{"type":993,"tag":1026,"props":5827,"children":5828},{"style":1041},[5829],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5831,"children":5832},{"style":1140},[5833],{"type":998,"value":5834},"\"Update website\"",{"type":993,"tag":1026,"props":5836,"children":5837},{"style":1041},[5838],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5840,"children":5841},{"style":1140},[5842],{"type":998,"value":5843},"\"low\"",{"type":993,"tag":1026,"props":5845,"children":5846},{"style":1041},[5847],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5849,"children":5850},{"class":1028,"line":54},[5851,5855,5860,5864,5869],{"type":993,"tag":1026,"props":5852,"children":5853},{"style":1041},[5854],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5856,"children":5857},{"style":1140},[5858],{"type":998,"value":5859},"\"Fix bug\"",{"type":993,"tag":1026,"props":5861,"children":5862},{"style":1041},[5863],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5865,"children":5866},{"style":1140},[5867],{"type":998,"value":5868},"\"urgent\"",{"type":993,"tag":1026,"props":5870,"children":5871},{"style":1041},[5872],{"type":998,"value":4829},{"type":993,"tag":1026,"props":5874,"children":5875},{"class":1028,"line":63},[5876,5880,5885,5889,5894],{"type":993,"tag":1026,"props":5877,"children":5878},{"style":1041},[5879],{"type":998,"value":4812},{"type":993,"tag":1026,"props":5881,"children":5882},{"style":1140},[5883],{"type":998,"value":5884},"\"Write docs\"",{"type":993,"tag":1026,"props":5886,"children":5887},{"style":1041},[5888],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5890,"children":5891},{"style":1140},[5892],{"type":998,"value":5893},"\"medium\"",{"type":993,"tag":1026,"props":5895,"children":5896},{"style":1041},[5897],{"type":998,"value":1886},{"type":993,"tag":1026,"props":5899,"children":5900},{"class":1028,"line":72},[5901],{"type":993,"tag":1026,"props":5902,"children":5903},{"style":1041},[5904],{"type":998,"value":1121},{"type":993,"tag":1026,"props":5906,"children":5907},{"class":1028,"line":81},[5908],{"type":993,"tag":1026,"props":5909,"children":5910},{"emptyLinePlaceholder":13},[5911],{"type":998,"value":1182},{"type":993,"tag":1026,"props":5913,"children":5914},{"class":1028,"line":91},[5915,5920,5924,5929,5933,5937,5941,5945,5949,5953,5957,5961,5965,5969,5973,5977,5981,5985,5989],{"type":993,"tag":1026,"props":5916,"children":5917},{"style":1041},[5918],{"type":998,"value":5919},"priority_order ",{"type":993,"tag":1026,"props":5921,"children":5922},{"style":1047},[5923],{"type":998,"value":1050},{"type":993,"tag":1026,"props":5925,"children":5926},{"style":1041},[5927],{"type":998,"value":5928}," {",{"type":993,"tag":1026,"props":5930,"children":5931},{"style":1140},[5932],{"type":998,"value":5868},{"type":993,"tag":1026,"props":5934,"children":5935},{"style":1041},[5936],{"type":998,"value":3911},{"type":993,"tag":1026,"props":5938,"children":5939},{"style":1058},[5940],{"type":998,"value":1338},{"type":993,"tag":1026,"props":5942,"children":5943},{"style":1041},[5944],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5946,"children":5947},{"style":1140},[5948],{"type":998,"value":5818},{"type":993,"tag":1026,"props":5950,"children":5951},{"style":1041},[5952],{"type":998,"value":3911},{"type":993,"tag":1026,"props":5954,"children":5955},{"style":1058},[5956],{"type":998,"value":2734},{"type":993,"tag":1026,"props":5958,"children":5959},{"style":1041},[5960],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5962,"children":5963},{"style":1140},[5964],{"type":998,"value":5893},{"type":993,"tag":1026,"props":5966,"children":5967},{"style":1041},[5968],{"type":998,"value":3911},{"type":993,"tag":1026,"props":5970,"children":5971},{"style":1058},[5972],{"type":998,"value":2743},{"type":993,"tag":1026,"props":5974,"children":5975},{"style":1041},[5976],{"type":998,"value":1066},{"type":993,"tag":1026,"props":5978,"children":5979},{"style":1140},[5980],{"type":998,"value":5843},{"type":993,"tag":1026,"props":5982,"children":5983},{"style":1041},[5984],{"type":998,"value":3911},{"type":993,"tag":1026,"props":5986,"children":5987},{"style":1058},[5988],{"type":998,"value":2752},{"type":993,"tag":1026,"props":5990,"children":5991},{"style":1041},[5992],{"type":998,"value":4021},{"type":993,"tag":1026,"props":5994,"children":5995},{"class":1028,"line":100},[5996,6001,6005,6009,6014,6018,6022,6027,6031],{"type":993,"tag":1026,"props":5997,"children":5998},{"style":1041},[5999],{"type":998,"value":6000},"by_priority ",{"type":993,"tag":1026,"props":6002,"children":6003},{"style":1047},[6004],{"type":998,"value":1050},{"type":993,"tag":1026,"props":6006,"children":6007},{"style":1058},[6008],{"type":998,"value":2297},{"type":993,"tag":1026,"props":6010,"children":6011},{"style":1041},[6012],{"type":998,"value":6013},"(tasks, ",{"type":993,"tag":1026,"props":6015,"children":6016},{"style":1870},[6017],{"type":998,"value":2018},{"type":993,"tag":1026,"props":6019,"children":6020},{"style":1047},[6021],{"type":998,"value":3505},{"type":993,"tag":1026,"props":6023,"children":6024},{"style":1041},[6025],{"type":998,"value":6026}," x: priority_order[x[",{"type":993,"tag":1026,"props":6028,"children":6029},{"style":1058},[6030],{"type":998,"value":1338},{"type":993,"tag":1026,"props":6032,"children":6033},{"style":1041},[6034],{"type":998,"value":6035},"]])\n",{"type":993,"tag":1026,"props":6037,"children":6038},{"class":1028,"line":109},[6039],{"type":993,"tag":1026,"props":6040,"children":6041},{"emptyLinePlaceholder":13},[6042],{"type":998,"value":1182},{"type":993,"tag":1026,"props":6044,"children":6045},{"class":1028,"line":118},[6046,6050,6054,6059],{"type":993,"tag":1026,"props":6047,"children":6048},{"style":1058},[6049],{"type":998,"value":1190},{"type":993,"tag":1026,"props":6051,"children":6052},{"style":1041},[6053],{"type":998,"value":1195},{"type":993,"tag":1026,"props":6055,"children":6056},{"style":1140},[6057],{"type":998,"value":6058},"\"Tasks by priority:\"",{"type":993,"tag":1026,"props":6060,"children":6061},{"style":1041},[6062],{"type":998,"value":1886},{"type":993,"tag":1026,"props":6064,"children":6065},{"class":1028,"line":127},[6066,6070,6075,6079],{"type":993,"tag":1026,"props":6067,"children":6068},{"style":1047},[6069],{"type":998,"value":4056},{"type":993,"tag":1026,"props":6071,"children":6072},{"style":1041},[6073],{"type":998,"value":6074}," task, priority ",{"type":993,"tag":1026,"props":6076,"children":6077},{"style":1047},[6078],{"type":998,"value":4066},{"type":993,"tag":1026,"props":6080,"children":6081},{"style":1041},[6082],{"type":998,"value":6083}," by_priority:\n",{"type":993,"tag":1026,"props":6085,"children":6086},{"class":1028,"line":136},[6087,6091,6095,6099,6103,6107,6112,6116,6121,6125,6130,6134,6139],{"type":993,"tag":1026,"props":6088,"children":6089},{"style":1058},[6090],{"type":998,"value":4079},{"type":993,"tag":1026,"props":6092,"children":6093},{"style":1041},[6094],{"type":998,"value":1195},{"type":993,"tag":1026,"props":6096,"children":6097},{"style":1047},[6098],{"type":998,"value":4088},{"type":993,"tag":1026,"props":6100,"children":6101},{"style":1140},[6102],{"type":998,"value":4093},{"type":993,"tag":1026,"props":6104,"children":6105},{"style":1058},[6106],{"type":998,"value":4098},{"type":993,"tag":1026,"props":6108,"children":6109},{"style":1041},[6110],{"type":998,"value":6111},"task",{"type":993,"tag":1026,"props":6113,"children":6114},{"style":1058},[6115],{"type":998,"value":4108},{"type":993,"tag":1026,"props":6117,"children":6118},{"style":1140},[6119],{"type":998,"value":6120}," (",{"type":993,"tag":1026,"props":6122,"children":6123},{"style":1058},[6124],{"type":998,"value":4098},{"type":993,"tag":1026,"props":6126,"children":6127},{"style":1041},[6128],{"type":998,"value":6129},"priority",{"type":993,"tag":1026,"props":6131,"children":6132},{"style":1058},[6133],{"type":998,"value":4108},{"type":993,"tag":1026,"props":6135,"children":6136},{"style":1140},[6137],{"type":998,"value":6138},")\"",{"type":993,"tag":1026,"props":6140,"children":6141},{"style":1041},[6142],{"type":998,"value":1886},{"type":993,"tag":1365,"props":6144,"children":6148},{"emoji":6145,"title":6146,"type":6147},"⚡","Performance Considerations","warning",[6149,6157,6200,6208],{"type":993,"tag":1001,"props":6150,"children":6151},{},[6152],{"type":993,"tag":1375,"props":6153,"children":6154},{},[6155],{"type":998,"value":6156},"Efficiency Tips:",{"type":993,"tag":1381,"props":6158,"children":6159},{},[6160,6172,6183,6195],{"type":993,"tag":1385,"props":6161,"children":6162},{},[6163,6165,6170],{"type":998,"value":6164},"Use ",{"type":993,"tag":1022,"props":6166,"children":6168},{"className":6167},[],[6169],{"type":998,"value":1361},{"type":998,"value":6171}," when you want to modify the original list",{"type":993,"tag":1385,"props":6173,"children":6174},{},[6175,6176,6181],{"type":998,"value":6164},{"type":993,"tag":1022,"props":6177,"children":6179},{"className":6178},[],[6180],{"type":998,"value":2068},{"type":998,"value":6182}," when you need to keep the original",{"type":993,"tag":1385,"props":6184,"children":6185},{},[6186,6188,6193],{"type":998,"value":6187},"For simple reversals, slicing (",{"type":993,"tag":1022,"props":6189,"children":6191},{"className":6190},[],[6192],{"type":998,"value":2659},{"type":998,"value":6194},") is often fastest",{"type":993,"tag":1385,"props":6196,"children":6197},{},[6198],{"type":998,"value":6199},"Avoid repeated sorting - sort once and maintain order when possible",{"type":993,"tag":1001,"props":6201,"children":6202},{},[6203],{"type":993,"tag":1375,"props":6204,"children":6205},{},[6206],{"type":998,"value":6207},"Memory Usage:",{"type":993,"tag":1381,"props":6209,"children":6210},{},[6211,6221,6231],{"type":993,"tag":1385,"props":6212,"children":6213},{},[6214,6219],{"type":993,"tag":1022,"props":6215,"children":6217},{"className":6216},[],[6218],{"type":998,"value":1361},{"type":998,"value":6220}," uses less memory (in-place)",{"type":993,"tag":1385,"props":6222,"children":6223},{},[6224,6229],{"type":993,"tag":1022,"props":6225,"children":6227},{"className":6226},[],[6228],{"type":998,"value":2068},{"type":998,"value":6230}," creates new list (uses more memory)",{"type":993,"tag":1385,"props":6232,"children":6233},{},[6234],{"type":998,"value":6235},"Consider memory constraints for large datasets",{"type":993,"tag":1001,"props":6237,"children":6238},{},[6239,6241,6247],{"type":998,"value":6240},"Learn more about ",{"type":993,"tag":6242,"props":6243,"children":6244},"a",{"href":243},[6245],{"type":998,"value":6246},"for loops",{"type":998,"value":6248}," to understand how sorting and iteration work together in data processing.",{"type":993,"tag":1345,"props":6250,"children":6252},{"id":6251},"test-your-knowledge",[6253],{"type":998,"value":6254},"Test Your Knowledge",{"type":993,"tag":1001,"props":6256,"children":6257},{},[6258],{"type":998,"value":6259},"Test what you've learned about organizing lists in Python:",{"type":993,"tag":6261,"props":6262,"children":6265},"redirect-button",{"label":6263,"url":6264},"Take Quiz","/tutorial-quiz/python/organizing-lists",[],{"type":993,"tag":1345,"props":6267,"children":6269},{"id":6268},"whats-next",[6270],{"type":998,"value":6271},"What's Next?",{"type":993,"tag":1001,"props":6273,"children":6274},{},[6275],{"type":998,"value":6276},"Now that you know how to organize lists effectively, you're ready to learn about combining lists. This includes merging, joining, and various techniques for working with multiple lists together.",{"type":993,"tag":1001,"props":6278,"children":6279},{},[6280,6282,6286],{"type":998,"value":6281},"Ready to continue? Check out our lesson on ",{"type":993,"tag":6242,"props":6283,"children":6284},{"href":352},[6285],{"type":998,"value":353},{"type":998,"value":6287},".",{"type":993,"tag":6289,"props":6290,"children":6291},"style",{},[6292],{"type":998,"value":6293},"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":6295},[6296,6302,6306,6310,6315,6320,6325,6326],{"id":1347,"depth":27,"text":1350,"children":6297},[6298,6299,6300,6301],{"id":1467,"depth":36,"text":1470},{"id":1617,"depth":36,"text":1620},{"id":1749,"depth":36,"text":1752},{"id":1909,"depth":36,"text":1912},{"id":2055,"depth":27,"text":2058,"children":6303},[6304,6305],{"id":2159,"depth":36,"text":2162},{"id":2346,"depth":36,"text":2349},{"id":2571,"depth":27,"text":2574,"children":6307},[6308,6309],{"id":2685,"depth":36,"text":2688},{"id":2822,"depth":36,"text":2825},{"id":2995,"depth":27,"text":2998,"children":6311},[6312,6313,6314],{"id":3106,"depth":36,"text":3109},{"id":3351,"depth":36,"text":3354},{"id":3619,"depth":36,"text":3622},{"id":3844,"depth":27,"text":3847,"children":6316},[6317,6318,6319],{"id":3855,"depth":36,"text":3858},{"id":4264,"depth":36,"text":4267},{"id":4997,"depth":36,"text":5000},{"id":5400,"depth":27,"text":5403,"children":6321},[6322,6323,6324],{"id":5406,"depth":36,"text":5409},{"id":5571,"depth":36,"text":5574},{"id":5760,"depth":36,"text":5763},{"id":6251,"depth":27,"text":6254},{"id":6268,"depth":27,"text":6271},1782373737757]