[{"data":1,"prerenderedAt":9068},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/working-with-dates":988},[4,22,31,40,49,58,67,76,86,95,104,113,122,131,141,150,159,168,177,186,196,205,214,223,233,242,251,260,269,279,288,297,306,315,324,333,342,351,360,369,379,388,397,406,415,424,433,442,452,461,470,479,488,497,506,515,525,534,543,552,561,570,579,588,597,606,616,625,634,643,652,661,670,680,689,698,707,716,725,734,744,753,762,771,780,789,798,807,817,826,835,844,853,863,872,881,890,900,909,918,927,936,945,953,961,970,979],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python/getting-started","python",false,"","Getting Started","Begin your Python programming journey. Learn what Python is, how to set it up, and write your first programs. Perfect for complete beginners starting their coding adventure.","getting-started",1,true,"pi pi-folder","markdown","content:python:1.getting-started.md","content","python/1.getting-started.md","python/1.getting-started","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python/what-is-python","What is Python","Discover Python's fascinating history, design philosophy, and key features. Learn why Python has become one of the world's most popular programming languages and perfect for beginners.","what-is-python",2,"content:python:2.what-is-python.md","python/2.what-is-python.md","python/2.what-is-python",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python/setup-python","Setup Python","Learn how to install Python on your computer and set up your development environment. Step-by-step guide for Windows, macOS, and Linux with beginner-friendly instructions.","setup-python",3,"content:python:3.setup-python.md","python/3.setup-python.md","python/3.setup-python",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python/your-first-program","Your First Program","Write and run your first Python program! Learn the basics of Python programming with simple examples and step-by-step instructions for beginners.","your-first-program",4,"content:python:4.your-first-program.md","python/4.your-first-program.md","python/4.your-first-program",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python/python-code-structure","Python Code Structure","Learn how Python code is organized and structured. Understand indentation, line breaks, and the basic rules that make Python programs work correctly.","python-code-structure",5,"content:python:5.python-code-structure.md","python/5.python-code-structure.md","python/5.python-code-structure",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python/writing-comments","Writing Comments","Learn how to write effective comments in Python. Discover when and how to document your code to make it clear, maintainable, and easy to understand.","writing-comments",6,"content:python:6.writing-comments.md","python/6.writing-comments.md","python/6.writing-comments",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python/working-with-variables","Working with Variables","Learn how to create, use, and manage variables in Python. Understand how to store data, change values, and follow naming conventions for clean, readable code.","working-with-variables",7,"content:python:7.working-with-variables.md","python/7.working-with-variables.md","python/7.working-with-variables",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python/basic-data-types","Basic Data Types","Learn about Python's fundamental data types including numbers, text, and boolean values","basic-data-types",8,"content:python:8.basic-data-types.md","python/8.basic-data-types.md","python/8.basic-data-types",[86,95,104,113,122],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":91,"_type":15,"_id":92,"_source":17,"_file":93,"_stem":94,"_extension":20},"/python/understanding-data-types","Understanding Data Types","Learn how Python identifies different data types and why they're important for programming","understanding-data-types",9,"content:python:9.understanding-data-types.md","python/9.understanding-data-types.md","python/9.understanding-data-types",{"_path":96,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":97,"description":98,"slug":99,"parentId":77,"order":100,"_type":15,"_id":101,"_source":17,"_file":102,"_stem":103,"_extension":20},"/python/working-with-numbers","Working with Numbers","Learn about Python's numeric data types including integers and floats, and how to perform calculations","working-with-numbers",10,"content:python:10.working-with-numbers.md","python/10.working-with-numbers.md","python/10.working-with-numbers",{"_path":105,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":106,"description":107,"slug":108,"parentId":77,"order":109,"_type":15,"_id":110,"_source":17,"_file":111,"_stem":112,"_extension":20},"/python/text-and-strings","Text and Strings","Learn how to work with text data in Python using strings, including creation, manipulation, and formatting","text-and-strings",11,"content:python:11.text-and-strings.md","python/11.text-and-strings.md","python/11.text-and-strings",{"_path":114,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":115,"description":116,"slug":117,"parentId":77,"order":118,"_type":15,"_id":119,"_source":17,"_file":120,"_stem":121,"_extension":20},"/python/true-false-values","True/False Values","Learn about boolean values in Python, including True/False logic, comparison operations, and how to use booleans for decision-making in your programs","true-false-values",12,"content:python:12.true-false-values.md","python/12.true-false-values.md","python/12.true-false-values",{"_path":123,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":124,"description":125,"slug":126,"parentId":77,"order":127,"_type":15,"_id":128,"_source":17,"_file":129,"_stem":130,"_extension":20},"/python/converting-types","Converting Types","Learn how to convert between different Python data types including strings, numbers, and booleans","converting-types",13,"content:python:13.converting-types.md","python/13.converting-types.md","python/13.converting-types",{"_path":132,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":133,"description":134,"slug":135,"order":136,"isParent":13,"icon":14,"_type":15,"_id":137,"_source":17,"_file":138,"_stem":139,"_extension":20,"children":140,"expanded":13},"/python/python-operators","Python Operators","Learn about Python operators - the symbols and keywords that perform operations on data. Discover arithmetic, comparison, logical, and assignment operators with simple examples.","python-operators",14,"content:python:14.python-operators.md","python/14.python-operators.md","python/14.python-operators",[141,150,159,168,177],{"_path":142,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":143,"description":144,"slug":145,"parentId":132,"order":146,"_type":15,"_id":147,"_source":17,"_file":148,"_stem":149,"_extension":20},"/python/math-operations","Math Operations","Learn Python's arithmetic operators for mathematical calculations. Master addition, subtraction, multiplication, division, and more with practical examples.","math-operations",15,"content:python:15.math-operations.md","python/15.math-operations.md","python/15.math-operations",{"_path":151,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":152,"description":153,"slug":154,"parentId":132,"order":155,"_type":15,"_id":156,"_source":17,"_file":157,"_stem":158,"_extension":20},"/python/comparing-values","Comparing Values","Learn Python's comparison operators to compare values and make decisions. Master equality, inequality, and relational operators with practical examples.","comparing-values",16,"content:python:16.comparing-values.md","python/16.comparing-values.md","python/16.comparing-values",{"_path":160,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":161,"description":162,"slug":163,"parentId":132,"order":164,"_type":15,"_id":165,"_source":17,"_file":166,"_stem":167,"_extension":20},"/python/logic-operations","Logic Operations","Learn about Python's logical operators for combining conditions and creating complex boolean expressions","logic-operations",17,"content:python:17.logic-operations.md","python/17.logic-operations.md","python/17.logic-operations",{"_path":169,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":170,"description":171,"slug":172,"parentId":132,"order":173,"_type":15,"_id":174,"_source":17,"_file":175,"_stem":176,"_extension":20},"/python/value-assignment","Value Assignment","Learn about Python's assignment operators for efficiently updating variables and performing calculations","value-assignment",18,"content:python:18.value-assignment.md","python/18.value-assignment.md","python/18.value-assignment",{"_path":178,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":179,"description":180,"slug":181,"parentId":132,"order":182,"_type":15,"_id":183,"_source":17,"_file":184,"_stem":185,"_extension":20},"/python/operator-precedence","Operator Precedence","Learn how Python evaluates expressions with multiple operators and how to control evaluation order","operator-precedence",19,"content:python:19.operator-precedence.md","python/19.operator-precedence.md","python/19.operator-precedence",{"_path":187,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":188,"description":189,"slug":190,"order":191,"isParent":13,"icon":14,"_type":15,"_id":192,"_source":17,"_file":193,"_stem":194,"_extension":20,"children":195,"expanded":13},"/python/decision-making","Decision Making","Learn how to make decisions in your Python programs using conditional statements and control flow","decision-making",20,"content:python:20.decision-making.md","python/20.decision-making.md","python/20.decision-making",[196,205,214],{"_path":197,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":198,"description":199,"slug":200,"parentId":187,"order":201,"_type":15,"_id":202,"_source":17,"_file":203,"_stem":204,"_extension":20},"/python/if-statements","If Statements","Learn how to use if statements to make decisions and control program flow in Python","if-statements",21,"content:python:21.if-statements.md","python/21.if-statements.md","python/21.if-statements",{"_path":206,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":207,"description":208,"slug":209,"parentId":187,"order":210,"_type":15,"_id":211,"_source":17,"_file":212,"_stem":213,"_extension":20},"/python/multiple-conditions","Multiple Conditions","Learn how to handle multiple conditions using elif statements and complex conditional logic in Python","multiple-conditions",22,"content:python:22.multiple-conditions.md","python/22.multiple-conditions.md","python/22.multiple-conditions",{"_path":215,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":216,"description":217,"slug":218,"parentId":187,"order":219,"_type":15,"_id":220,"_source":17,"_file":221,"_stem":222,"_extension":20},"/python/pattern-matching","Pattern Matching","Learn how to use Python's match-case statements for powerful pattern matching and complex decision making","pattern-matching",23,"content:python:23.pattern-matching.md","python/23.pattern-matching.md","python/23.pattern-matching",{"_path":224,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":225,"description":226,"slug":227,"order":228,"isParent":13,"icon":14,"_type":15,"_id":229,"_source":17,"_file":230,"_stem":231,"_extension":20,"children":232,"expanded":13},"/python/repetition-and-loops","Python Loops","Learn how to use loops to repeat code efficiently and handle repetitive tasks in Python","repetition-and-loops",24,"content:python:24.repetition-and-loops.md","python/24.repetition-and-loops.md","python/24.repetition-and-loops",[233,242,251,260],{"_path":234,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":235,"description":236,"slug":237,"parentId":224,"order":238,"_type":15,"_id":239,"_source":17,"_file":240,"_stem":241,"_extension":20},"/python/while-loops","While Loops","Learn how to use while loops for condition-based repetition and create loops that run until specific conditions are met","while-loops",25,"content:python:25.while-loops.md","python/25.while-loops.md","python/25.while-loops",{"_path":243,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":244,"description":245,"slug":246,"parentId":224,"order":247,"_type":15,"_id":248,"_source":17,"_file":249,"_stem":250,"_extension":20},"/python/for-loops","For Loops","Learn how to use for loops to iterate through sequences, collections, and ranges efficiently in Python","for-loops",26,"content:python:26.for-loops.md","python/26.for-loops.md","python/26.for-loops",{"_path":252,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":253,"description":254,"slug":255,"parentId":224,"order":256,"_type":15,"_id":257,"_source":17,"_file":258,"_stem":259,"_extension":20},"/python/loop-control","Loop Control","Master advanced loop control techniques including break, continue, and else clauses for sophisticated iteration patterns","loop-control",27,"content:python:27.loop-control.md","python/27.loop-control.md","python/27.loop-control",{"_path":261,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":262,"description":263,"slug":264,"parentId":224,"order":265,"_type":15,"_id":266,"_source":17,"_file":267,"_stem":268,"_extension":20},"/python/nested-loops","Nested Loops","Learn how to use nested loops to process multi-dimensional data, create patterns, and handle complex iteration scenarios","nested-loops",28,"content:python:28.nested-loops.md","python/28.nested-loops.md","python/28.nested-loops",{"_path":270,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":271,"description":272,"slug":273,"order":274,"isParent":13,"icon":14,"_type":15,"_id":275,"_source":17,"_file":276,"_stem":277,"_extension":20,"children":278,"expanded":13},"/python/python-lists","Python Lists","Learn about Python lists, one of the most important and versatile data structures for storing and organizing collections of data","python-lists",29,"content:python:29.python-lists.md","python/29.python-lists.md","python/29.python-lists",[279,288,297,306,315,324,333,342,351,360],{"_path":280,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":281,"description":282,"slug":283,"parentId":270,"order":284,"_type":15,"_id":285,"_source":17,"_file":286,"_stem":287,"_extension":20},"/python/creating-lists","Creating Lists","Learn different methods to create and initialize Python lists, from simple literals to advanced techniques","creating-lists",30,"content:python:30.creating-lists.md","python/30.creating-lists.md","python/30.creating-lists",{"_path":289,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":290,"description":291,"slug":292,"parentId":270,"order":293,"_type":15,"_id":294,"_source":17,"_file":295,"_stem":296,"_extension":20},"/python/reading-list-data","Reading List Data","Master techniques for accessing and retrieving data from Python lists using indexing, slicing, and built-in methods","reading-list-data",31,"content:python:31.reading-list-data.md","python/31.reading-list-data.md","python/31.reading-list-data",{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":270,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python/modifying-lists","Modifying Lists","Learn how to change, update, and modify existing elements in Python lists using indexing and various methods","modifying-lists",32,"content:python:32.modifying-lists.md","python/32.modifying-lists.md","python/32.modifying-lists",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":270,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python/adding-to-lists","Adding to Lists","Learn various methods to add elements to Python lists including append, insert, extend, and concatenation techniques","adding-to-lists",33,"content:python:33.adding-to-lists.md","python/33.adding-to-lists.md","python/33.adding-to-lists",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":270,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python/removing-from-lists","Removing from Lists","Learn different methods to remove and delete elements from Python lists including remove, pop, del, and clear","removing-from-lists",34,"content:python:34.removing-from-lists.md","python/34.removing-from-lists.md","python/34.removing-from-lists",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":270,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python/looping-through-lists","Looping Through Lists","Learn different ways to iterate through Python lists using for loops, while loops, enumerate, and other iteration techniques","looping-through-lists",35,"content:python:35.looping-through-lists.md","python/35.looping-through-lists.md","python/35.looping-through-lists",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":270,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python/list-shortcuts","List Shortcuts","Learn powerful Python list shortcuts including list comprehensions, slicing tricks, and built-in functions for efficient list operations","list-shortcuts",36,"content:python:36.list-shortcuts.md","python/36.list-shortcuts.md","python/36.list-shortcuts",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":270,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python/organizing-lists","Organizing Lists","Learn how to sort, reverse, and organize Python lists using built-in methods and custom sorting techniques","organizing-lists",37,"content:python:37.organizing-lists.md","python/37.organizing-lists.md","python/37.organizing-lists",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":270,"order":356,"_type":15,"_id":357,"_source":17,"_file":358,"_stem":359,"_extension":20},"/python/combining-lists","Combining Lists","Learn various techniques to combine, merge, and join Python lists including concatenation, zipping, and advanced merging strategies","combining-lists",38,"content:python:38.combining-lists.md","python/38.combining-lists.md","python/38.combining-lists",{"_path":361,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":362,"description":363,"slug":364,"parentId":270,"order":365,"_type":15,"_id":366,"_source":17,"_file":367,"_stem":368,"_extension":20},"/python/essential-list-tools","Essential List Tools","Master powerful built-in functions and advanced techniques for efficient Python list manipulation and data processing","essential-list-tools",39,"content:python:39.essential-list-tools.md","python/39.essential-list-tools.md","python/39.essential-list-tools",{"_path":370,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":371,"description":372,"slug":373,"order":374,"isParent":13,"icon":14,"_type":15,"_id":375,"_source":17,"_file":376,"_stem":377,"_extension":20,"children":378,"expanded":13},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451,"expanded":13},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524,"expanded":13},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615,"expanded":13},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679,"expanded":13},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743,"expanded":13},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/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",[744],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"body":989,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},{"type":990,"children":991,"toc":9049},"root",[992,1000,1015,1020,1484,1491,1496,1661,1668,1673,2245,2251,2256,2868,2874,2879,3504,3510,3515,3521,3526,4515,4521,4526,5650,5656,5661,5667,5680,6372,6378,6390,7453,7552,7557,7974,7980,8677,8690,8696,8701,9003,9009,9014,9021,9027,9032,9043],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":748},[997],{"type":998,"value":999},"text","📅 Working with Dates",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004,1006,1013],{"type":998,"value":1005},"Working with dates and times is essential for most real-world applications. Python's ",{"type":993,"tag":1007,"props":1008,"children":1010},"code",{"className":1009},[],[1011],{"type":998,"value":1012},"datetime",{"type":998,"value":1014}," module provides powerful tools for creating, manipulating, and formatting dates and times, enabling you to build time-aware applications with scheduling, logging, and data analysis capabilities.",{"type":993,"tag":1001,"props":1016,"children":1017},{},[1018],{"type":998,"value":1019},"Think of Python's datetime functionality as a comprehensive calendar and clock system - you can represent any moment in time, calculate durations, format dates for display, and perform complex time-based calculations with ease.",{"type":993,"tag":1021,"props":1022,"children":1023},"code-try",{},[1024],{"type":993,"tag":1025,"props":1026,"children":1029},"pre",{"className":1027,"code":1028,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","import datetime\n\n# Creating and working with dates\ntoday = datetime.date.today()\nprint(f\"Today is: {today}\")\n\n# Create a specific date\nbirthday = datetime.date(1990, 5, 15)\nprint(f\"Birthday: {birthday}\")\n\n# Calculate age in days\nage_in_days = today - birthday\nprint(f\"Age in days: {age_in_days.days}\")\n\n# Working with times\nnow = datetime.datetime.now()\nprint(f\"Current time: {now}\")\n\n# Format dates for display\nformatted = now.strftime(\"%B %d, %Y at %I:%M %p\")\nprint(f\"Formatted: {formatted}\")\n",[1030],{"type":993,"tag":1007,"props":1031,"children":1032},{"__ignoreMap":8},[1033,1050,1058,1067,1085,1135,1142,1150,1195,1236,1243,1251,1278,1319,1326,1334,1351,1392,1399,1407,1443],{"type":993,"tag":1034,"props":1035,"children":1037},"span",{"class":1036,"line":12},"line",[1038,1044],{"type":993,"tag":1034,"props":1039,"children":1041},{"style":1040},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1042],{"type":998,"value":1043},"import",{"type":993,"tag":1034,"props":1045,"children":1047},{"style":1046},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1048],{"type":998,"value":1049}," datetime\n",{"type":993,"tag":1034,"props":1051,"children":1052},{"class":1036,"line":27},[1053],{"type":993,"tag":1034,"props":1054,"children":1055},{"emptyLinePlaceholder":13},[1056],{"type":998,"value":1057},"\n",{"type":993,"tag":1034,"props":1059,"children":1060},{"class":1036,"line":36},[1061],{"type":993,"tag":1034,"props":1062,"children":1064},{"style":1063},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1065],{"type":998,"value":1066},"# Creating and working with dates\n",{"type":993,"tag":1034,"props":1068,"children":1069},{"class":1036,"line":45},[1070,1075,1080],{"type":993,"tag":1034,"props":1071,"children":1072},{"style":1046},[1073],{"type":998,"value":1074},"today ",{"type":993,"tag":1034,"props":1076,"children":1077},{"style":1040},[1078],{"type":998,"value":1079},"=",{"type":993,"tag":1034,"props":1081,"children":1082},{"style":1046},[1083],{"type":998,"value":1084}," datetime.date.today()\n",{"type":993,"tag":1034,"props":1086,"children":1087},{"class":1036,"line":54},[1088,1094,1099,1104,1110,1115,1120,1125,1130],{"type":993,"tag":1034,"props":1089,"children":1091},{"style":1090},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1092],{"type":998,"value":1093},"print",{"type":993,"tag":1034,"props":1095,"children":1096},{"style":1046},[1097],{"type":998,"value":1098},"(",{"type":993,"tag":1034,"props":1100,"children":1101},{"style":1040},[1102],{"type":998,"value":1103},"f",{"type":993,"tag":1034,"props":1105,"children":1107},{"style":1106},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1108],{"type":998,"value":1109},"\"Today is: ",{"type":993,"tag":1034,"props":1111,"children":1112},{"style":1090},[1113],{"type":998,"value":1114},"{",{"type":993,"tag":1034,"props":1116,"children":1117},{"style":1046},[1118],{"type":998,"value":1119},"today",{"type":993,"tag":1034,"props":1121,"children":1122},{"style":1090},[1123],{"type":998,"value":1124},"}",{"type":993,"tag":1034,"props":1126,"children":1127},{"style":1106},[1128],{"type":998,"value":1129},"\"",{"type":993,"tag":1034,"props":1131,"children":1132},{"style":1046},[1133],{"type":998,"value":1134},")\n",{"type":993,"tag":1034,"props":1136,"children":1137},{"class":1036,"line":63},[1138],{"type":993,"tag":1034,"props":1139,"children":1140},{"emptyLinePlaceholder":13},[1141],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1143,"children":1144},{"class":1036,"line":72},[1145],{"type":993,"tag":1034,"props":1146,"children":1147},{"style":1063},[1148],{"type":998,"value":1149},"# Create a specific date\n",{"type":993,"tag":1034,"props":1151,"children":1152},{"class":1036,"line":81},[1153,1158,1162,1167,1172,1177,1182,1186,1191],{"type":993,"tag":1034,"props":1154,"children":1155},{"style":1046},[1156],{"type":998,"value":1157},"birthday ",{"type":993,"tag":1034,"props":1159,"children":1160},{"style":1040},[1161],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1163,"children":1164},{"style":1046},[1165],{"type":998,"value":1166}," datetime.date(",{"type":993,"tag":1034,"props":1168,"children":1169},{"style":1090},[1170],{"type":998,"value":1171},"1990",{"type":993,"tag":1034,"props":1173,"children":1174},{"style":1046},[1175],{"type":998,"value":1176},", ",{"type":993,"tag":1034,"props":1178,"children":1179},{"style":1090},[1180],{"type":998,"value":1181},"5",{"type":993,"tag":1034,"props":1183,"children":1184},{"style":1046},[1185],{"type":998,"value":1176},{"type":993,"tag":1034,"props":1187,"children":1188},{"style":1090},[1189],{"type":998,"value":1190},"15",{"type":993,"tag":1034,"props":1192,"children":1193},{"style":1046},[1194],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1196,"children":1197},{"class":1036,"line":91},[1198,1202,1206,1210,1215,1219,1224,1228,1232],{"type":993,"tag":1034,"props":1199,"children":1200},{"style":1090},[1201],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1203,"children":1204},{"style":1046},[1205],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1207,"children":1208},{"style":1040},[1209],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1211,"children":1212},{"style":1106},[1213],{"type":998,"value":1214},"\"Birthday: ",{"type":993,"tag":1034,"props":1216,"children":1217},{"style":1090},[1218],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1220,"children":1221},{"style":1046},[1222],{"type":998,"value":1223},"birthday",{"type":993,"tag":1034,"props":1225,"children":1226},{"style":1090},[1227],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1229,"children":1230},{"style":1106},[1231],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1233,"children":1234},{"style":1046},[1235],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1237,"children":1238},{"class":1036,"line":100},[1239],{"type":993,"tag":1034,"props":1240,"children":1241},{"emptyLinePlaceholder":13},[1242],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1244,"children":1245},{"class":1036,"line":109},[1246],{"type":993,"tag":1034,"props":1247,"children":1248},{"style":1063},[1249],{"type":998,"value":1250},"# Calculate age in days\n",{"type":993,"tag":1034,"props":1252,"children":1253},{"class":1036,"line":118},[1254,1259,1263,1268,1273],{"type":993,"tag":1034,"props":1255,"children":1256},{"style":1046},[1257],{"type":998,"value":1258},"age_in_days ",{"type":993,"tag":1034,"props":1260,"children":1261},{"style":1040},[1262],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1264,"children":1265},{"style":1046},[1266],{"type":998,"value":1267}," today ",{"type":993,"tag":1034,"props":1269,"children":1270},{"style":1040},[1271],{"type":998,"value":1272},"-",{"type":993,"tag":1034,"props":1274,"children":1275},{"style":1046},[1276],{"type":998,"value":1277}," birthday\n",{"type":993,"tag":1034,"props":1279,"children":1280},{"class":1036,"line":127},[1281,1285,1289,1293,1298,1302,1307,1311,1315],{"type":993,"tag":1034,"props":1282,"children":1283},{"style":1090},[1284],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1286,"children":1287},{"style":1046},[1288],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1290,"children":1291},{"style":1040},[1292],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1294,"children":1295},{"style":1106},[1296],{"type":998,"value":1297},"\"Age in days: ",{"type":993,"tag":1034,"props":1299,"children":1300},{"style":1090},[1301],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1303,"children":1304},{"style":1046},[1305],{"type":998,"value":1306},"age_in_days.days",{"type":993,"tag":1034,"props":1308,"children":1309},{"style":1090},[1310],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1312,"children":1313},{"style":1106},[1314],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1316,"children":1317},{"style":1046},[1318],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1320,"children":1321},{"class":1036,"line":136},[1322],{"type":993,"tag":1034,"props":1323,"children":1324},{"emptyLinePlaceholder":13},[1325],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1327,"children":1328},{"class":1036,"line":146},[1329],{"type":993,"tag":1034,"props":1330,"children":1331},{"style":1063},[1332],{"type":998,"value":1333},"# Working with times\n",{"type":993,"tag":1034,"props":1335,"children":1336},{"class":1036,"line":155},[1337,1342,1346],{"type":993,"tag":1034,"props":1338,"children":1339},{"style":1046},[1340],{"type":998,"value":1341},"now ",{"type":993,"tag":1034,"props":1343,"children":1344},{"style":1040},[1345],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1347,"children":1348},{"style":1046},[1349],{"type":998,"value":1350}," datetime.datetime.now()\n",{"type":993,"tag":1034,"props":1352,"children":1353},{"class":1036,"line":164},[1354,1358,1362,1366,1371,1375,1380,1384,1388],{"type":993,"tag":1034,"props":1355,"children":1356},{"style":1090},[1357],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1359,"children":1360},{"style":1046},[1361],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1363,"children":1364},{"style":1040},[1365],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1367,"children":1368},{"style":1106},[1369],{"type":998,"value":1370},"\"Current time: ",{"type":993,"tag":1034,"props":1372,"children":1373},{"style":1090},[1374],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1376,"children":1377},{"style":1046},[1378],{"type":998,"value":1379},"now",{"type":993,"tag":1034,"props":1381,"children":1382},{"style":1090},[1383],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1385,"children":1386},{"style":1106},[1387],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1389,"children":1390},{"style":1046},[1391],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1393,"children":1394},{"class":1036,"line":173},[1395],{"type":993,"tag":1034,"props":1396,"children":1397},{"emptyLinePlaceholder":13},[1398],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1400,"children":1401},{"class":1036,"line":182},[1402],{"type":993,"tag":1034,"props":1403,"children":1404},{"style":1063},[1405],{"type":998,"value":1406},"# Format dates for display\n",{"type":993,"tag":1034,"props":1408,"children":1409},{"class":1036,"line":191},[1410,1415,1419,1424,1429,1434,1439],{"type":993,"tag":1034,"props":1411,"children":1412},{"style":1046},[1413],{"type":998,"value":1414},"formatted ",{"type":993,"tag":1034,"props":1416,"children":1417},{"style":1040},[1418],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1420,"children":1421},{"style":1046},[1422],{"type":998,"value":1423}," now.strftime(",{"type":993,"tag":1034,"props":1425,"children":1426},{"style":1106},[1427],{"type":998,"value":1428},"\"%B ",{"type":993,"tag":1034,"props":1430,"children":1431},{"style":1090},[1432],{"type":998,"value":1433},"%d",{"type":993,"tag":1034,"props":1435,"children":1436},{"style":1106},[1437],{"type":998,"value":1438},", %Y at %I:%M %p\"",{"type":993,"tag":1034,"props":1440,"children":1441},{"style":1046},[1442],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1444,"children":1445},{"class":1036,"line":201},[1446,1450,1454,1458,1463,1467,1472,1476,1480],{"type":993,"tag":1034,"props":1447,"children":1448},{"style":1090},[1449],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1451,"children":1452},{"style":1046},[1453],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1455,"children":1456},{"style":1040},[1457],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1459,"children":1460},{"style":1106},[1461],{"type":998,"value":1462},"\"Formatted: ",{"type":993,"tag":1034,"props":1464,"children":1465},{"style":1090},[1466],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1468,"children":1469},{"style":1046},[1470],{"type":998,"value":1471},"formatted",{"type":993,"tag":1034,"props":1473,"children":1474},{"style":1090},[1475],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1477,"children":1478},{"style":1106},[1479],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1481,"children":1482},{"style":1046},[1483],{"type":998,"value":1134},{"type":993,"tag":1485,"props":1486,"children":1488},"h2",{"id":1487},"understanding-pythons-date-and-time-objects",[1489],{"type":998,"value":1490},"🎯 Understanding Python's Date and Time Objects",{"type":993,"tag":1001,"props":1492,"children":1493},{},[1494],{"type":998,"value":1495},"Python provides several types of date and time objects, each designed for specific use cases and levels of precision.",{"type":993,"tag":1497,"props":1498,"children":1502},"info-box",{"emoji":1499,"title":1500,"type":1501},"🕒","Date and Time Types","info",[1503,1512,1532,1540,1558,1566,1584,1592,1610,1618],{"type":993,"tag":1001,"props":1504,"children":1505},{},[1506],{"type":993,"tag":1507,"props":1508,"children":1509},"strong",{},[1510],{"type":998,"value":1511},"date Objects:",{"type":993,"tag":1513,"props":1514,"children":1515},"ul",{},[1516,1522,1527],{"type":993,"tag":1517,"props":1518,"children":1519},"li",{},[1520],{"type":998,"value":1521},"Represents calendar dates (year, month, day)",{"type":993,"tag":1517,"props":1523,"children":1524},{},[1525],{"type":998,"value":1526},"No time information included",{"type":993,"tag":1517,"props":1528,"children":1529},{},[1530],{"type":998,"value":1531},"Perfect for birthdays, deadlines, events",{"type":993,"tag":1001,"props":1533,"children":1534},{},[1535],{"type":993,"tag":1507,"props":1536,"children":1537},{},[1538],{"type":998,"value":1539},"time Objects:",{"type":993,"tag":1513,"props":1541,"children":1542},{},[1543,1548,1553],{"type":993,"tag":1517,"props":1544,"children":1545},{},[1546],{"type":998,"value":1547},"Represents time of day (hour, minute, second, microsecond)",{"type":993,"tag":1517,"props":1549,"children":1550},{},[1551],{"type":998,"value":1552},"No date information included",{"type":993,"tag":1517,"props":1554,"children":1555},{},[1556],{"type":998,"value":1557},"Useful for schedules, durations, timestamps",{"type":993,"tag":1001,"props":1559,"children":1560},{},[1561],{"type":993,"tag":1507,"props":1562,"children":1563},{},[1564],{"type":998,"value":1565},"datetime Objects:",{"type":993,"tag":1513,"props":1567,"children":1568},{},[1569,1574,1579],{"type":993,"tag":1517,"props":1570,"children":1571},{},[1572],{"type":998,"value":1573},"Combines date and time information",{"type":993,"tag":1517,"props":1575,"children":1576},{},[1577],{"type":998,"value":1578},"Most comprehensive and commonly used",{"type":993,"tag":1517,"props":1580,"children":1581},{},[1582],{"type":998,"value":1583},"Ideal for complete timestamp representation",{"type":993,"tag":1001,"props":1585,"children":1586},{},[1587],{"type":993,"tag":1507,"props":1588,"children":1589},{},[1590],{"type":998,"value":1591},"timedelta Objects:",{"type":993,"tag":1513,"props":1593,"children":1594},{},[1595,1600,1605],{"type":993,"tag":1517,"props":1596,"children":1597},{},[1598],{"type":998,"value":1599},"Represents duration between two dates/times",{"type":993,"tag":1517,"props":1601,"children":1602},{},[1603],{"type":998,"value":1604},"Used for calculations and time arithmetic",{"type":993,"tag":1517,"props":1606,"children":1607},{},[1608],{"type":998,"value":1609},"Helpful for scheduling and interval calculations",{"type":993,"tag":1001,"props":1611,"children":1612},{},[1613],{"type":993,"tag":1507,"props":1614,"children":1615},{},[1616],{"type":998,"value":1617},"Key Benefits:",{"type":993,"tag":1513,"props":1619,"children":1620},{},[1621,1631,1641,1651],{"type":993,"tag":1517,"props":1622,"children":1623},{},[1624,1629],{"type":993,"tag":1507,"props":1625,"children":1626},{},[1627],{"type":998,"value":1628},"Accuracy",{"type":998,"value":1630},": Handle dates and times with precision",{"type":993,"tag":1517,"props":1632,"children":1633},{},[1634,1639],{"type":993,"tag":1507,"props":1635,"children":1636},{},[1637],{"type":998,"value":1638},"Calculations",{"type":998,"value":1640},": Perform date arithmetic easily",{"type":993,"tag":1517,"props":1642,"children":1643},{},[1644,1649],{"type":993,"tag":1507,"props":1645,"children":1646},{},[1647],{"type":998,"value":1648},"Formatting",{"type":998,"value":1650},": Display dates in any format needed",{"type":993,"tag":1517,"props":1652,"children":1653},{},[1654,1659],{"type":993,"tag":1507,"props":1655,"children":1656},{},[1657],{"type":998,"value":1658},"Parsing",{"type":998,"value":1660},": Convert strings to date objects reliably",{"type":993,"tag":1662,"props":1663,"children":1665},"h3",{"id":1664},"creating-date-objects",[1666],{"type":998,"value":1667},"Creating Date Objects",{"type":993,"tag":1001,"props":1669,"children":1670},{},[1671],{"type":998,"value":1672},"Date objects represent calendar dates without time information, perfect for events, deadlines, and date-based calculations.",{"type":993,"tag":1021,"props":1674,"children":1675},{},[1676],{"type":993,"tag":1025,"props":1677,"children":1679},{"className":1027,"code":1678,"language":6,"meta":8,"style":8},"import datetime\n\n# Different ways to create dates\ntoday = datetime.date.today()\nprint(f\"Today: {today}\")\n\n# Create specific dates\nnew_year = datetime.date(2024, 1, 1)\nindependence_day = datetime.date(2024, 7, 4)\n\nprint(f\"New Year: {new_year}\")\nprint(f\"Independence Day: {independence_day}\")\n\n# Access date components\nprint(f\"Year: {today.year}\")\nprint(f\"Month: {today.month}\")\nprint(f\"Day: {today.day}\")\nprint(f\"Weekday: {today.weekday()}\")  # 0=Monday, 6=Sunday\n\n# Create dates from strings\ndate_string = \"2024-12-25\"\nchristmas = datetime.datetime.strptime(date_string, \"%Y-%m-%d\").date()\nprint(f\"Christmas: {christmas}\")\n",[1680],{"type":993,"tag":1007,"props":1681,"children":1682},{"__ignoreMap":8},[1683,1694,1701,1709,1724,1764,1771,1779,1821,1863,1870,1911,1952,1959,1967,2008,2049,2090,2137,2144,2152,2169,2204],{"type":993,"tag":1034,"props":1684,"children":1685},{"class":1036,"line":12},[1686,1690],{"type":993,"tag":1034,"props":1687,"children":1688},{"style":1040},[1689],{"type":998,"value":1043},{"type":993,"tag":1034,"props":1691,"children":1692},{"style":1046},[1693],{"type":998,"value":1049},{"type":993,"tag":1034,"props":1695,"children":1696},{"class":1036,"line":27},[1697],{"type":993,"tag":1034,"props":1698,"children":1699},{"emptyLinePlaceholder":13},[1700],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1702,"children":1703},{"class":1036,"line":36},[1704],{"type":993,"tag":1034,"props":1705,"children":1706},{"style":1063},[1707],{"type":998,"value":1708},"# Different ways to create dates\n",{"type":993,"tag":1034,"props":1710,"children":1711},{"class":1036,"line":45},[1712,1716,1720],{"type":993,"tag":1034,"props":1713,"children":1714},{"style":1046},[1715],{"type":998,"value":1074},{"type":993,"tag":1034,"props":1717,"children":1718},{"style":1040},[1719],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1721,"children":1722},{"style":1046},[1723],{"type":998,"value":1084},{"type":993,"tag":1034,"props":1725,"children":1726},{"class":1036,"line":54},[1727,1731,1735,1739,1744,1748,1752,1756,1760],{"type":993,"tag":1034,"props":1728,"children":1729},{"style":1090},[1730],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1732,"children":1733},{"style":1046},[1734],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1736,"children":1737},{"style":1040},[1738],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1740,"children":1741},{"style":1106},[1742],{"type":998,"value":1743},"\"Today: ",{"type":993,"tag":1034,"props":1745,"children":1746},{"style":1090},[1747],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1749,"children":1750},{"style":1046},[1751],{"type":998,"value":1119},{"type":993,"tag":1034,"props":1753,"children":1754},{"style":1090},[1755],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1757,"children":1758},{"style":1106},[1759],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1761,"children":1762},{"style":1046},[1763],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1765,"children":1766},{"class":1036,"line":63},[1767],{"type":993,"tag":1034,"props":1768,"children":1769},{"emptyLinePlaceholder":13},[1770],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1772,"children":1773},{"class":1036,"line":72},[1774],{"type":993,"tag":1034,"props":1775,"children":1776},{"style":1063},[1777],{"type":998,"value":1778},"# Create specific dates\n",{"type":993,"tag":1034,"props":1780,"children":1781},{"class":1036,"line":81},[1782,1787,1791,1795,1800,1804,1809,1813,1817],{"type":993,"tag":1034,"props":1783,"children":1784},{"style":1046},[1785],{"type":998,"value":1786},"new_year ",{"type":993,"tag":1034,"props":1788,"children":1789},{"style":1040},[1790],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1792,"children":1793},{"style":1046},[1794],{"type":998,"value":1166},{"type":993,"tag":1034,"props":1796,"children":1797},{"style":1090},[1798],{"type":998,"value":1799},"2024",{"type":993,"tag":1034,"props":1801,"children":1802},{"style":1046},[1803],{"type":998,"value":1176},{"type":993,"tag":1034,"props":1805,"children":1806},{"style":1090},[1807],{"type":998,"value":1808},"1",{"type":993,"tag":1034,"props":1810,"children":1811},{"style":1046},[1812],{"type":998,"value":1176},{"type":993,"tag":1034,"props":1814,"children":1815},{"style":1090},[1816],{"type":998,"value":1808},{"type":993,"tag":1034,"props":1818,"children":1819},{"style":1046},[1820],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1822,"children":1823},{"class":1036,"line":91},[1824,1829,1833,1837,1841,1845,1850,1854,1859],{"type":993,"tag":1034,"props":1825,"children":1826},{"style":1046},[1827],{"type":998,"value":1828},"independence_day ",{"type":993,"tag":1034,"props":1830,"children":1831},{"style":1040},[1832],{"type":998,"value":1079},{"type":993,"tag":1034,"props":1834,"children":1835},{"style":1046},[1836],{"type":998,"value":1166},{"type":993,"tag":1034,"props":1838,"children":1839},{"style":1090},[1840],{"type":998,"value":1799},{"type":993,"tag":1034,"props":1842,"children":1843},{"style":1046},[1844],{"type":998,"value":1176},{"type":993,"tag":1034,"props":1846,"children":1847},{"style":1090},[1848],{"type":998,"value":1849},"7",{"type":993,"tag":1034,"props":1851,"children":1852},{"style":1046},[1853],{"type":998,"value":1176},{"type":993,"tag":1034,"props":1855,"children":1856},{"style":1090},[1857],{"type":998,"value":1858},"4",{"type":993,"tag":1034,"props":1860,"children":1861},{"style":1046},[1862],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1864,"children":1865},{"class":1036,"line":100},[1866],{"type":993,"tag":1034,"props":1867,"children":1868},{"emptyLinePlaceholder":13},[1869],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1871,"children":1872},{"class":1036,"line":109},[1873,1877,1881,1885,1890,1894,1899,1903,1907],{"type":993,"tag":1034,"props":1874,"children":1875},{"style":1090},[1876],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1878,"children":1879},{"style":1046},[1880],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1882,"children":1883},{"style":1040},[1884],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1886,"children":1887},{"style":1106},[1888],{"type":998,"value":1889},"\"New Year: ",{"type":993,"tag":1034,"props":1891,"children":1892},{"style":1090},[1893],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1895,"children":1896},{"style":1046},[1897],{"type":998,"value":1898},"new_year",{"type":993,"tag":1034,"props":1900,"children":1901},{"style":1090},[1902],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1904,"children":1905},{"style":1106},[1906],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1908,"children":1909},{"style":1046},[1910],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1912,"children":1913},{"class":1036,"line":118},[1914,1918,1922,1926,1931,1935,1940,1944,1948],{"type":993,"tag":1034,"props":1915,"children":1916},{"style":1090},[1917],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1919,"children":1920},{"style":1046},[1921],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1923,"children":1924},{"style":1040},[1925],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1927,"children":1928},{"style":1106},[1929],{"type":998,"value":1930},"\"Independence Day: ",{"type":993,"tag":1034,"props":1932,"children":1933},{"style":1090},[1934],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1936,"children":1937},{"style":1046},[1938],{"type":998,"value":1939},"independence_day",{"type":993,"tag":1034,"props":1941,"children":1942},{"style":1090},[1943],{"type":998,"value":1124},{"type":993,"tag":1034,"props":1945,"children":1946},{"style":1106},[1947],{"type":998,"value":1129},{"type":993,"tag":1034,"props":1949,"children":1950},{"style":1046},[1951],{"type":998,"value":1134},{"type":993,"tag":1034,"props":1953,"children":1954},{"class":1036,"line":127},[1955],{"type":993,"tag":1034,"props":1956,"children":1957},{"emptyLinePlaceholder":13},[1958],{"type":998,"value":1057},{"type":993,"tag":1034,"props":1960,"children":1961},{"class":1036,"line":136},[1962],{"type":993,"tag":1034,"props":1963,"children":1964},{"style":1063},[1965],{"type":998,"value":1966},"# Access date components\n",{"type":993,"tag":1034,"props":1968,"children":1969},{"class":1036,"line":146},[1970,1974,1978,1982,1987,1991,1996,2000,2004],{"type":993,"tag":1034,"props":1971,"children":1972},{"style":1090},[1973],{"type":998,"value":1093},{"type":993,"tag":1034,"props":1975,"children":1976},{"style":1046},[1977],{"type":998,"value":1098},{"type":993,"tag":1034,"props":1979,"children":1980},{"style":1040},[1981],{"type":998,"value":1103},{"type":993,"tag":1034,"props":1983,"children":1984},{"style":1106},[1985],{"type":998,"value":1986},"\"Year: ",{"type":993,"tag":1034,"props":1988,"children":1989},{"style":1090},[1990],{"type":998,"value":1114},{"type":993,"tag":1034,"props":1992,"children":1993},{"style":1046},[1994],{"type":998,"value":1995},"today.year",{"type":993,"tag":1034,"props":1997,"children":1998},{"style":1090},[1999],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2001,"children":2002},{"style":1106},[2003],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2005,"children":2006},{"style":1046},[2007],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2009,"children":2010},{"class":1036,"line":155},[2011,2015,2019,2023,2028,2032,2037,2041,2045],{"type":993,"tag":1034,"props":2012,"children":2013},{"style":1090},[2014],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2016,"children":2017},{"style":1046},[2018],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2020,"children":2021},{"style":1040},[2022],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2024,"children":2025},{"style":1106},[2026],{"type":998,"value":2027},"\"Month: ",{"type":993,"tag":1034,"props":2029,"children":2030},{"style":1090},[2031],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2033,"children":2034},{"style":1046},[2035],{"type":998,"value":2036},"today.month",{"type":993,"tag":1034,"props":2038,"children":2039},{"style":1090},[2040],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2042,"children":2043},{"style":1106},[2044],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2046,"children":2047},{"style":1046},[2048],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2050,"children":2051},{"class":1036,"line":164},[2052,2056,2060,2064,2069,2073,2078,2082,2086],{"type":993,"tag":1034,"props":2053,"children":2054},{"style":1090},[2055],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2057,"children":2058},{"style":1046},[2059],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2061,"children":2062},{"style":1040},[2063],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2065,"children":2066},{"style":1106},[2067],{"type":998,"value":2068},"\"Day: ",{"type":993,"tag":1034,"props":2070,"children":2071},{"style":1090},[2072],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2074,"children":2075},{"style":1046},[2076],{"type":998,"value":2077},"today.day",{"type":993,"tag":1034,"props":2079,"children":2080},{"style":1090},[2081],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2083,"children":2084},{"style":1106},[2085],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2087,"children":2088},{"style":1046},[2089],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2091,"children":2092},{"class":1036,"line":173},[2093,2097,2101,2105,2110,2114,2119,2123,2127,2132],{"type":993,"tag":1034,"props":2094,"children":2095},{"style":1090},[2096],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2098,"children":2099},{"style":1046},[2100],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2102,"children":2103},{"style":1040},[2104],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2106,"children":2107},{"style":1106},[2108],{"type":998,"value":2109},"\"Weekday: ",{"type":993,"tag":1034,"props":2111,"children":2112},{"style":1090},[2113],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2115,"children":2116},{"style":1046},[2117],{"type":998,"value":2118},"today.weekday()",{"type":993,"tag":1034,"props":2120,"children":2121},{"style":1090},[2122],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2124,"children":2125},{"style":1106},[2126],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2128,"children":2129},{"style":1046},[2130],{"type":998,"value":2131},")  ",{"type":993,"tag":1034,"props":2133,"children":2134},{"style":1063},[2135],{"type":998,"value":2136},"# 0=Monday, 6=Sunday\n",{"type":993,"tag":1034,"props":2138,"children":2139},{"class":1036,"line":182},[2140],{"type":993,"tag":1034,"props":2141,"children":2142},{"emptyLinePlaceholder":13},[2143],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2145,"children":2146},{"class":1036,"line":191},[2147],{"type":993,"tag":1034,"props":2148,"children":2149},{"style":1063},[2150],{"type":998,"value":2151},"# Create dates from strings\n",{"type":993,"tag":1034,"props":2153,"children":2154},{"class":1036,"line":201},[2155,2160,2164],{"type":993,"tag":1034,"props":2156,"children":2157},{"style":1046},[2158],{"type":998,"value":2159},"date_string ",{"type":993,"tag":1034,"props":2161,"children":2162},{"style":1040},[2163],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2165,"children":2166},{"style":1106},[2167],{"type":998,"value":2168}," \"2024-12-25\"\n",{"type":993,"tag":1034,"props":2170,"children":2171},{"class":1036,"line":210},[2172,2177,2181,2186,2191,2195,2199],{"type":993,"tag":1034,"props":2173,"children":2174},{"style":1046},[2175],{"type":998,"value":2176},"christmas ",{"type":993,"tag":1034,"props":2178,"children":2179},{"style":1040},[2180],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2182,"children":2183},{"style":1046},[2184],{"type":998,"value":2185}," datetime.datetime.strptime(date_string, ",{"type":993,"tag":1034,"props":2187,"children":2188},{"style":1106},[2189],{"type":998,"value":2190},"\"%Y-%m-",{"type":993,"tag":1034,"props":2192,"children":2193},{"style":1090},[2194],{"type":998,"value":1433},{"type":993,"tag":1034,"props":2196,"children":2197},{"style":1106},[2198],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2200,"children":2201},{"style":1046},[2202],{"type":998,"value":2203},").date()\n",{"type":993,"tag":1034,"props":2205,"children":2206},{"class":1036,"line":219},[2207,2211,2215,2219,2224,2228,2233,2237,2241],{"type":993,"tag":1034,"props":2208,"children":2209},{"style":1090},[2210],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2212,"children":2213},{"style":1046},[2214],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2216,"children":2217},{"style":1040},[2218],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2220,"children":2221},{"style":1106},[2222],{"type":998,"value":2223},"\"Christmas: ",{"type":993,"tag":1034,"props":2225,"children":2226},{"style":1090},[2227],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2229,"children":2230},{"style":1046},[2231],{"type":998,"value":2232},"christmas",{"type":993,"tag":1034,"props":2234,"children":2235},{"style":1090},[2236],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2238,"children":2239},{"style":1106},[2240],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2242,"children":2243},{"style":1046},[2244],{"type":998,"value":1134},{"type":993,"tag":1662,"props":2246,"children":2248},{"id":2247},"working-with-time-objects",[2249],{"type":998,"value":2250},"Working with Time Objects",{"type":993,"tag":1001,"props":2252,"children":2253},{},[2254],{"type":998,"value":2255},"Time objects represent time of day without date information, useful for schedules and recurring events.",{"type":993,"tag":1021,"props":2257,"children":2258},{},[2259],{"type":993,"tag":1025,"props":2260,"children":2262},{"className":1027,"code":2261,"language":6,"meta":8,"style":8},"import datetime\n\n# Create time objects\nmorning_meeting = datetime.time(9, 30, 0)  # 9:30 AM\nlunch_time = datetime.time(12, 0)          # 12:00 PM\nevening_deadline = datetime.time(17, 30)   # 5:30 PM\n\nprint(f\"Morning meeting: {morning_meeting}\")\nprint(f\"Lunch time: {lunch_time}\")\nprint(f\"Evening deadline: {evening_deadline}\")\n\n# Access time components\nprint(f\"Hour: {morning_meeting.hour}\")\nprint(f\"Minute: {morning_meeting.minute}\")\nprint(f\"Second: {morning_meeting.second}\")\n\n# Current time\nnow_time = datetime.datetime.now().time()\nprint(f\"Current time: {now_time}\")\n\n# Check if current time is after deadline\ncurrent_hour = datetime.datetime.now().hour\nif current_hour > evening_deadline.hour:\n    print(\"Past deadline!\")\nelse:\n    print(\"Still time to work\")\n",[2263],{"type":993,"tag":1007,"props":2264,"children":2265},{"__ignoreMap":8},[2266,2277,2284,2292,2341,2380,2419,2426,2467,2508,2549,2556,2564,2605,2646,2687,2694,2702,2719,2759,2766,2774,2791,2814,2835,2848],{"type":993,"tag":1034,"props":2267,"children":2268},{"class":1036,"line":12},[2269,2273],{"type":993,"tag":1034,"props":2270,"children":2271},{"style":1040},[2272],{"type":998,"value":1043},{"type":993,"tag":1034,"props":2274,"children":2275},{"style":1046},[2276],{"type":998,"value":1049},{"type":993,"tag":1034,"props":2278,"children":2279},{"class":1036,"line":27},[2280],{"type":993,"tag":1034,"props":2281,"children":2282},{"emptyLinePlaceholder":13},[2283],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2285,"children":2286},{"class":1036,"line":36},[2287],{"type":993,"tag":1034,"props":2288,"children":2289},{"style":1063},[2290],{"type":998,"value":2291},"# Create time objects\n",{"type":993,"tag":1034,"props":2293,"children":2294},{"class":1036,"line":45},[2295,2300,2304,2309,2314,2318,2323,2327,2332,2336],{"type":993,"tag":1034,"props":2296,"children":2297},{"style":1046},[2298],{"type":998,"value":2299},"morning_meeting ",{"type":993,"tag":1034,"props":2301,"children":2302},{"style":1040},[2303],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2305,"children":2306},{"style":1046},[2307],{"type":998,"value":2308}," datetime.time(",{"type":993,"tag":1034,"props":2310,"children":2311},{"style":1090},[2312],{"type":998,"value":2313},"9",{"type":993,"tag":1034,"props":2315,"children":2316},{"style":1046},[2317],{"type":998,"value":1176},{"type":993,"tag":1034,"props":2319,"children":2320},{"style":1090},[2321],{"type":998,"value":2322},"30",{"type":993,"tag":1034,"props":2324,"children":2325},{"style":1046},[2326],{"type":998,"value":1176},{"type":993,"tag":1034,"props":2328,"children":2329},{"style":1090},[2330],{"type":998,"value":2331},"0",{"type":993,"tag":1034,"props":2333,"children":2334},{"style":1046},[2335],{"type":998,"value":2131},{"type":993,"tag":1034,"props":2337,"children":2338},{"style":1063},[2339],{"type":998,"value":2340},"# 9:30 AM\n",{"type":993,"tag":1034,"props":2342,"children":2343},{"class":1036,"line":54},[2344,2349,2353,2357,2362,2366,2370,2375],{"type":993,"tag":1034,"props":2345,"children":2346},{"style":1046},[2347],{"type":998,"value":2348},"lunch_time ",{"type":993,"tag":1034,"props":2350,"children":2351},{"style":1040},[2352],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2354,"children":2355},{"style":1046},[2356],{"type":998,"value":2308},{"type":993,"tag":1034,"props":2358,"children":2359},{"style":1090},[2360],{"type":998,"value":2361},"12",{"type":993,"tag":1034,"props":2363,"children":2364},{"style":1046},[2365],{"type":998,"value":1176},{"type":993,"tag":1034,"props":2367,"children":2368},{"style":1090},[2369],{"type":998,"value":2331},{"type":993,"tag":1034,"props":2371,"children":2372},{"style":1046},[2373],{"type":998,"value":2374},")          ",{"type":993,"tag":1034,"props":2376,"children":2377},{"style":1063},[2378],{"type":998,"value":2379},"# 12:00 PM\n",{"type":993,"tag":1034,"props":2381,"children":2382},{"class":1036,"line":63},[2383,2388,2392,2396,2401,2405,2409,2414],{"type":993,"tag":1034,"props":2384,"children":2385},{"style":1046},[2386],{"type":998,"value":2387},"evening_deadline ",{"type":993,"tag":1034,"props":2389,"children":2390},{"style":1040},[2391],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2393,"children":2394},{"style":1046},[2395],{"type":998,"value":2308},{"type":993,"tag":1034,"props":2397,"children":2398},{"style":1090},[2399],{"type":998,"value":2400},"17",{"type":993,"tag":1034,"props":2402,"children":2403},{"style":1046},[2404],{"type":998,"value":1176},{"type":993,"tag":1034,"props":2406,"children":2407},{"style":1090},[2408],{"type":998,"value":2322},{"type":993,"tag":1034,"props":2410,"children":2411},{"style":1046},[2412],{"type":998,"value":2413},")   ",{"type":993,"tag":1034,"props":2415,"children":2416},{"style":1063},[2417],{"type":998,"value":2418},"# 5:30 PM\n",{"type":993,"tag":1034,"props":2420,"children":2421},{"class":1036,"line":72},[2422],{"type":993,"tag":1034,"props":2423,"children":2424},{"emptyLinePlaceholder":13},[2425],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2427,"children":2428},{"class":1036,"line":81},[2429,2433,2437,2441,2446,2450,2455,2459,2463],{"type":993,"tag":1034,"props":2430,"children":2431},{"style":1090},[2432],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2434,"children":2435},{"style":1046},[2436],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2438,"children":2439},{"style":1040},[2440],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2442,"children":2443},{"style":1106},[2444],{"type":998,"value":2445},"\"Morning meeting: ",{"type":993,"tag":1034,"props":2447,"children":2448},{"style":1090},[2449],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2451,"children":2452},{"style":1046},[2453],{"type":998,"value":2454},"morning_meeting",{"type":993,"tag":1034,"props":2456,"children":2457},{"style":1090},[2458],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2460,"children":2461},{"style":1106},[2462],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2464,"children":2465},{"style":1046},[2466],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2468,"children":2469},{"class":1036,"line":91},[2470,2474,2478,2482,2487,2491,2496,2500,2504],{"type":993,"tag":1034,"props":2471,"children":2472},{"style":1090},[2473],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2475,"children":2476},{"style":1046},[2477],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2479,"children":2480},{"style":1040},[2481],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2483,"children":2484},{"style":1106},[2485],{"type":998,"value":2486},"\"Lunch time: ",{"type":993,"tag":1034,"props":2488,"children":2489},{"style":1090},[2490],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2492,"children":2493},{"style":1046},[2494],{"type":998,"value":2495},"lunch_time",{"type":993,"tag":1034,"props":2497,"children":2498},{"style":1090},[2499],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2501,"children":2502},{"style":1106},[2503],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2505,"children":2506},{"style":1046},[2507],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2509,"children":2510},{"class":1036,"line":100},[2511,2515,2519,2523,2528,2532,2537,2541,2545],{"type":993,"tag":1034,"props":2512,"children":2513},{"style":1090},[2514],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2516,"children":2517},{"style":1046},[2518],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2520,"children":2521},{"style":1040},[2522],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2524,"children":2525},{"style":1106},[2526],{"type":998,"value":2527},"\"Evening deadline: ",{"type":993,"tag":1034,"props":2529,"children":2530},{"style":1090},[2531],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2533,"children":2534},{"style":1046},[2535],{"type":998,"value":2536},"evening_deadline",{"type":993,"tag":1034,"props":2538,"children":2539},{"style":1090},[2540],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2542,"children":2543},{"style":1106},[2544],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2546,"children":2547},{"style":1046},[2548],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2550,"children":2551},{"class":1036,"line":109},[2552],{"type":993,"tag":1034,"props":2553,"children":2554},{"emptyLinePlaceholder":13},[2555],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2557,"children":2558},{"class":1036,"line":118},[2559],{"type":993,"tag":1034,"props":2560,"children":2561},{"style":1063},[2562],{"type":998,"value":2563},"# Access time components\n",{"type":993,"tag":1034,"props":2565,"children":2566},{"class":1036,"line":127},[2567,2571,2575,2579,2584,2588,2593,2597,2601],{"type":993,"tag":1034,"props":2568,"children":2569},{"style":1090},[2570],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2572,"children":2573},{"style":1046},[2574],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2576,"children":2577},{"style":1040},[2578],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2580,"children":2581},{"style":1106},[2582],{"type":998,"value":2583},"\"Hour: ",{"type":993,"tag":1034,"props":2585,"children":2586},{"style":1090},[2587],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2589,"children":2590},{"style":1046},[2591],{"type":998,"value":2592},"morning_meeting.hour",{"type":993,"tag":1034,"props":2594,"children":2595},{"style":1090},[2596],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2598,"children":2599},{"style":1106},[2600],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2602,"children":2603},{"style":1046},[2604],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2606,"children":2607},{"class":1036,"line":136},[2608,2612,2616,2620,2625,2629,2634,2638,2642],{"type":993,"tag":1034,"props":2609,"children":2610},{"style":1090},[2611],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2613,"children":2614},{"style":1046},[2615],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2617,"children":2618},{"style":1040},[2619],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2621,"children":2622},{"style":1106},[2623],{"type":998,"value":2624},"\"Minute: ",{"type":993,"tag":1034,"props":2626,"children":2627},{"style":1090},[2628],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2630,"children":2631},{"style":1046},[2632],{"type":998,"value":2633},"morning_meeting.minute",{"type":993,"tag":1034,"props":2635,"children":2636},{"style":1090},[2637],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2639,"children":2640},{"style":1106},[2641],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2643,"children":2644},{"style":1046},[2645],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2647,"children":2648},{"class":1036,"line":146},[2649,2653,2657,2661,2666,2670,2675,2679,2683],{"type":993,"tag":1034,"props":2650,"children":2651},{"style":1090},[2652],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2654,"children":2655},{"style":1046},[2656],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2658,"children":2659},{"style":1040},[2660],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2662,"children":2663},{"style":1106},[2664],{"type":998,"value":2665},"\"Second: ",{"type":993,"tag":1034,"props":2667,"children":2668},{"style":1090},[2669],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2671,"children":2672},{"style":1046},[2673],{"type":998,"value":2674},"morning_meeting.second",{"type":993,"tag":1034,"props":2676,"children":2677},{"style":1090},[2678],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2680,"children":2681},{"style":1106},[2682],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2684,"children":2685},{"style":1046},[2686],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2688,"children":2689},{"class":1036,"line":155},[2690],{"type":993,"tag":1034,"props":2691,"children":2692},{"emptyLinePlaceholder":13},[2693],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2695,"children":2696},{"class":1036,"line":164},[2697],{"type":993,"tag":1034,"props":2698,"children":2699},{"style":1063},[2700],{"type":998,"value":2701},"# Current time\n",{"type":993,"tag":1034,"props":2703,"children":2704},{"class":1036,"line":173},[2705,2710,2714],{"type":993,"tag":1034,"props":2706,"children":2707},{"style":1046},[2708],{"type":998,"value":2709},"now_time ",{"type":993,"tag":1034,"props":2711,"children":2712},{"style":1040},[2713],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2715,"children":2716},{"style":1046},[2717],{"type":998,"value":2718}," datetime.datetime.now().time()\n",{"type":993,"tag":1034,"props":2720,"children":2721},{"class":1036,"line":182},[2722,2726,2730,2734,2738,2742,2747,2751,2755],{"type":993,"tag":1034,"props":2723,"children":2724},{"style":1090},[2725],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2727,"children":2728},{"style":1046},[2729],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2731,"children":2732},{"style":1040},[2733],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2735,"children":2736},{"style":1106},[2737],{"type":998,"value":1370},{"type":993,"tag":1034,"props":2739,"children":2740},{"style":1090},[2741],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2743,"children":2744},{"style":1046},[2745],{"type":998,"value":2746},"now_time",{"type":993,"tag":1034,"props":2748,"children":2749},{"style":1090},[2750],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2752,"children":2753},{"style":1106},[2754],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2756,"children":2757},{"style":1046},[2758],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2760,"children":2761},{"class":1036,"line":191},[2762],{"type":993,"tag":1034,"props":2763,"children":2764},{"emptyLinePlaceholder":13},[2765],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2767,"children":2768},{"class":1036,"line":201},[2769],{"type":993,"tag":1034,"props":2770,"children":2771},{"style":1063},[2772],{"type":998,"value":2773},"# Check if current time is after deadline\n",{"type":993,"tag":1034,"props":2775,"children":2776},{"class":1036,"line":210},[2777,2782,2786],{"type":993,"tag":1034,"props":2778,"children":2779},{"style":1046},[2780],{"type":998,"value":2781},"current_hour ",{"type":993,"tag":1034,"props":2783,"children":2784},{"style":1040},[2785],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2787,"children":2788},{"style":1046},[2789],{"type":998,"value":2790}," datetime.datetime.now().hour\n",{"type":993,"tag":1034,"props":2792,"children":2793},{"class":1036,"line":219},[2794,2799,2804,2809],{"type":993,"tag":1034,"props":2795,"children":2796},{"style":1040},[2797],{"type":998,"value":2798},"if",{"type":993,"tag":1034,"props":2800,"children":2801},{"style":1046},[2802],{"type":998,"value":2803}," current_hour ",{"type":993,"tag":1034,"props":2805,"children":2806},{"style":1040},[2807],{"type":998,"value":2808},">",{"type":993,"tag":1034,"props":2810,"children":2811},{"style":1046},[2812],{"type":998,"value":2813}," evening_deadline.hour:\n",{"type":993,"tag":1034,"props":2815,"children":2816},{"class":1036,"line":228},[2817,2822,2826,2831],{"type":993,"tag":1034,"props":2818,"children":2819},{"style":1090},[2820],{"type":998,"value":2821},"    print",{"type":993,"tag":1034,"props":2823,"children":2824},{"style":1046},[2825],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2827,"children":2828},{"style":1106},[2829],{"type":998,"value":2830},"\"Past deadline!\"",{"type":993,"tag":1034,"props":2832,"children":2833},{"style":1046},[2834],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2836,"children":2837},{"class":1036,"line":238},[2838,2843],{"type":993,"tag":1034,"props":2839,"children":2840},{"style":1040},[2841],{"type":998,"value":2842},"else",{"type":993,"tag":1034,"props":2844,"children":2845},{"style":1046},[2846],{"type":998,"value":2847},":\n",{"type":993,"tag":1034,"props":2849,"children":2850},{"class":1036,"line":247},[2851,2855,2859,2864],{"type":993,"tag":1034,"props":2852,"children":2853},{"style":1090},[2854],{"type":998,"value":2821},{"type":993,"tag":1034,"props":2856,"children":2857},{"style":1046},[2858],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2860,"children":2861},{"style":1106},[2862],{"type":998,"value":2863},"\"Still time to work\"",{"type":993,"tag":1034,"props":2865,"children":2866},{"style":1046},[2867],{"type":998,"value":1134},{"type":993,"tag":1662,"props":2869,"children":2871},{"id":2870},"datetime-objects-for-complete-timestamps",[2872],{"type":998,"value":2873},"DateTime Objects for Complete Timestamps",{"type":993,"tag":1001,"props":2875,"children":2876},{},[2877],{"type":998,"value":2878},"DateTime objects combine date and time, providing complete timestamp functionality for logging, scheduling, and precise time tracking.",{"type":993,"tag":1021,"props":2880,"children":2881},{},[2882],{"type":993,"tag":1025,"props":2883,"children":2885},{"className":1027,"code":2884,"language":6,"meta":8,"style":8},"import datetime\n\n# Create datetime objects\nnow = datetime.datetime.now()\nprint(f\"Current timestamp: {now}\")\n\n# Create specific datetime\nproject_deadline = datetime.datetime(2024, 6, 15, 23, 59, 59)\nprint(f\"Project deadline: {project_deadline}\")\n\n# From date and time components\nmeeting_date = datetime.date(2024, 3, 20)\nmeeting_time = datetime.time(14, 30)\nmeeting_datetime = datetime.datetime.combine(meeting_date, meeting_time)\nprint(f\"Meeting: {meeting_datetime}\")\n\n# Access all components\nprint(f\"Year: {now.year}, Month: {now.month}, Day: {now.day}\")\nprint(f\"Hour: {now.hour}, Minute: {now.minute}, Second: {now.second}\")\n\n# Create from timestamp\ntimestamp = 1640995200  # Unix timestamp\nfrom_timestamp = datetime.datetime.fromtimestamp(timestamp)\nprint(f\"From timestamp: {from_timestamp}\")\n",[2886],{"type":993,"tag":1007,"props":2887,"children":2888},{"__ignoreMap":8},[2889,2900,2907,2915,2930,2970,2977,2985,3053,3094,3101,3109,3151,3184,3201,3242,3249,3257,3333,3409,3416,3424,3446,3463],{"type":993,"tag":1034,"props":2890,"children":2891},{"class":1036,"line":12},[2892,2896],{"type":993,"tag":1034,"props":2893,"children":2894},{"style":1040},[2895],{"type":998,"value":1043},{"type":993,"tag":1034,"props":2897,"children":2898},{"style":1046},[2899],{"type":998,"value":1049},{"type":993,"tag":1034,"props":2901,"children":2902},{"class":1036,"line":27},[2903],{"type":993,"tag":1034,"props":2904,"children":2905},{"emptyLinePlaceholder":13},[2906],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2908,"children":2909},{"class":1036,"line":36},[2910],{"type":993,"tag":1034,"props":2911,"children":2912},{"style":1063},[2913],{"type":998,"value":2914},"# Create datetime objects\n",{"type":993,"tag":1034,"props":2916,"children":2917},{"class":1036,"line":45},[2918,2922,2926],{"type":993,"tag":1034,"props":2919,"children":2920},{"style":1046},[2921],{"type":998,"value":1341},{"type":993,"tag":1034,"props":2923,"children":2924},{"style":1040},[2925],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2927,"children":2928},{"style":1046},[2929],{"type":998,"value":1350},{"type":993,"tag":1034,"props":2931,"children":2932},{"class":1036,"line":54},[2933,2937,2941,2945,2950,2954,2958,2962,2966],{"type":993,"tag":1034,"props":2934,"children":2935},{"style":1090},[2936],{"type":998,"value":1093},{"type":993,"tag":1034,"props":2938,"children":2939},{"style":1046},[2940],{"type":998,"value":1098},{"type":993,"tag":1034,"props":2942,"children":2943},{"style":1040},[2944],{"type":998,"value":1103},{"type":993,"tag":1034,"props":2946,"children":2947},{"style":1106},[2948],{"type":998,"value":2949},"\"Current timestamp: ",{"type":993,"tag":1034,"props":2951,"children":2952},{"style":1090},[2953],{"type":998,"value":1114},{"type":993,"tag":1034,"props":2955,"children":2956},{"style":1046},[2957],{"type":998,"value":1379},{"type":993,"tag":1034,"props":2959,"children":2960},{"style":1090},[2961],{"type":998,"value":1124},{"type":993,"tag":1034,"props":2963,"children":2964},{"style":1106},[2965],{"type":998,"value":1129},{"type":993,"tag":1034,"props":2967,"children":2968},{"style":1046},[2969],{"type":998,"value":1134},{"type":993,"tag":1034,"props":2971,"children":2972},{"class":1036,"line":63},[2973],{"type":993,"tag":1034,"props":2974,"children":2975},{"emptyLinePlaceholder":13},[2976],{"type":998,"value":1057},{"type":993,"tag":1034,"props":2978,"children":2979},{"class":1036,"line":72},[2980],{"type":993,"tag":1034,"props":2981,"children":2982},{"style":1063},[2983],{"type":998,"value":2984},"# Create specific datetime\n",{"type":993,"tag":1034,"props":2986,"children":2987},{"class":1036,"line":81},[2988,2993,2997,3002,3006,3010,3015,3019,3023,3027,3032,3036,3041,3045,3049],{"type":993,"tag":1034,"props":2989,"children":2990},{"style":1046},[2991],{"type":998,"value":2992},"project_deadline ",{"type":993,"tag":1034,"props":2994,"children":2995},{"style":1040},[2996],{"type":998,"value":1079},{"type":993,"tag":1034,"props":2998,"children":2999},{"style":1046},[3000],{"type":998,"value":3001}," datetime.datetime(",{"type":993,"tag":1034,"props":3003,"children":3004},{"style":1090},[3005],{"type":998,"value":1799},{"type":993,"tag":1034,"props":3007,"children":3008},{"style":1046},[3009],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3011,"children":3012},{"style":1090},[3013],{"type":998,"value":3014},"6",{"type":993,"tag":1034,"props":3016,"children":3017},{"style":1046},[3018],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3020,"children":3021},{"style":1090},[3022],{"type":998,"value":1190},{"type":993,"tag":1034,"props":3024,"children":3025},{"style":1046},[3026],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3028,"children":3029},{"style":1090},[3030],{"type":998,"value":3031},"23",{"type":993,"tag":1034,"props":3033,"children":3034},{"style":1046},[3035],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3037,"children":3038},{"style":1090},[3039],{"type":998,"value":3040},"59",{"type":993,"tag":1034,"props":3042,"children":3043},{"style":1046},[3044],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3046,"children":3047},{"style":1090},[3048],{"type":998,"value":3040},{"type":993,"tag":1034,"props":3050,"children":3051},{"style":1046},[3052],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3054,"children":3055},{"class":1036,"line":91},[3056,3060,3064,3068,3073,3077,3082,3086,3090],{"type":993,"tag":1034,"props":3057,"children":3058},{"style":1090},[3059],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3061,"children":3062},{"style":1046},[3063],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3065,"children":3066},{"style":1040},[3067],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3069,"children":3070},{"style":1106},[3071],{"type":998,"value":3072},"\"Project deadline: ",{"type":993,"tag":1034,"props":3074,"children":3075},{"style":1090},[3076],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3078,"children":3079},{"style":1046},[3080],{"type":998,"value":3081},"project_deadline",{"type":993,"tag":1034,"props":3083,"children":3084},{"style":1090},[3085],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3087,"children":3088},{"style":1106},[3089],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3091,"children":3092},{"style":1046},[3093],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3095,"children":3096},{"class":1036,"line":100},[3097],{"type":993,"tag":1034,"props":3098,"children":3099},{"emptyLinePlaceholder":13},[3100],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3102,"children":3103},{"class":1036,"line":109},[3104],{"type":993,"tag":1034,"props":3105,"children":3106},{"style":1063},[3107],{"type":998,"value":3108},"# From date and time components\n",{"type":993,"tag":1034,"props":3110,"children":3111},{"class":1036,"line":118},[3112,3117,3121,3125,3129,3133,3138,3142,3147],{"type":993,"tag":1034,"props":3113,"children":3114},{"style":1046},[3115],{"type":998,"value":3116},"meeting_date ",{"type":993,"tag":1034,"props":3118,"children":3119},{"style":1040},[3120],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3122,"children":3123},{"style":1046},[3124],{"type":998,"value":1166},{"type":993,"tag":1034,"props":3126,"children":3127},{"style":1090},[3128],{"type":998,"value":1799},{"type":993,"tag":1034,"props":3130,"children":3131},{"style":1046},[3132],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3134,"children":3135},{"style":1090},[3136],{"type":998,"value":3137},"3",{"type":993,"tag":1034,"props":3139,"children":3140},{"style":1046},[3141],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3143,"children":3144},{"style":1090},[3145],{"type":998,"value":3146},"20",{"type":993,"tag":1034,"props":3148,"children":3149},{"style":1046},[3150],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3152,"children":3153},{"class":1036,"line":127},[3154,3159,3163,3167,3172,3176,3180],{"type":993,"tag":1034,"props":3155,"children":3156},{"style":1046},[3157],{"type":998,"value":3158},"meeting_time ",{"type":993,"tag":1034,"props":3160,"children":3161},{"style":1040},[3162],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3164,"children":3165},{"style":1046},[3166],{"type":998,"value":2308},{"type":993,"tag":1034,"props":3168,"children":3169},{"style":1090},[3170],{"type":998,"value":3171},"14",{"type":993,"tag":1034,"props":3173,"children":3174},{"style":1046},[3175],{"type":998,"value":1176},{"type":993,"tag":1034,"props":3177,"children":3178},{"style":1090},[3179],{"type":998,"value":2322},{"type":993,"tag":1034,"props":3181,"children":3182},{"style":1046},[3183],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3185,"children":3186},{"class":1036,"line":136},[3187,3192,3196],{"type":993,"tag":1034,"props":3188,"children":3189},{"style":1046},[3190],{"type":998,"value":3191},"meeting_datetime ",{"type":993,"tag":1034,"props":3193,"children":3194},{"style":1040},[3195],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3197,"children":3198},{"style":1046},[3199],{"type":998,"value":3200}," datetime.datetime.combine(meeting_date, meeting_time)\n",{"type":993,"tag":1034,"props":3202,"children":3203},{"class":1036,"line":146},[3204,3208,3212,3216,3221,3225,3230,3234,3238],{"type":993,"tag":1034,"props":3205,"children":3206},{"style":1090},[3207],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3209,"children":3210},{"style":1046},[3211],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3213,"children":3214},{"style":1040},[3215],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3217,"children":3218},{"style":1106},[3219],{"type":998,"value":3220},"\"Meeting: ",{"type":993,"tag":1034,"props":3222,"children":3223},{"style":1090},[3224],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3226,"children":3227},{"style":1046},[3228],{"type":998,"value":3229},"meeting_datetime",{"type":993,"tag":1034,"props":3231,"children":3232},{"style":1090},[3233],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3235,"children":3236},{"style":1106},[3237],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3239,"children":3240},{"style":1046},[3241],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3243,"children":3244},{"class":1036,"line":155},[3245],{"type":993,"tag":1034,"props":3246,"children":3247},{"emptyLinePlaceholder":13},[3248],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3250,"children":3251},{"class":1036,"line":164},[3252],{"type":993,"tag":1034,"props":3253,"children":3254},{"style":1063},[3255],{"type":998,"value":3256},"# Access all components\n",{"type":993,"tag":1034,"props":3258,"children":3259},{"class":1036,"line":173},[3260,3264,3268,3272,3276,3280,3285,3289,3294,3298,3303,3307,3312,3316,3321,3325,3329],{"type":993,"tag":1034,"props":3261,"children":3262},{"style":1090},[3263],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3265,"children":3266},{"style":1046},[3267],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3269,"children":3270},{"style":1040},[3271],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3273,"children":3274},{"style":1106},[3275],{"type":998,"value":1986},{"type":993,"tag":1034,"props":3277,"children":3278},{"style":1090},[3279],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3281,"children":3282},{"style":1046},[3283],{"type":998,"value":3284},"now.year",{"type":993,"tag":1034,"props":3286,"children":3287},{"style":1090},[3288],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3290,"children":3291},{"style":1106},[3292],{"type":998,"value":3293},", Month: ",{"type":993,"tag":1034,"props":3295,"children":3296},{"style":1090},[3297],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3299,"children":3300},{"style":1046},[3301],{"type":998,"value":3302},"now.month",{"type":993,"tag":1034,"props":3304,"children":3305},{"style":1090},[3306],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3308,"children":3309},{"style":1106},[3310],{"type":998,"value":3311},", Day: ",{"type":993,"tag":1034,"props":3313,"children":3314},{"style":1090},[3315],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3317,"children":3318},{"style":1046},[3319],{"type":998,"value":3320},"now.day",{"type":993,"tag":1034,"props":3322,"children":3323},{"style":1090},[3324],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3326,"children":3327},{"style":1106},[3328],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3330,"children":3331},{"style":1046},[3332],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3334,"children":3335},{"class":1036,"line":182},[3336,3340,3344,3348,3352,3356,3361,3365,3370,3374,3379,3383,3388,3392,3397,3401,3405],{"type":993,"tag":1034,"props":3337,"children":3338},{"style":1090},[3339],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3341,"children":3342},{"style":1046},[3343],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3345,"children":3346},{"style":1040},[3347],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3349,"children":3350},{"style":1106},[3351],{"type":998,"value":2583},{"type":993,"tag":1034,"props":3353,"children":3354},{"style":1090},[3355],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3357,"children":3358},{"style":1046},[3359],{"type":998,"value":3360},"now.hour",{"type":993,"tag":1034,"props":3362,"children":3363},{"style":1090},[3364],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3366,"children":3367},{"style":1106},[3368],{"type":998,"value":3369},", Minute: ",{"type":993,"tag":1034,"props":3371,"children":3372},{"style":1090},[3373],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3375,"children":3376},{"style":1046},[3377],{"type":998,"value":3378},"now.minute",{"type":993,"tag":1034,"props":3380,"children":3381},{"style":1090},[3382],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3384,"children":3385},{"style":1106},[3386],{"type":998,"value":3387},", Second: ",{"type":993,"tag":1034,"props":3389,"children":3390},{"style":1090},[3391],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3393,"children":3394},{"style":1046},[3395],{"type":998,"value":3396},"now.second",{"type":993,"tag":1034,"props":3398,"children":3399},{"style":1090},[3400],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3402,"children":3403},{"style":1106},[3404],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3406,"children":3407},{"style":1046},[3408],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3410,"children":3411},{"class":1036,"line":191},[3412],{"type":993,"tag":1034,"props":3413,"children":3414},{"emptyLinePlaceholder":13},[3415],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3417,"children":3418},{"class":1036,"line":201},[3419],{"type":993,"tag":1034,"props":3420,"children":3421},{"style":1063},[3422],{"type":998,"value":3423},"# Create from timestamp\n",{"type":993,"tag":1034,"props":3425,"children":3426},{"class":1036,"line":210},[3427,3432,3436,3441],{"type":993,"tag":1034,"props":3428,"children":3429},{"style":1046},[3430],{"type":998,"value":3431},"timestamp ",{"type":993,"tag":1034,"props":3433,"children":3434},{"style":1040},[3435],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3437,"children":3438},{"style":1090},[3439],{"type":998,"value":3440}," 1640995200",{"type":993,"tag":1034,"props":3442,"children":3443},{"style":1063},[3444],{"type":998,"value":3445},"  # Unix timestamp\n",{"type":993,"tag":1034,"props":3447,"children":3448},{"class":1036,"line":219},[3449,3454,3458],{"type":993,"tag":1034,"props":3450,"children":3451},{"style":1046},[3452],{"type":998,"value":3453},"from_timestamp ",{"type":993,"tag":1034,"props":3455,"children":3456},{"style":1040},[3457],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3459,"children":3460},{"style":1046},[3461],{"type":998,"value":3462}," datetime.datetime.fromtimestamp(timestamp)\n",{"type":993,"tag":1034,"props":3464,"children":3465},{"class":1036,"line":228},[3466,3470,3474,3478,3483,3487,3492,3496,3500],{"type":993,"tag":1034,"props":3467,"children":3468},{"style":1090},[3469],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3471,"children":3472},{"style":1046},[3473],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3475,"children":3476},{"style":1040},[3477],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3479,"children":3480},{"style":1106},[3481],{"type":998,"value":3482},"\"From timestamp: ",{"type":993,"tag":1034,"props":3484,"children":3485},{"style":1090},[3486],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3488,"children":3489},{"style":1046},[3490],{"type":998,"value":3491},"from_timestamp",{"type":993,"tag":1034,"props":3493,"children":3494},{"style":1090},[3495],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3497,"children":3498},{"style":1106},[3499],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3501,"children":3502},{"style":1046},[3503],{"type":998,"value":1134},{"type":993,"tag":1485,"props":3505,"children":3507},{"id":3506},"date-and-time-calculations",[3508],{"type":998,"value":3509},"⚡ Date and Time Calculations",{"type":993,"tag":1001,"props":3511,"children":3512},{},[3513],{"type":998,"value":3514},"Python makes it easy to perform calculations with dates and times using timedelta objects and arithmetic operations.",{"type":993,"tag":1662,"props":3516,"children":3518},{"id":3517},"timedelta-for-duration-calculations",[3519],{"type":998,"value":3520},"TimeDelta for Duration Calculations",{"type":993,"tag":1001,"props":3522,"children":3523},{},[3524],{"type":998,"value":3525},"TimeDelta objects represent durations and enable powerful date arithmetic for scheduling and planning applications.",{"type":993,"tag":1021,"props":3527,"children":3528},{},[3529],{"type":993,"tag":1025,"props":3530,"children":3532},{"className":1027,"code":3531,"language":6,"meta":8,"style":8},"import datetime\n\n# Create timedelta objects\none_week = datetime.timedelta(weeks=1)\nthree_days = datetime.timedelta(days=3)\ntwo_hours = datetime.timedelta(hours=2)\nthirty_minutes = datetime.timedelta(minutes=30)\n\nprint(f\"One week: {one_week}\")\nprint(f\"Three days: {three_days}\")\nprint(f\"Two hours: {two_hours}\")\n\n# Date arithmetic\ntoday = datetime.date.today()\nnext_week = today + one_week\nlast_month = today - datetime.timedelta(days=30)\n\nprint(f\"Today: {today}\")\nprint(f\"Next week: {next_week}\")\nprint(f\"Last month: {last_month}\")\n\n# Calculate differences\nstart_date = datetime.date(2024, 1, 1)\nend_date = datetime.date(2024, 12, 31)\nduration = end_date - start_date\n\nprint(f\"Days in year: {duration.days}\")\nprint(f\"Weeks in year: {duration.days // 7}\")\n\n# Complex calculations\nproject_start = datetime.datetime(2024, 3, 1, 9, 0)\nwork_days = 5 * 8  # 5 days × 8 hours\nproject_hours = datetime.timedelta(hours=work_days)\nproject_end = project_start + project_hours\n\nprint(f\"Project start: {project_start}\")\nprint(f\"Project end: {project_end}\")\n",[3533],{"type":993,"tag":1007,"props":3534,"children":3535},{"__ignoreMap":8},[3536,3547,3554,3562,3597,3630,3664,3697,3704,3745,3786,3827,3834,3842,3857,3883,3923,3930,3969,4010,4051,4058,4066,4106,4147,4173,4180,4221,4268,4275,4283,4339,4371,4400,4426,4433,4474],{"type":993,"tag":1034,"props":3537,"children":3538},{"class":1036,"line":12},[3539,3543],{"type":993,"tag":1034,"props":3540,"children":3541},{"style":1040},[3542],{"type":998,"value":1043},{"type":993,"tag":1034,"props":3544,"children":3545},{"style":1046},[3546],{"type":998,"value":1049},{"type":993,"tag":1034,"props":3548,"children":3549},{"class":1036,"line":27},[3550],{"type":993,"tag":1034,"props":3551,"children":3552},{"emptyLinePlaceholder":13},[3553],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3555,"children":3556},{"class":1036,"line":36},[3557],{"type":993,"tag":1034,"props":3558,"children":3559},{"style":1063},[3560],{"type":998,"value":3561},"# Create timedelta objects\n",{"type":993,"tag":1034,"props":3563,"children":3564},{"class":1036,"line":45},[3565,3570,3574,3579,3585,3589,3593],{"type":993,"tag":1034,"props":3566,"children":3567},{"style":1046},[3568],{"type":998,"value":3569},"one_week ",{"type":993,"tag":1034,"props":3571,"children":3572},{"style":1040},[3573],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3575,"children":3576},{"style":1046},[3577],{"type":998,"value":3578}," datetime.timedelta(",{"type":993,"tag":1034,"props":3580,"children":3582},{"style":3581},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[3583],{"type":998,"value":3584},"weeks",{"type":993,"tag":1034,"props":3586,"children":3587},{"style":1040},[3588],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3590,"children":3591},{"style":1090},[3592],{"type":998,"value":1808},{"type":993,"tag":1034,"props":3594,"children":3595},{"style":1046},[3596],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3598,"children":3599},{"class":1036,"line":54},[3600,3605,3609,3613,3618,3622,3626],{"type":993,"tag":1034,"props":3601,"children":3602},{"style":1046},[3603],{"type":998,"value":3604},"three_days ",{"type":993,"tag":1034,"props":3606,"children":3607},{"style":1040},[3608],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3610,"children":3611},{"style":1046},[3612],{"type":998,"value":3578},{"type":993,"tag":1034,"props":3614,"children":3615},{"style":3581},[3616],{"type":998,"value":3617},"days",{"type":993,"tag":1034,"props":3619,"children":3620},{"style":1040},[3621],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3623,"children":3624},{"style":1090},[3625],{"type":998,"value":3137},{"type":993,"tag":1034,"props":3627,"children":3628},{"style":1046},[3629],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3631,"children":3632},{"class":1036,"line":63},[3633,3638,3642,3646,3651,3655,3660],{"type":993,"tag":1034,"props":3634,"children":3635},{"style":1046},[3636],{"type":998,"value":3637},"two_hours ",{"type":993,"tag":1034,"props":3639,"children":3640},{"style":1040},[3641],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3643,"children":3644},{"style":1046},[3645],{"type":998,"value":3578},{"type":993,"tag":1034,"props":3647,"children":3648},{"style":3581},[3649],{"type":998,"value":3650},"hours",{"type":993,"tag":1034,"props":3652,"children":3653},{"style":1040},[3654],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3656,"children":3657},{"style":1090},[3658],{"type":998,"value":3659},"2",{"type":993,"tag":1034,"props":3661,"children":3662},{"style":1046},[3663],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3665,"children":3666},{"class":1036,"line":72},[3667,3672,3676,3680,3685,3689,3693],{"type":993,"tag":1034,"props":3668,"children":3669},{"style":1046},[3670],{"type":998,"value":3671},"thirty_minutes ",{"type":993,"tag":1034,"props":3673,"children":3674},{"style":1040},[3675],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3677,"children":3678},{"style":1046},[3679],{"type":998,"value":3578},{"type":993,"tag":1034,"props":3681,"children":3682},{"style":3581},[3683],{"type":998,"value":3684},"minutes",{"type":993,"tag":1034,"props":3686,"children":3687},{"style":1040},[3688],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3690,"children":3691},{"style":1090},[3692],{"type":998,"value":2322},{"type":993,"tag":1034,"props":3694,"children":3695},{"style":1046},[3696],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3698,"children":3699},{"class":1036,"line":81},[3700],{"type":993,"tag":1034,"props":3701,"children":3702},{"emptyLinePlaceholder":13},[3703],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3705,"children":3706},{"class":1036,"line":91},[3707,3711,3715,3719,3724,3728,3733,3737,3741],{"type":993,"tag":1034,"props":3708,"children":3709},{"style":1090},[3710],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3712,"children":3713},{"style":1046},[3714],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3716,"children":3717},{"style":1040},[3718],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3720,"children":3721},{"style":1106},[3722],{"type":998,"value":3723},"\"One week: ",{"type":993,"tag":1034,"props":3725,"children":3726},{"style":1090},[3727],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3729,"children":3730},{"style":1046},[3731],{"type":998,"value":3732},"one_week",{"type":993,"tag":1034,"props":3734,"children":3735},{"style":1090},[3736],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3738,"children":3739},{"style":1106},[3740],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3742,"children":3743},{"style":1046},[3744],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3746,"children":3747},{"class":1036,"line":100},[3748,3752,3756,3760,3765,3769,3774,3778,3782],{"type":993,"tag":1034,"props":3749,"children":3750},{"style":1090},[3751],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3753,"children":3754},{"style":1046},[3755],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3757,"children":3758},{"style":1040},[3759],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3761,"children":3762},{"style":1106},[3763],{"type":998,"value":3764},"\"Three days: ",{"type":993,"tag":1034,"props":3766,"children":3767},{"style":1090},[3768],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3770,"children":3771},{"style":1046},[3772],{"type":998,"value":3773},"three_days",{"type":993,"tag":1034,"props":3775,"children":3776},{"style":1090},[3777],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3779,"children":3780},{"style":1106},[3781],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3783,"children":3784},{"style":1046},[3785],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3787,"children":3788},{"class":1036,"line":109},[3789,3793,3797,3801,3806,3810,3815,3819,3823],{"type":993,"tag":1034,"props":3790,"children":3791},{"style":1090},[3792],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3794,"children":3795},{"style":1046},[3796],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3798,"children":3799},{"style":1040},[3800],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3802,"children":3803},{"style":1106},[3804],{"type":998,"value":3805},"\"Two hours: ",{"type":993,"tag":1034,"props":3807,"children":3808},{"style":1090},[3809],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3811,"children":3812},{"style":1046},[3813],{"type":998,"value":3814},"two_hours",{"type":993,"tag":1034,"props":3816,"children":3817},{"style":1090},[3818],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3820,"children":3821},{"style":1106},[3822],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3824,"children":3825},{"style":1046},[3826],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3828,"children":3829},{"class":1036,"line":118},[3830],{"type":993,"tag":1034,"props":3831,"children":3832},{"emptyLinePlaceholder":13},[3833],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3835,"children":3836},{"class":1036,"line":127},[3837],{"type":993,"tag":1034,"props":3838,"children":3839},{"style":1063},[3840],{"type":998,"value":3841},"# Date arithmetic\n",{"type":993,"tag":1034,"props":3843,"children":3844},{"class":1036,"line":136},[3845,3849,3853],{"type":993,"tag":1034,"props":3846,"children":3847},{"style":1046},[3848],{"type":998,"value":1074},{"type":993,"tag":1034,"props":3850,"children":3851},{"style":1040},[3852],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3854,"children":3855},{"style":1046},[3856],{"type":998,"value":1084},{"type":993,"tag":1034,"props":3858,"children":3859},{"class":1036,"line":146},[3860,3865,3869,3873,3878],{"type":993,"tag":1034,"props":3861,"children":3862},{"style":1046},[3863],{"type":998,"value":3864},"next_week ",{"type":993,"tag":1034,"props":3866,"children":3867},{"style":1040},[3868],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3870,"children":3871},{"style":1046},[3872],{"type":998,"value":1267},{"type":993,"tag":1034,"props":3874,"children":3875},{"style":1040},[3876],{"type":998,"value":3877},"+",{"type":993,"tag":1034,"props":3879,"children":3880},{"style":1046},[3881],{"type":998,"value":3882}," one_week\n",{"type":993,"tag":1034,"props":3884,"children":3885},{"class":1036,"line":155},[3886,3891,3895,3899,3903,3907,3911,3915,3919],{"type":993,"tag":1034,"props":3887,"children":3888},{"style":1046},[3889],{"type":998,"value":3890},"last_month ",{"type":993,"tag":1034,"props":3892,"children":3893},{"style":1040},[3894],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3896,"children":3897},{"style":1046},[3898],{"type":998,"value":1267},{"type":993,"tag":1034,"props":3900,"children":3901},{"style":1040},[3902],{"type":998,"value":1272},{"type":993,"tag":1034,"props":3904,"children":3905},{"style":1046},[3906],{"type":998,"value":3578},{"type":993,"tag":1034,"props":3908,"children":3909},{"style":3581},[3910],{"type":998,"value":3617},{"type":993,"tag":1034,"props":3912,"children":3913},{"style":1040},[3914],{"type":998,"value":1079},{"type":993,"tag":1034,"props":3916,"children":3917},{"style":1090},[3918],{"type":998,"value":2322},{"type":993,"tag":1034,"props":3920,"children":3921},{"style":1046},[3922],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3924,"children":3925},{"class":1036,"line":164},[3926],{"type":993,"tag":1034,"props":3927,"children":3928},{"emptyLinePlaceholder":13},[3929],{"type":998,"value":1057},{"type":993,"tag":1034,"props":3931,"children":3932},{"class":1036,"line":173},[3933,3937,3941,3945,3949,3953,3957,3961,3965],{"type":993,"tag":1034,"props":3934,"children":3935},{"style":1090},[3936],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3938,"children":3939},{"style":1046},[3940],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3942,"children":3943},{"style":1040},[3944],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3946,"children":3947},{"style":1106},[3948],{"type":998,"value":1743},{"type":993,"tag":1034,"props":3950,"children":3951},{"style":1090},[3952],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3954,"children":3955},{"style":1046},[3956],{"type":998,"value":1119},{"type":993,"tag":1034,"props":3958,"children":3959},{"style":1090},[3960],{"type":998,"value":1124},{"type":993,"tag":1034,"props":3962,"children":3963},{"style":1106},[3964],{"type":998,"value":1129},{"type":993,"tag":1034,"props":3966,"children":3967},{"style":1046},[3968],{"type":998,"value":1134},{"type":993,"tag":1034,"props":3970,"children":3971},{"class":1036,"line":182},[3972,3976,3980,3984,3989,3993,3998,4002,4006],{"type":993,"tag":1034,"props":3973,"children":3974},{"style":1090},[3975],{"type":998,"value":1093},{"type":993,"tag":1034,"props":3977,"children":3978},{"style":1046},[3979],{"type":998,"value":1098},{"type":993,"tag":1034,"props":3981,"children":3982},{"style":1040},[3983],{"type":998,"value":1103},{"type":993,"tag":1034,"props":3985,"children":3986},{"style":1106},[3987],{"type":998,"value":3988},"\"Next week: ",{"type":993,"tag":1034,"props":3990,"children":3991},{"style":1090},[3992],{"type":998,"value":1114},{"type":993,"tag":1034,"props":3994,"children":3995},{"style":1046},[3996],{"type":998,"value":3997},"next_week",{"type":993,"tag":1034,"props":3999,"children":4000},{"style":1090},[4001],{"type":998,"value":1124},{"type":993,"tag":1034,"props":4003,"children":4004},{"style":1106},[4005],{"type":998,"value":1129},{"type":993,"tag":1034,"props":4007,"children":4008},{"style":1046},[4009],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4011,"children":4012},{"class":1036,"line":191},[4013,4017,4021,4025,4030,4034,4039,4043,4047],{"type":993,"tag":1034,"props":4014,"children":4015},{"style":1090},[4016],{"type":998,"value":1093},{"type":993,"tag":1034,"props":4018,"children":4019},{"style":1046},[4020],{"type":998,"value":1098},{"type":993,"tag":1034,"props":4022,"children":4023},{"style":1040},[4024],{"type":998,"value":1103},{"type":993,"tag":1034,"props":4026,"children":4027},{"style":1106},[4028],{"type":998,"value":4029},"\"Last month: ",{"type":993,"tag":1034,"props":4031,"children":4032},{"style":1090},[4033],{"type":998,"value":1114},{"type":993,"tag":1034,"props":4035,"children":4036},{"style":1046},[4037],{"type":998,"value":4038},"last_month",{"type":993,"tag":1034,"props":4040,"children":4041},{"style":1090},[4042],{"type":998,"value":1124},{"type":993,"tag":1034,"props":4044,"children":4045},{"style":1106},[4046],{"type":998,"value":1129},{"type":993,"tag":1034,"props":4048,"children":4049},{"style":1046},[4050],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4052,"children":4053},{"class":1036,"line":201},[4054],{"type":993,"tag":1034,"props":4055,"children":4056},{"emptyLinePlaceholder":13},[4057],{"type":998,"value":1057},{"type":993,"tag":1034,"props":4059,"children":4060},{"class":1036,"line":210},[4061],{"type":993,"tag":1034,"props":4062,"children":4063},{"style":1063},[4064],{"type":998,"value":4065},"# Calculate differences\n",{"type":993,"tag":1034,"props":4067,"children":4068},{"class":1036,"line":219},[4069,4074,4078,4082,4086,4090,4094,4098,4102],{"type":993,"tag":1034,"props":4070,"children":4071},{"style":1046},[4072],{"type":998,"value":4073},"start_date ",{"type":993,"tag":1034,"props":4075,"children":4076},{"style":1040},[4077],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4079,"children":4080},{"style":1046},[4081],{"type":998,"value":1166},{"type":993,"tag":1034,"props":4083,"children":4084},{"style":1090},[4085],{"type":998,"value":1799},{"type":993,"tag":1034,"props":4087,"children":4088},{"style":1046},[4089],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4091,"children":4092},{"style":1090},[4093],{"type":998,"value":1808},{"type":993,"tag":1034,"props":4095,"children":4096},{"style":1046},[4097],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4099,"children":4100},{"style":1090},[4101],{"type":998,"value":1808},{"type":993,"tag":1034,"props":4103,"children":4104},{"style":1046},[4105],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4107,"children":4108},{"class":1036,"line":228},[4109,4114,4118,4122,4126,4130,4134,4138,4143],{"type":993,"tag":1034,"props":4110,"children":4111},{"style":1046},[4112],{"type":998,"value":4113},"end_date ",{"type":993,"tag":1034,"props":4115,"children":4116},{"style":1040},[4117],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4119,"children":4120},{"style":1046},[4121],{"type":998,"value":1166},{"type":993,"tag":1034,"props":4123,"children":4124},{"style":1090},[4125],{"type":998,"value":1799},{"type":993,"tag":1034,"props":4127,"children":4128},{"style":1046},[4129],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4131,"children":4132},{"style":1090},[4133],{"type":998,"value":2361},{"type":993,"tag":1034,"props":4135,"children":4136},{"style":1046},[4137],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4139,"children":4140},{"style":1090},[4141],{"type":998,"value":4142},"31",{"type":993,"tag":1034,"props":4144,"children":4145},{"style":1046},[4146],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4148,"children":4149},{"class":1036,"line":238},[4150,4155,4159,4164,4168],{"type":993,"tag":1034,"props":4151,"children":4152},{"style":1046},[4153],{"type":998,"value":4154},"duration ",{"type":993,"tag":1034,"props":4156,"children":4157},{"style":1040},[4158],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4160,"children":4161},{"style":1046},[4162],{"type":998,"value":4163}," end_date ",{"type":993,"tag":1034,"props":4165,"children":4166},{"style":1040},[4167],{"type":998,"value":1272},{"type":993,"tag":1034,"props":4169,"children":4170},{"style":1046},[4171],{"type":998,"value":4172}," start_date\n",{"type":993,"tag":1034,"props":4174,"children":4175},{"class":1036,"line":247},[4176],{"type":993,"tag":1034,"props":4177,"children":4178},{"emptyLinePlaceholder":13},[4179],{"type":998,"value":1057},{"type":993,"tag":1034,"props":4181,"children":4182},{"class":1036,"line":256},[4183,4187,4191,4195,4200,4204,4209,4213,4217],{"type":993,"tag":1034,"props":4184,"children":4185},{"style":1090},[4186],{"type":998,"value":1093},{"type":993,"tag":1034,"props":4188,"children":4189},{"style":1046},[4190],{"type":998,"value":1098},{"type":993,"tag":1034,"props":4192,"children":4193},{"style":1040},[4194],{"type":998,"value":1103},{"type":993,"tag":1034,"props":4196,"children":4197},{"style":1106},[4198],{"type":998,"value":4199},"\"Days in year: ",{"type":993,"tag":1034,"props":4201,"children":4202},{"style":1090},[4203],{"type":998,"value":1114},{"type":993,"tag":1034,"props":4205,"children":4206},{"style":1046},[4207],{"type":998,"value":4208},"duration.days",{"type":993,"tag":1034,"props":4210,"children":4211},{"style":1090},[4212],{"type":998,"value":1124},{"type":993,"tag":1034,"props":4214,"children":4215},{"style":1106},[4216],{"type":998,"value":1129},{"type":993,"tag":1034,"props":4218,"children":4219},{"style":1046},[4220],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4222,"children":4223},{"class":1036,"line":265},[4224,4228,4232,4236,4241,4245,4250,4255,4260,4264],{"type":993,"tag":1034,"props":4225,"children":4226},{"style":1090},[4227],{"type":998,"value":1093},{"type":993,"tag":1034,"props":4229,"children":4230},{"style":1046},[4231],{"type":998,"value":1098},{"type":993,"tag":1034,"props":4233,"children":4234},{"style":1040},[4235],{"type":998,"value":1103},{"type":993,"tag":1034,"props":4237,"children":4238},{"style":1106},[4239],{"type":998,"value":4240},"\"Weeks in year: ",{"type":993,"tag":1034,"props":4242,"children":4243},{"style":1090},[4244],{"type":998,"value":1114},{"type":993,"tag":1034,"props":4246,"children":4247},{"style":1046},[4248],{"type":998,"value":4249},"duration.days ",{"type":993,"tag":1034,"props":4251,"children":4252},{"style":1040},[4253],{"type":998,"value":4254},"//",{"type":993,"tag":1034,"props":4256,"children":4257},{"style":1090},[4258],{"type":998,"value":4259}," 7}",{"type":993,"tag":1034,"props":4261,"children":4262},{"style":1106},[4263],{"type":998,"value":1129},{"type":993,"tag":1034,"props":4265,"children":4266},{"style":1046},[4267],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4269,"children":4270},{"class":1036,"line":274},[4271],{"type":993,"tag":1034,"props":4272,"children":4273},{"emptyLinePlaceholder":13},[4274],{"type":998,"value":1057},{"type":993,"tag":1034,"props":4276,"children":4277},{"class":1036,"line":284},[4278],{"type":993,"tag":1034,"props":4279,"children":4280},{"style":1063},[4281],{"type":998,"value":4282},"# Complex calculations\n",{"type":993,"tag":1034,"props":4284,"children":4285},{"class":1036,"line":293},[4286,4291,4295,4299,4303,4307,4311,4315,4319,4323,4327,4331,4335],{"type":993,"tag":1034,"props":4287,"children":4288},{"style":1046},[4289],{"type":998,"value":4290},"project_start ",{"type":993,"tag":1034,"props":4292,"children":4293},{"style":1040},[4294],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4296,"children":4297},{"style":1046},[4298],{"type":998,"value":3001},{"type":993,"tag":1034,"props":4300,"children":4301},{"style":1090},[4302],{"type":998,"value":1799},{"type":993,"tag":1034,"props":4304,"children":4305},{"style":1046},[4306],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4308,"children":4309},{"style":1090},[4310],{"type":998,"value":3137},{"type":993,"tag":1034,"props":4312,"children":4313},{"style":1046},[4314],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4316,"children":4317},{"style":1090},[4318],{"type":998,"value":1808},{"type":993,"tag":1034,"props":4320,"children":4321},{"style":1046},[4322],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4324,"children":4325},{"style":1090},[4326],{"type":998,"value":2313},{"type":993,"tag":1034,"props":4328,"children":4329},{"style":1046},[4330],{"type":998,"value":1176},{"type":993,"tag":1034,"props":4332,"children":4333},{"style":1090},[4334],{"type":998,"value":2331},{"type":993,"tag":1034,"props":4336,"children":4337},{"style":1046},[4338],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4340,"children":4341},{"class":1036,"line":302},[4342,4347,4351,4356,4361,4366],{"type":993,"tag":1034,"props":4343,"children":4344},{"style":1046},[4345],{"type":998,"value":4346},"work_days ",{"type":993,"tag":1034,"props":4348,"children":4349},{"style":1040},[4350],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4352,"children":4353},{"style":1090},[4354],{"type":998,"value":4355}," 5",{"type":993,"tag":1034,"props":4357,"children":4358},{"style":1040},[4359],{"type":998,"value":4360}," *",{"type":993,"tag":1034,"props":4362,"children":4363},{"style":1090},[4364],{"type":998,"value":4365}," 8",{"type":993,"tag":1034,"props":4367,"children":4368},{"style":1063},[4369],{"type":998,"value":4370},"  # 5 days × 8 hours\n",{"type":993,"tag":1034,"props":4372,"children":4373},{"class":1036,"line":311},[4374,4379,4383,4387,4391,4395],{"type":993,"tag":1034,"props":4375,"children":4376},{"style":1046},[4377],{"type":998,"value":4378},"project_hours ",{"type":993,"tag":1034,"props":4380,"children":4381},{"style":1040},[4382],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4384,"children":4385},{"style":1046},[4386],{"type":998,"value":3578},{"type":993,"tag":1034,"props":4388,"children":4389},{"style":3581},[4390],{"type":998,"value":3650},{"type":993,"tag":1034,"props":4392,"children":4393},{"style":1040},[4394],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4396,"children":4397},{"style":1046},[4398],{"type":998,"value":4399},"work_days)\n",{"type":993,"tag":1034,"props":4401,"children":4402},{"class":1036,"line":320},[4403,4408,4412,4417,4421],{"type":993,"tag":1034,"props":4404,"children":4405},{"style":1046},[4406],{"type":998,"value":4407},"project_end ",{"type":993,"tag":1034,"props":4409,"children":4410},{"style":1040},[4411],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4413,"children":4414},{"style":1046},[4415],{"type":998,"value":4416}," project_start ",{"type":993,"tag":1034,"props":4418,"children":4419},{"style":1040},[4420],{"type":998,"value":3877},{"type":993,"tag":1034,"props":4422,"children":4423},{"style":1046},[4424],{"type":998,"value":4425}," project_hours\n",{"type":993,"tag":1034,"props":4427,"children":4428},{"class":1036,"line":329},[4429],{"type":993,"tag":1034,"props":4430,"children":4431},{"emptyLinePlaceholder":13},[4432],{"type":998,"value":1057},{"type":993,"tag":1034,"props":4434,"children":4435},{"class":1036,"line":338},[4436,4440,4444,4448,4453,4457,4462,4466,4470],{"type":993,"tag":1034,"props":4437,"children":4438},{"style":1090},[4439],{"type":998,"value":1093},{"type":993,"tag":1034,"props":4441,"children":4442},{"style":1046},[4443],{"type":998,"value":1098},{"type":993,"tag":1034,"props":4445,"children":4446},{"style":1040},[4447],{"type":998,"value":1103},{"type":993,"tag":1034,"props":4449,"children":4450},{"style":1106},[4451],{"type":998,"value":4452},"\"Project start: ",{"type":993,"tag":1034,"props":4454,"children":4455},{"style":1090},[4456],{"type":998,"value":1114},{"type":993,"tag":1034,"props":4458,"children":4459},{"style":1046},[4460],{"type":998,"value":4461},"project_start",{"type":993,"tag":1034,"props":4463,"children":4464},{"style":1090},[4465],{"type":998,"value":1124},{"type":993,"tag":1034,"props":4467,"children":4468},{"style":1106},[4469],{"type":998,"value":1129},{"type":993,"tag":1034,"props":4471,"children":4472},{"style":1046},[4473],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4475,"children":4476},{"class":1036,"line":347},[4477,4481,4485,4489,4494,4498,4503,4507,4511],{"type":993,"tag":1034,"props":4478,"children":4479},{"style":1090},[4480],{"type":998,"value":1093},{"type":993,"tag":1034,"props":4482,"children":4483},{"style":1046},[4484],{"type":998,"value":1098},{"type":993,"tag":1034,"props":4486,"children":4487},{"style":1040},[4488],{"type":998,"value":1103},{"type":993,"tag":1034,"props":4490,"children":4491},{"style":1106},[4492],{"type":998,"value":4493},"\"Project end: ",{"type":993,"tag":1034,"props":4495,"children":4496},{"style":1090},[4497],{"type":998,"value":1114},{"type":993,"tag":1034,"props":4499,"children":4500},{"style":1046},[4501],{"type":998,"value":4502},"project_end",{"type":993,"tag":1034,"props":4504,"children":4505},{"style":1090},[4506],{"type":998,"value":1124},{"type":993,"tag":1034,"props":4508,"children":4509},{"style":1106},[4510],{"type":998,"value":1129},{"type":993,"tag":1034,"props":4512,"children":4513},{"style":1046},[4514],{"type":998,"value":1134},{"type":993,"tag":1662,"props":4516,"children":4518},{"id":4517},"business-date-calculations",[4519],{"type":998,"value":4520},"Business Date Calculations",{"type":993,"tag":1001,"props":4522,"children":4523},{},[4524],{"type":998,"value":4525},"Real-world applications often need to calculate business days, handle holidays, and work with recurring schedules.",{"type":993,"tag":1021,"props":4527,"children":4528},{},[4529],{"type":993,"tag":1025,"props":4530,"children":4532},{"className":1027,"code":4531,"language":6,"meta":8,"style":8},"import datetime\n\ndef add_business_days(start_date, business_days):\n    \"\"\"Add business days (excluding weekends) to a date\"\"\"\n    current_date = start_date\n    days_added = 0\n    \n    while days_added \u003C business_days:\n        current_date += datetime.timedelta(days=1)\n        # Monday = 0, Sunday = 6\n        if current_date.weekday() \u003C 5:  # Monday through Friday\n            days_added += 1\n    \n    return current_date\n\ndef calculate_age(birth_date, current_date=None):\n    \"\"\"Calculate age in years, months, and days\"\"\"\n    if current_date is None:\n        current_date = datetime.date.today()\n    \n    years = current_date.year - birth_date.year\n    months = current_date.month - birth_date.month\n    days = current_date.day - birth_date.day\n    \n    # Adjust for negative days\n    if days \u003C 0:\n        months -= 1\n        # Get days in previous month\n        if current_date.month == 1:\n            prev_month_last = datetime.date(current_date.year - 1, 12, 31)\n        else:\n            prev_month_last = datetime.date(current_date.year, current_date.month - 1, 1) + datetime.timedelta(days=31)\n            prev_month_last = prev_month_last.replace(day=1) - datetime.timedelta(days=1)\n        days += prev_month_last.day\n    \n    # Adjust for negative months\n    if months \u003C 0:\n        years -= 1\n        months += 12\n    \n    return {\"years\": years, \"months\": months, \"days\": days}\n\n# Business calculations\nstart = datetime.date(2024, 1, 15)  # Monday\nbusiness_deadline = add_business_days(start, 10)\nprint(f\"10 business days from {start}: {business_deadline}\")\n\n# Age calculation\nbirth = datetime.date(1990, 5, 15)\nage = calculate_age(birth)\nprint(f\"Age: {age['years']} years, {age['months']} months, {age['days']} days\")\n",[4533],{"type":993,"tag":1007,"props":4534,"children":4535},{"__ignoreMap":8},[4536,4547,4554,4573,4581,4597,4614,4622,4645,4678,4686,4717,4734,4741,4754,4761,4792,4800,4827,4842,4849,4875,4901,4927,4934,4942,4967,4984,4992,5017,5062,5074,5135,5192,5209,5216,5224,5248,5264,5280,5287,5329,5336,5344,5389,5415,5474,5481,5489,5529,5546],{"type":993,"tag":1034,"props":4537,"children":4538},{"class":1036,"line":12},[4539,4543],{"type":993,"tag":1034,"props":4540,"children":4541},{"style":1040},[4542],{"type":998,"value":1043},{"type":993,"tag":1034,"props":4544,"children":4545},{"style":1046},[4546],{"type":998,"value":1049},{"type":993,"tag":1034,"props":4548,"children":4549},{"class":1036,"line":27},[4550],{"type":993,"tag":1034,"props":4551,"children":4552},{"emptyLinePlaceholder":13},[4553],{"type":998,"value":1057},{"type":993,"tag":1034,"props":4555,"children":4556},{"class":1036,"line":36},[4557,4562,4568],{"type":993,"tag":1034,"props":4558,"children":4559},{"style":1040},[4560],{"type":998,"value":4561},"def",{"type":993,"tag":1034,"props":4563,"children":4565},{"style":4564},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[4566],{"type":998,"value":4567}," add_business_days",{"type":993,"tag":1034,"props":4569,"children":4570},{"style":1046},[4571],{"type":998,"value":4572},"(start_date, business_days):\n",{"type":993,"tag":1034,"props":4574,"children":4575},{"class":1036,"line":45},[4576],{"type":993,"tag":1034,"props":4577,"children":4578},{"style":1106},[4579],{"type":998,"value":4580},"    \"\"\"Add business days (excluding weekends) to a date\"\"\"\n",{"type":993,"tag":1034,"props":4582,"children":4583},{"class":1036,"line":54},[4584,4589,4593],{"type":993,"tag":1034,"props":4585,"children":4586},{"style":1046},[4587],{"type":998,"value":4588},"    current_date ",{"type":993,"tag":1034,"props":4590,"children":4591},{"style":1040},[4592],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4594,"children":4595},{"style":1046},[4596],{"type":998,"value":4172},{"type":993,"tag":1034,"props":4598,"children":4599},{"class":1036,"line":63},[4600,4605,4609],{"type":993,"tag":1034,"props":4601,"children":4602},{"style":1046},[4603],{"type":998,"value":4604},"    days_added ",{"type":993,"tag":1034,"props":4606,"children":4607},{"style":1040},[4608],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4610,"children":4611},{"style":1090},[4612],{"type":998,"value":4613}," 0\n",{"type":993,"tag":1034,"props":4615,"children":4616},{"class":1036,"line":72},[4617],{"type":993,"tag":1034,"props":4618,"children":4619},{"style":1046},[4620],{"type":998,"value":4621},"    \n",{"type":993,"tag":1034,"props":4623,"children":4624},{"class":1036,"line":81},[4625,4630,4635,4640],{"type":993,"tag":1034,"props":4626,"children":4627},{"style":1040},[4628],{"type":998,"value":4629},"    while",{"type":993,"tag":1034,"props":4631,"children":4632},{"style":1046},[4633],{"type":998,"value":4634}," days_added ",{"type":993,"tag":1034,"props":4636,"children":4637},{"style":1040},[4638],{"type":998,"value":4639},"\u003C",{"type":993,"tag":1034,"props":4641,"children":4642},{"style":1046},[4643],{"type":998,"value":4644}," business_days:\n",{"type":993,"tag":1034,"props":4646,"children":4647},{"class":1036,"line":91},[4648,4653,4658,4662,4666,4670,4674],{"type":993,"tag":1034,"props":4649,"children":4650},{"style":1046},[4651],{"type":998,"value":4652},"        current_date ",{"type":993,"tag":1034,"props":4654,"children":4655},{"style":1040},[4656],{"type":998,"value":4657},"+=",{"type":993,"tag":1034,"props":4659,"children":4660},{"style":1046},[4661],{"type":998,"value":3578},{"type":993,"tag":1034,"props":4663,"children":4664},{"style":3581},[4665],{"type":998,"value":3617},{"type":993,"tag":1034,"props":4667,"children":4668},{"style":1040},[4669],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4671,"children":4672},{"style":1090},[4673],{"type":998,"value":1808},{"type":993,"tag":1034,"props":4675,"children":4676},{"style":1046},[4677],{"type":998,"value":1134},{"type":993,"tag":1034,"props":4679,"children":4680},{"class":1036,"line":100},[4681],{"type":993,"tag":1034,"props":4682,"children":4683},{"style":1063},[4684],{"type":998,"value":4685},"        # Monday = 0, Sunday = 6\n",{"type":993,"tag":1034,"props":4687,"children":4688},{"class":1036,"line":109},[4689,4694,4699,4703,4707,4712],{"type":993,"tag":1034,"props":4690,"children":4691},{"style":1040},[4692],{"type":998,"value":4693},"        if",{"type":993,"tag":1034,"props":4695,"children":4696},{"style":1046},[4697],{"type":998,"value":4698}," current_date.weekday() ",{"type":993,"tag":1034,"props":4700,"children":4701},{"style":1040},[4702],{"type":998,"value":4639},{"type":993,"tag":1034,"props":4704,"children":4705},{"style":1090},[4706],{"type":998,"value":4355},{"type":993,"tag":1034,"props":4708,"children":4709},{"style":1046},[4710],{"type":998,"value":4711},":  ",{"type":993,"tag":1034,"props":4713,"children":4714},{"style":1063},[4715],{"type":998,"value":4716},"# Monday through Friday\n",{"type":993,"tag":1034,"props":4718,"children":4719},{"class":1036,"line":118},[4720,4725,4729],{"type":993,"tag":1034,"props":4721,"children":4722},{"style":1046},[4723],{"type":998,"value":4724},"            days_added ",{"type":993,"tag":1034,"props":4726,"children":4727},{"style":1040},[4728],{"type":998,"value":4657},{"type":993,"tag":1034,"props":4730,"children":4731},{"style":1090},[4732],{"type":998,"value":4733}," 1\n",{"type":993,"tag":1034,"props":4735,"children":4736},{"class":1036,"line":127},[4737],{"type":993,"tag":1034,"props":4738,"children":4739},{"style":1046},[4740],{"type":998,"value":4621},{"type":993,"tag":1034,"props":4742,"children":4743},{"class":1036,"line":136},[4744,4749],{"type":993,"tag":1034,"props":4745,"children":4746},{"style":1040},[4747],{"type":998,"value":4748},"    return",{"type":993,"tag":1034,"props":4750,"children":4751},{"style":1046},[4752],{"type":998,"value":4753}," current_date\n",{"type":993,"tag":1034,"props":4755,"children":4756},{"class":1036,"line":146},[4757],{"type":993,"tag":1034,"props":4758,"children":4759},{"emptyLinePlaceholder":13},[4760],{"type":998,"value":1057},{"type":993,"tag":1034,"props":4762,"children":4763},{"class":1036,"line":155},[4764,4768,4773,4778,4782,4787],{"type":993,"tag":1034,"props":4765,"children":4766},{"style":1040},[4767],{"type":998,"value":4561},{"type":993,"tag":1034,"props":4769,"children":4770},{"style":4564},[4771],{"type":998,"value":4772}," calculate_age",{"type":993,"tag":1034,"props":4774,"children":4775},{"style":1046},[4776],{"type":998,"value":4777},"(birth_date, current_date",{"type":993,"tag":1034,"props":4779,"children":4780},{"style":1040},[4781],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4783,"children":4784},{"style":1090},[4785],{"type":998,"value":4786},"None",{"type":993,"tag":1034,"props":4788,"children":4789},{"style":1046},[4790],{"type":998,"value":4791},"):\n",{"type":993,"tag":1034,"props":4793,"children":4794},{"class":1036,"line":164},[4795],{"type":993,"tag":1034,"props":4796,"children":4797},{"style":1106},[4798],{"type":998,"value":4799},"    \"\"\"Calculate age in years, months, and days\"\"\"\n",{"type":993,"tag":1034,"props":4801,"children":4802},{"class":1036,"line":173},[4803,4808,4813,4818,4823],{"type":993,"tag":1034,"props":4804,"children":4805},{"style":1040},[4806],{"type":998,"value":4807},"    if",{"type":993,"tag":1034,"props":4809,"children":4810},{"style":1046},[4811],{"type":998,"value":4812}," current_date ",{"type":993,"tag":1034,"props":4814,"children":4815},{"style":1040},[4816],{"type":998,"value":4817},"is",{"type":993,"tag":1034,"props":4819,"children":4820},{"style":1090},[4821],{"type":998,"value":4822}," None",{"type":993,"tag":1034,"props":4824,"children":4825},{"style":1046},[4826],{"type":998,"value":2847},{"type":993,"tag":1034,"props":4828,"children":4829},{"class":1036,"line":182},[4830,4834,4838],{"type":993,"tag":1034,"props":4831,"children":4832},{"style":1046},[4833],{"type":998,"value":4652},{"type":993,"tag":1034,"props":4835,"children":4836},{"style":1040},[4837],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4839,"children":4840},{"style":1046},[4841],{"type":998,"value":1084},{"type":993,"tag":1034,"props":4843,"children":4844},{"class":1036,"line":191},[4845],{"type":993,"tag":1034,"props":4846,"children":4847},{"style":1046},[4848],{"type":998,"value":4621},{"type":993,"tag":1034,"props":4850,"children":4851},{"class":1036,"line":201},[4852,4857,4861,4866,4870],{"type":993,"tag":1034,"props":4853,"children":4854},{"style":1046},[4855],{"type":998,"value":4856},"    years ",{"type":993,"tag":1034,"props":4858,"children":4859},{"style":1040},[4860],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4862,"children":4863},{"style":1046},[4864],{"type":998,"value":4865}," current_date.year ",{"type":993,"tag":1034,"props":4867,"children":4868},{"style":1040},[4869],{"type":998,"value":1272},{"type":993,"tag":1034,"props":4871,"children":4872},{"style":1046},[4873],{"type":998,"value":4874}," birth_date.year\n",{"type":993,"tag":1034,"props":4876,"children":4877},{"class":1036,"line":210},[4878,4883,4887,4892,4896],{"type":993,"tag":1034,"props":4879,"children":4880},{"style":1046},[4881],{"type":998,"value":4882},"    months ",{"type":993,"tag":1034,"props":4884,"children":4885},{"style":1040},[4886],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4888,"children":4889},{"style":1046},[4890],{"type":998,"value":4891}," current_date.month ",{"type":993,"tag":1034,"props":4893,"children":4894},{"style":1040},[4895],{"type":998,"value":1272},{"type":993,"tag":1034,"props":4897,"children":4898},{"style":1046},[4899],{"type":998,"value":4900}," birth_date.month\n",{"type":993,"tag":1034,"props":4902,"children":4903},{"class":1036,"line":219},[4904,4909,4913,4918,4922],{"type":993,"tag":1034,"props":4905,"children":4906},{"style":1046},[4907],{"type":998,"value":4908},"    days ",{"type":993,"tag":1034,"props":4910,"children":4911},{"style":1040},[4912],{"type":998,"value":1079},{"type":993,"tag":1034,"props":4914,"children":4915},{"style":1046},[4916],{"type":998,"value":4917}," current_date.day ",{"type":993,"tag":1034,"props":4919,"children":4920},{"style":1040},[4921],{"type":998,"value":1272},{"type":993,"tag":1034,"props":4923,"children":4924},{"style":1046},[4925],{"type":998,"value":4926}," birth_date.day\n",{"type":993,"tag":1034,"props":4928,"children":4929},{"class":1036,"line":228},[4930],{"type":993,"tag":1034,"props":4931,"children":4932},{"style":1046},[4933],{"type":998,"value":4621},{"type":993,"tag":1034,"props":4935,"children":4936},{"class":1036,"line":238},[4937],{"type":993,"tag":1034,"props":4938,"children":4939},{"style":1063},[4940],{"type":998,"value":4941},"    # Adjust for negative days\n",{"type":993,"tag":1034,"props":4943,"children":4944},{"class":1036,"line":247},[4945,4949,4954,4958,4963],{"type":993,"tag":1034,"props":4946,"children":4947},{"style":1040},[4948],{"type":998,"value":4807},{"type":993,"tag":1034,"props":4950,"children":4951},{"style":1046},[4952],{"type":998,"value":4953}," days ",{"type":993,"tag":1034,"props":4955,"children":4956},{"style":1040},[4957],{"type":998,"value":4639},{"type":993,"tag":1034,"props":4959,"children":4960},{"style":1090},[4961],{"type":998,"value":4962}," 0",{"type":993,"tag":1034,"props":4964,"children":4965},{"style":1046},[4966],{"type":998,"value":2847},{"type":993,"tag":1034,"props":4968,"children":4969},{"class":1036,"line":256},[4970,4975,4980],{"type":993,"tag":1034,"props":4971,"children":4972},{"style":1046},[4973],{"type":998,"value":4974},"        months ",{"type":993,"tag":1034,"props":4976,"children":4977},{"style":1040},[4978],{"type":998,"value":4979},"-=",{"type":993,"tag":1034,"props":4981,"children":4982},{"style":1090},[4983],{"type":998,"value":4733},{"type":993,"tag":1034,"props":4985,"children":4986},{"class":1036,"line":265},[4987],{"type":993,"tag":1034,"props":4988,"children":4989},{"style":1063},[4990],{"type":998,"value":4991},"        # Get days in previous month\n",{"type":993,"tag":1034,"props":4993,"children":4994},{"class":1036,"line":274},[4995,4999,5003,5008,5013],{"type":993,"tag":1034,"props":4996,"children":4997},{"style":1040},[4998],{"type":998,"value":4693},{"type":993,"tag":1034,"props":5000,"children":5001},{"style":1046},[5002],{"type":998,"value":4891},{"type":993,"tag":1034,"props":5004,"children":5005},{"style":1040},[5006],{"type":998,"value":5007},"==",{"type":993,"tag":1034,"props":5009,"children":5010},{"style":1090},[5011],{"type":998,"value":5012}," 1",{"type":993,"tag":1034,"props":5014,"children":5015},{"style":1046},[5016],{"type":998,"value":2847},{"type":993,"tag":1034,"props":5018,"children":5019},{"class":1036,"line":284},[5020,5025,5029,5034,5038,5042,5046,5050,5054,5058],{"type":993,"tag":1034,"props":5021,"children":5022},{"style":1046},[5023],{"type":998,"value":5024},"            prev_month_last ",{"type":993,"tag":1034,"props":5026,"children":5027},{"style":1040},[5028],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5030,"children":5031},{"style":1046},[5032],{"type":998,"value":5033}," datetime.date(current_date.year ",{"type":993,"tag":1034,"props":5035,"children":5036},{"style":1040},[5037],{"type":998,"value":1272},{"type":993,"tag":1034,"props":5039,"children":5040},{"style":1090},[5041],{"type":998,"value":5012},{"type":993,"tag":1034,"props":5043,"children":5044},{"style":1046},[5045],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5047,"children":5048},{"style":1090},[5049],{"type":998,"value":2361},{"type":993,"tag":1034,"props":5051,"children":5052},{"style":1046},[5053],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5055,"children":5056},{"style":1090},[5057],{"type":998,"value":4142},{"type":993,"tag":1034,"props":5059,"children":5060},{"style":1046},[5061],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5063,"children":5064},{"class":1036,"line":293},[5065,5070],{"type":993,"tag":1034,"props":5066,"children":5067},{"style":1040},[5068],{"type":998,"value":5069},"        else",{"type":993,"tag":1034,"props":5071,"children":5072},{"style":1046},[5073],{"type":998,"value":2847},{"type":993,"tag":1034,"props":5075,"children":5076},{"class":1036,"line":302},[5077,5081,5085,5090,5094,5098,5102,5106,5111,5115,5119,5123,5127,5131],{"type":993,"tag":1034,"props":5078,"children":5079},{"style":1046},[5080],{"type":998,"value":5024},{"type":993,"tag":1034,"props":5082,"children":5083},{"style":1040},[5084],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5086,"children":5087},{"style":1046},[5088],{"type":998,"value":5089}," datetime.date(current_date.year, current_date.month ",{"type":993,"tag":1034,"props":5091,"children":5092},{"style":1040},[5093],{"type":998,"value":1272},{"type":993,"tag":1034,"props":5095,"children":5096},{"style":1090},[5097],{"type":998,"value":5012},{"type":993,"tag":1034,"props":5099,"children":5100},{"style":1046},[5101],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5103,"children":5104},{"style":1090},[5105],{"type":998,"value":1808},{"type":993,"tag":1034,"props":5107,"children":5108},{"style":1046},[5109],{"type":998,"value":5110},") ",{"type":993,"tag":1034,"props":5112,"children":5113},{"style":1040},[5114],{"type":998,"value":3877},{"type":993,"tag":1034,"props":5116,"children":5117},{"style":1046},[5118],{"type":998,"value":3578},{"type":993,"tag":1034,"props":5120,"children":5121},{"style":3581},[5122],{"type":998,"value":3617},{"type":993,"tag":1034,"props":5124,"children":5125},{"style":1040},[5126],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5128,"children":5129},{"style":1090},[5130],{"type":998,"value":4142},{"type":993,"tag":1034,"props":5132,"children":5133},{"style":1046},[5134],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5136,"children":5137},{"class":1036,"line":311},[5138,5142,5146,5151,5156,5160,5164,5168,5172,5176,5180,5184,5188],{"type":993,"tag":1034,"props":5139,"children":5140},{"style":1046},[5141],{"type":998,"value":5024},{"type":993,"tag":1034,"props":5143,"children":5144},{"style":1040},[5145],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5147,"children":5148},{"style":1046},[5149],{"type":998,"value":5150}," prev_month_last.replace(",{"type":993,"tag":1034,"props":5152,"children":5153},{"style":3581},[5154],{"type":998,"value":5155},"day",{"type":993,"tag":1034,"props":5157,"children":5158},{"style":1040},[5159],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5161,"children":5162},{"style":1090},[5163],{"type":998,"value":1808},{"type":993,"tag":1034,"props":5165,"children":5166},{"style":1046},[5167],{"type":998,"value":5110},{"type":993,"tag":1034,"props":5169,"children":5170},{"style":1040},[5171],{"type":998,"value":1272},{"type":993,"tag":1034,"props":5173,"children":5174},{"style":1046},[5175],{"type":998,"value":3578},{"type":993,"tag":1034,"props":5177,"children":5178},{"style":3581},[5179],{"type":998,"value":3617},{"type":993,"tag":1034,"props":5181,"children":5182},{"style":1040},[5183],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5185,"children":5186},{"style":1090},[5187],{"type":998,"value":1808},{"type":993,"tag":1034,"props":5189,"children":5190},{"style":1046},[5191],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5193,"children":5194},{"class":1036,"line":320},[5195,5200,5204],{"type":993,"tag":1034,"props":5196,"children":5197},{"style":1046},[5198],{"type":998,"value":5199},"        days ",{"type":993,"tag":1034,"props":5201,"children":5202},{"style":1040},[5203],{"type":998,"value":4657},{"type":993,"tag":1034,"props":5205,"children":5206},{"style":1046},[5207],{"type":998,"value":5208}," prev_month_last.day\n",{"type":993,"tag":1034,"props":5210,"children":5211},{"class":1036,"line":329},[5212],{"type":993,"tag":1034,"props":5213,"children":5214},{"style":1046},[5215],{"type":998,"value":4621},{"type":993,"tag":1034,"props":5217,"children":5218},{"class":1036,"line":338},[5219],{"type":993,"tag":1034,"props":5220,"children":5221},{"style":1063},[5222],{"type":998,"value":5223},"    # Adjust for negative months\n",{"type":993,"tag":1034,"props":5225,"children":5226},{"class":1036,"line":347},[5227,5231,5236,5240,5244],{"type":993,"tag":1034,"props":5228,"children":5229},{"style":1040},[5230],{"type":998,"value":4807},{"type":993,"tag":1034,"props":5232,"children":5233},{"style":1046},[5234],{"type":998,"value":5235}," months ",{"type":993,"tag":1034,"props":5237,"children":5238},{"style":1040},[5239],{"type":998,"value":4639},{"type":993,"tag":1034,"props":5241,"children":5242},{"style":1090},[5243],{"type":998,"value":4962},{"type":993,"tag":1034,"props":5245,"children":5246},{"style":1046},[5247],{"type":998,"value":2847},{"type":993,"tag":1034,"props":5249,"children":5250},{"class":1036,"line":356},[5251,5256,5260],{"type":993,"tag":1034,"props":5252,"children":5253},{"style":1046},[5254],{"type":998,"value":5255},"        years ",{"type":993,"tag":1034,"props":5257,"children":5258},{"style":1040},[5259],{"type":998,"value":4979},{"type":993,"tag":1034,"props":5261,"children":5262},{"style":1090},[5263],{"type":998,"value":4733},{"type":993,"tag":1034,"props":5265,"children":5266},{"class":1036,"line":365},[5267,5271,5275],{"type":993,"tag":1034,"props":5268,"children":5269},{"style":1046},[5270],{"type":998,"value":4974},{"type":993,"tag":1034,"props":5272,"children":5273},{"style":1040},[5274],{"type":998,"value":4657},{"type":993,"tag":1034,"props":5276,"children":5277},{"style":1090},[5278],{"type":998,"value":5279}," 12\n",{"type":993,"tag":1034,"props":5281,"children":5282},{"class":1036,"line":374},[5283],{"type":993,"tag":1034,"props":5284,"children":5285},{"style":1046},[5286],{"type":998,"value":4621},{"type":993,"tag":1034,"props":5288,"children":5289},{"class":1036,"line":384},[5290,5294,5299,5304,5309,5314,5319,5324],{"type":993,"tag":1034,"props":5291,"children":5292},{"style":1040},[5293],{"type":998,"value":4748},{"type":993,"tag":1034,"props":5295,"children":5296},{"style":1046},[5297],{"type":998,"value":5298}," {",{"type":993,"tag":1034,"props":5300,"children":5301},{"style":1106},[5302],{"type":998,"value":5303},"\"years\"",{"type":993,"tag":1034,"props":5305,"children":5306},{"style":1046},[5307],{"type":998,"value":5308},": years, ",{"type":993,"tag":1034,"props":5310,"children":5311},{"style":1106},[5312],{"type":998,"value":5313},"\"months\"",{"type":993,"tag":1034,"props":5315,"children":5316},{"style":1046},[5317],{"type":998,"value":5318},": months, ",{"type":993,"tag":1034,"props":5320,"children":5321},{"style":1106},[5322],{"type":998,"value":5323},"\"days\"",{"type":993,"tag":1034,"props":5325,"children":5326},{"style":1046},[5327],{"type":998,"value":5328},": days}\n",{"type":993,"tag":1034,"props":5330,"children":5331},{"class":1036,"line":393},[5332],{"type":993,"tag":1034,"props":5333,"children":5334},{"emptyLinePlaceholder":13},[5335],{"type":998,"value":1057},{"type":993,"tag":1034,"props":5337,"children":5338},{"class":1036,"line":402},[5339],{"type":993,"tag":1034,"props":5340,"children":5341},{"style":1063},[5342],{"type":998,"value":5343},"# Business calculations\n",{"type":993,"tag":1034,"props":5345,"children":5346},{"class":1036,"line":411},[5347,5352,5356,5360,5364,5368,5372,5376,5380,5384],{"type":993,"tag":1034,"props":5348,"children":5349},{"style":1046},[5350],{"type":998,"value":5351},"start ",{"type":993,"tag":1034,"props":5353,"children":5354},{"style":1040},[5355],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5357,"children":5358},{"style":1046},[5359],{"type":998,"value":1166},{"type":993,"tag":1034,"props":5361,"children":5362},{"style":1090},[5363],{"type":998,"value":1799},{"type":993,"tag":1034,"props":5365,"children":5366},{"style":1046},[5367],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5369,"children":5370},{"style":1090},[5371],{"type":998,"value":1808},{"type":993,"tag":1034,"props":5373,"children":5374},{"style":1046},[5375],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5377,"children":5378},{"style":1090},[5379],{"type":998,"value":1190},{"type":993,"tag":1034,"props":5381,"children":5382},{"style":1046},[5383],{"type":998,"value":2131},{"type":993,"tag":1034,"props":5385,"children":5386},{"style":1063},[5387],{"type":998,"value":5388},"# Monday\n",{"type":993,"tag":1034,"props":5390,"children":5391},{"class":1036,"line":420},[5392,5397,5401,5406,5411],{"type":993,"tag":1034,"props":5393,"children":5394},{"style":1046},[5395],{"type":998,"value":5396},"business_deadline ",{"type":993,"tag":1034,"props":5398,"children":5399},{"style":1040},[5400],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5402,"children":5403},{"style":1046},[5404],{"type":998,"value":5405}," add_business_days(start, ",{"type":993,"tag":1034,"props":5407,"children":5408},{"style":1090},[5409],{"type":998,"value":5410},"10",{"type":993,"tag":1034,"props":5412,"children":5413},{"style":1046},[5414],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5416,"children":5417},{"class":1036,"line":429},[5418,5422,5426,5430,5435,5439,5444,5448,5453,5457,5462,5466,5470],{"type":993,"tag":1034,"props":5419,"children":5420},{"style":1090},[5421],{"type":998,"value":1093},{"type":993,"tag":1034,"props":5423,"children":5424},{"style":1046},[5425],{"type":998,"value":1098},{"type":993,"tag":1034,"props":5427,"children":5428},{"style":1040},[5429],{"type":998,"value":1103},{"type":993,"tag":1034,"props":5431,"children":5432},{"style":1106},[5433],{"type":998,"value":5434},"\"10 business days from ",{"type":993,"tag":1034,"props":5436,"children":5437},{"style":1090},[5438],{"type":998,"value":1114},{"type":993,"tag":1034,"props":5440,"children":5441},{"style":1046},[5442],{"type":998,"value":5443},"start",{"type":993,"tag":1034,"props":5445,"children":5446},{"style":1090},[5447],{"type":998,"value":1124},{"type":993,"tag":1034,"props":5449,"children":5450},{"style":1106},[5451],{"type":998,"value":5452},": ",{"type":993,"tag":1034,"props":5454,"children":5455},{"style":1090},[5456],{"type":998,"value":1114},{"type":993,"tag":1034,"props":5458,"children":5459},{"style":1046},[5460],{"type":998,"value":5461},"business_deadline",{"type":993,"tag":1034,"props":5463,"children":5464},{"style":1090},[5465],{"type":998,"value":1124},{"type":993,"tag":1034,"props":5467,"children":5468},{"style":1106},[5469],{"type":998,"value":1129},{"type":993,"tag":1034,"props":5471,"children":5472},{"style":1046},[5473],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5475,"children":5476},{"class":1036,"line":438},[5477],{"type":993,"tag":1034,"props":5478,"children":5479},{"emptyLinePlaceholder":13},[5480],{"type":998,"value":1057},{"type":993,"tag":1034,"props":5482,"children":5483},{"class":1036,"line":447},[5484],{"type":993,"tag":1034,"props":5485,"children":5486},{"style":1063},[5487],{"type":998,"value":5488},"# Age calculation\n",{"type":993,"tag":1034,"props":5490,"children":5491},{"class":1036,"line":457},[5492,5497,5501,5505,5509,5513,5517,5521,5525],{"type":993,"tag":1034,"props":5493,"children":5494},{"style":1046},[5495],{"type":998,"value":5496},"birth ",{"type":993,"tag":1034,"props":5498,"children":5499},{"style":1040},[5500],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5502,"children":5503},{"style":1046},[5504],{"type":998,"value":1166},{"type":993,"tag":1034,"props":5506,"children":5507},{"style":1090},[5508],{"type":998,"value":1171},{"type":993,"tag":1034,"props":5510,"children":5511},{"style":1046},[5512],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5514,"children":5515},{"style":1090},[5516],{"type":998,"value":1181},{"type":993,"tag":1034,"props":5518,"children":5519},{"style":1046},[5520],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5522,"children":5523},{"style":1090},[5524],{"type":998,"value":1190},{"type":993,"tag":1034,"props":5526,"children":5527},{"style":1046},[5528],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5530,"children":5531},{"class":1036,"line":466},[5532,5537,5541],{"type":993,"tag":1034,"props":5533,"children":5534},{"style":1046},[5535],{"type":998,"value":5536},"age ",{"type":993,"tag":1034,"props":5538,"children":5539},{"style":1040},[5540],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5542,"children":5543},{"style":1046},[5544],{"type":998,"value":5545}," calculate_age(birth)\n",{"type":993,"tag":1034,"props":5547,"children":5548},{"class":1036,"line":475},[5549,5553,5557,5561,5566,5570,5575,5580,5585,5589,5594,5598,5602,5607,5611,5615,5620,5624,5628,5633,5637,5641,5646],{"type":993,"tag":1034,"props":5550,"children":5551},{"style":1090},[5552],{"type":998,"value":1093},{"type":993,"tag":1034,"props":5554,"children":5555},{"style":1046},[5556],{"type":998,"value":1098},{"type":993,"tag":1034,"props":5558,"children":5559},{"style":1040},[5560],{"type":998,"value":1103},{"type":993,"tag":1034,"props":5562,"children":5563},{"style":1106},[5564],{"type":998,"value":5565},"\"Age: ",{"type":993,"tag":1034,"props":5567,"children":5568},{"style":1090},[5569],{"type":998,"value":1114},{"type":993,"tag":1034,"props":5571,"children":5572},{"style":1046},[5573],{"type":998,"value":5574},"age[",{"type":993,"tag":1034,"props":5576,"children":5577},{"style":1106},[5578],{"type":998,"value":5579},"'years'",{"type":993,"tag":1034,"props":5581,"children":5582},{"style":1046},[5583],{"type":998,"value":5584},"]",{"type":993,"tag":1034,"props":5586,"children":5587},{"style":1090},[5588],{"type":998,"value":1124},{"type":993,"tag":1034,"props":5590,"children":5591},{"style":1106},[5592],{"type":998,"value":5593}," years, ",{"type":993,"tag":1034,"props":5595,"children":5596},{"style":1090},[5597],{"type":998,"value":1114},{"type":993,"tag":1034,"props":5599,"children":5600},{"style":1046},[5601],{"type":998,"value":5574},{"type":993,"tag":1034,"props":5603,"children":5604},{"style":1106},[5605],{"type":998,"value":5606},"'months'",{"type":993,"tag":1034,"props":5608,"children":5609},{"style":1046},[5610],{"type":998,"value":5584},{"type":993,"tag":1034,"props":5612,"children":5613},{"style":1090},[5614],{"type":998,"value":1124},{"type":993,"tag":1034,"props":5616,"children":5617},{"style":1106},[5618],{"type":998,"value":5619}," months, ",{"type":993,"tag":1034,"props":5621,"children":5622},{"style":1090},[5623],{"type":998,"value":1114},{"type":993,"tag":1034,"props":5625,"children":5626},{"style":1046},[5627],{"type":998,"value":5574},{"type":993,"tag":1034,"props":5629,"children":5630},{"style":1106},[5631],{"type":998,"value":5632},"'days'",{"type":993,"tag":1034,"props":5634,"children":5635},{"style":1046},[5636],{"type":998,"value":5584},{"type":993,"tag":1034,"props":5638,"children":5639},{"style":1090},[5640],{"type":998,"value":1124},{"type":993,"tag":1034,"props":5642,"children":5643},{"style":1106},[5644],{"type":998,"value":5645}," days\"",{"type":993,"tag":1034,"props":5647,"children":5648},{"style":1046},[5649],{"type":998,"value":1134},{"type":993,"tag":1485,"props":5651,"children":5653},{"id":5652},"date-formatting-and-parsing",[5654],{"type":998,"value":5655},"🚀 Date Formatting and Parsing",{"type":993,"tag":1001,"props":5657,"children":5658},{},[5659],{"type":998,"value":5660},"Converting between dates and strings is crucial for user interfaces, file processing, and data exchange.",{"type":993,"tag":1662,"props":5662,"children":5664},{"id":5663},"formatting-dates-for-display",[5665],{"type":998,"value":5666},"Formatting Dates for Display",{"type":993,"tag":1001,"props":5668,"children":5669},{},[5670,5672,5678],{"type":998,"value":5671},"Use ",{"type":993,"tag":1007,"props":5673,"children":5675},{"className":5674},[],[5676],{"type":998,"value":5677},"strftime()",{"type":998,"value":5679}," to convert date objects to formatted strings for user-friendly display.",{"type":993,"tag":1021,"props":5681,"children":5682},{},[5683],{"type":993,"tag":1025,"props":5684,"children":5686},{"className":1027,"code":5685,"language":6,"meta":8,"style":8},"import datetime\n\nnow = datetime.datetime.now()\nbirthday = datetime.date(1990, 5, 15)\n\n# Common format patterns\nformats = {\n    \"ISO Format\": now.strftime(\"%Y-%m-%d %H:%M:%S\"),\n    \"US Format\": now.strftime(\"%m/%d/%Y %I:%M %p\"),\n    \"European Format\": now.strftime(\"%d/%m/%Y %H:%M\"),\n    \"Long Format\": now.strftime(\"%A, %B %d, %Y\"),\n    \"Short Format\": now.strftime(\"%a, %b %d\"),\n    \"Time Only\": now.strftime(\"%H:%M:%S\"),\n    \"Date Only\": birthday.strftime(\"%B %d, %Y\")\n}\n\nprint(\"Date Formatting Examples:\")\nfor name, formatted in formats.items():\n    print(f\"{name:15}: {formatted}\")\n\n# Custom business formats\ninvoice_date = now.strftime(\"Invoice Date: %B %d, %Y\")\nlog_timestamp = now.strftime(\"[%Y-%m-%d %H:%M:%S]\")\nfilename_date = now.strftime(\"report_%Y%m%d_%H%M%S.txt\")\n\nprint(f\"\\n{invoice_date}\")\nprint(f\"{log_timestamp} System started\")\nprint(f\"Filename: {filename_date}\")\n",[5687],{"type":993,"tag":1007,"props":5688,"children":5689},{"__ignoreMap":8},[5690,5701,5708,5723,5762,5769,5777,5794,5825,5855,5884,5914,5957,5978,6007,6015,6022,6042,6065,6126,6133,6141,6174,6208,6242,6249,6290,6331],{"type":993,"tag":1034,"props":5691,"children":5692},{"class":1036,"line":12},[5693,5697],{"type":993,"tag":1034,"props":5694,"children":5695},{"style":1040},[5696],{"type":998,"value":1043},{"type":993,"tag":1034,"props":5698,"children":5699},{"style":1046},[5700],{"type":998,"value":1049},{"type":993,"tag":1034,"props":5702,"children":5703},{"class":1036,"line":27},[5704],{"type":993,"tag":1034,"props":5705,"children":5706},{"emptyLinePlaceholder":13},[5707],{"type":998,"value":1057},{"type":993,"tag":1034,"props":5709,"children":5710},{"class":1036,"line":36},[5711,5715,5719],{"type":993,"tag":1034,"props":5712,"children":5713},{"style":1046},[5714],{"type":998,"value":1341},{"type":993,"tag":1034,"props":5716,"children":5717},{"style":1040},[5718],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5720,"children":5721},{"style":1046},[5722],{"type":998,"value":1350},{"type":993,"tag":1034,"props":5724,"children":5725},{"class":1036,"line":45},[5726,5730,5734,5738,5742,5746,5750,5754,5758],{"type":993,"tag":1034,"props":5727,"children":5728},{"style":1046},[5729],{"type":998,"value":1157},{"type":993,"tag":1034,"props":5731,"children":5732},{"style":1040},[5733],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5735,"children":5736},{"style":1046},[5737],{"type":998,"value":1166},{"type":993,"tag":1034,"props":5739,"children":5740},{"style":1090},[5741],{"type":998,"value":1171},{"type":993,"tag":1034,"props":5743,"children":5744},{"style":1046},[5745],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5747,"children":5748},{"style":1090},[5749],{"type":998,"value":1181},{"type":993,"tag":1034,"props":5751,"children":5752},{"style":1046},[5753],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5755,"children":5756},{"style":1090},[5757],{"type":998,"value":1190},{"type":993,"tag":1034,"props":5759,"children":5760},{"style":1046},[5761],{"type":998,"value":1134},{"type":993,"tag":1034,"props":5763,"children":5764},{"class":1036,"line":54},[5765],{"type":993,"tag":1034,"props":5766,"children":5767},{"emptyLinePlaceholder":13},[5768],{"type":998,"value":1057},{"type":993,"tag":1034,"props":5770,"children":5771},{"class":1036,"line":63},[5772],{"type":993,"tag":1034,"props":5773,"children":5774},{"style":1063},[5775],{"type":998,"value":5776},"# Common format patterns\n",{"type":993,"tag":1034,"props":5778,"children":5779},{"class":1036,"line":72},[5780,5785,5789],{"type":993,"tag":1034,"props":5781,"children":5782},{"style":1046},[5783],{"type":998,"value":5784},"formats ",{"type":993,"tag":1034,"props":5786,"children":5787},{"style":1040},[5788],{"type":998,"value":1079},{"type":993,"tag":1034,"props":5790,"children":5791},{"style":1046},[5792],{"type":998,"value":5793}," {\n",{"type":993,"tag":1034,"props":5795,"children":5796},{"class":1036,"line":81},[5797,5802,5807,5811,5815,5820],{"type":993,"tag":1034,"props":5798,"children":5799},{"style":1106},[5800],{"type":998,"value":5801},"    \"ISO Format\"",{"type":993,"tag":1034,"props":5803,"children":5804},{"style":1046},[5805],{"type":998,"value":5806},": now.strftime(",{"type":993,"tag":1034,"props":5808,"children":5809},{"style":1106},[5810],{"type":998,"value":2190},{"type":993,"tag":1034,"props":5812,"children":5813},{"style":1090},[5814],{"type":998,"value":1433},{"type":993,"tag":1034,"props":5816,"children":5817},{"style":1106},[5818],{"type":998,"value":5819}," %H:%M:%S\"",{"type":993,"tag":1034,"props":5821,"children":5822},{"style":1046},[5823],{"type":998,"value":5824},"),\n",{"type":993,"tag":1034,"props":5826,"children":5827},{"class":1036,"line":91},[5828,5833,5837,5842,5846,5851],{"type":993,"tag":1034,"props":5829,"children":5830},{"style":1106},[5831],{"type":998,"value":5832},"    \"US Format\"",{"type":993,"tag":1034,"props":5834,"children":5835},{"style":1046},[5836],{"type":998,"value":5806},{"type":993,"tag":1034,"props":5838,"children":5839},{"style":1106},[5840],{"type":998,"value":5841},"\"%m/",{"type":993,"tag":1034,"props":5843,"children":5844},{"style":1090},[5845],{"type":998,"value":1433},{"type":993,"tag":1034,"props":5847,"children":5848},{"style":1106},[5849],{"type":998,"value":5850},"/%Y %I:%M %p\"",{"type":993,"tag":1034,"props":5852,"children":5853},{"style":1046},[5854],{"type":998,"value":5824},{"type":993,"tag":1034,"props":5856,"children":5857},{"class":1036,"line":100},[5858,5863,5867,5871,5875,5880],{"type":993,"tag":1034,"props":5859,"children":5860},{"style":1106},[5861],{"type":998,"value":5862},"    \"European Format\"",{"type":993,"tag":1034,"props":5864,"children":5865},{"style":1046},[5866],{"type":998,"value":5806},{"type":993,"tag":1034,"props":5868,"children":5869},{"style":1106},[5870],{"type":998,"value":1129},{"type":993,"tag":1034,"props":5872,"children":5873},{"style":1090},[5874],{"type":998,"value":1433},{"type":993,"tag":1034,"props":5876,"children":5877},{"style":1106},[5878],{"type":998,"value":5879},"/%m/%Y %H:%M\"",{"type":993,"tag":1034,"props":5881,"children":5882},{"style":1046},[5883],{"type":998,"value":5824},{"type":993,"tag":1034,"props":5885,"children":5886},{"class":1036,"line":109},[5887,5892,5896,5901,5905,5910],{"type":993,"tag":1034,"props":5888,"children":5889},{"style":1106},[5890],{"type":998,"value":5891},"    \"Long Format\"",{"type":993,"tag":1034,"props":5893,"children":5894},{"style":1046},[5895],{"type":998,"value":5806},{"type":993,"tag":1034,"props":5897,"children":5898},{"style":1106},[5899],{"type":998,"value":5900},"\"%A, %B ",{"type":993,"tag":1034,"props":5902,"children":5903},{"style":1090},[5904],{"type":998,"value":1433},{"type":993,"tag":1034,"props":5906,"children":5907},{"style":1106},[5908],{"type":998,"value":5909},", %Y\"",{"type":993,"tag":1034,"props":5911,"children":5912},{"style":1046},[5913],{"type":998,"value":5824},{"type":993,"tag":1034,"props":5915,"children":5916},{"class":1036,"line":118},[5917,5922,5926,5930,5935,5939,5944,5949,5953],{"type":993,"tag":1034,"props":5918,"children":5919},{"style":1106},[5920],{"type":998,"value":5921},"    \"Short Format\"",{"type":993,"tag":1034,"props":5923,"children":5924},{"style":1046},[5925],{"type":998,"value":5806},{"type":993,"tag":1034,"props":5927,"children":5928},{"style":1106},[5929],{"type":998,"value":1129},{"type":993,"tag":1034,"props":5931,"children":5932},{"style":1090},[5933],{"type":998,"value":5934},"%a",{"type":993,"tag":1034,"props":5936,"children":5937},{"style":1106},[5938],{"type":998,"value":1176},{"type":993,"tag":1034,"props":5940,"children":5941},{"style":1090},[5942],{"type":998,"value":5943},"%b",{"type":993,"tag":1034,"props":5945,"children":5946},{"style":1090},[5947],{"type":998,"value":5948}," %d",{"type":993,"tag":1034,"props":5950,"children":5951},{"style":1106},[5952],{"type":998,"value":1129},{"type":993,"tag":1034,"props":5954,"children":5955},{"style":1046},[5956],{"type":998,"value":5824},{"type":993,"tag":1034,"props":5958,"children":5959},{"class":1036,"line":127},[5960,5965,5969,5974],{"type":993,"tag":1034,"props":5961,"children":5962},{"style":1106},[5963],{"type":998,"value":5964},"    \"Time Only\"",{"type":993,"tag":1034,"props":5966,"children":5967},{"style":1046},[5968],{"type":998,"value":5806},{"type":993,"tag":1034,"props":5970,"children":5971},{"style":1106},[5972],{"type":998,"value":5973},"\"%H:%M:%S\"",{"type":993,"tag":1034,"props":5975,"children":5976},{"style":1046},[5977],{"type":998,"value":5824},{"type":993,"tag":1034,"props":5979,"children":5980},{"class":1036,"line":136},[5981,5986,5991,5995,5999,6003],{"type":993,"tag":1034,"props":5982,"children":5983},{"style":1106},[5984],{"type":998,"value":5985},"    \"Date Only\"",{"type":993,"tag":1034,"props":5987,"children":5988},{"style":1046},[5989],{"type":998,"value":5990},": birthday.strftime(",{"type":993,"tag":1034,"props":5992,"children":5993},{"style":1106},[5994],{"type":998,"value":1428},{"type":993,"tag":1034,"props":5996,"children":5997},{"style":1090},[5998],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6000,"children":6001},{"style":1106},[6002],{"type":998,"value":5909},{"type":993,"tag":1034,"props":6004,"children":6005},{"style":1046},[6006],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6008,"children":6009},{"class":1036,"line":146},[6010],{"type":993,"tag":1034,"props":6011,"children":6012},{"style":1046},[6013],{"type":998,"value":6014},"}\n",{"type":993,"tag":1034,"props":6016,"children":6017},{"class":1036,"line":155},[6018],{"type":993,"tag":1034,"props":6019,"children":6020},{"emptyLinePlaceholder":13},[6021],{"type":998,"value":1057},{"type":993,"tag":1034,"props":6023,"children":6024},{"class":1036,"line":164},[6025,6029,6033,6038],{"type":993,"tag":1034,"props":6026,"children":6027},{"style":1090},[6028],{"type":998,"value":1093},{"type":993,"tag":1034,"props":6030,"children":6031},{"style":1046},[6032],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6034,"children":6035},{"style":1106},[6036],{"type":998,"value":6037},"\"Date Formatting Examples:\"",{"type":993,"tag":1034,"props":6039,"children":6040},{"style":1046},[6041],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6043,"children":6044},{"class":1036,"line":173},[6045,6050,6055,6060],{"type":993,"tag":1034,"props":6046,"children":6047},{"style":1040},[6048],{"type":998,"value":6049},"for",{"type":993,"tag":1034,"props":6051,"children":6052},{"style":1046},[6053],{"type":998,"value":6054}," name, formatted ",{"type":993,"tag":1034,"props":6056,"children":6057},{"style":1040},[6058],{"type":998,"value":6059},"in",{"type":993,"tag":1034,"props":6061,"children":6062},{"style":1046},[6063],{"type":998,"value":6064}," formats.items():\n",{"type":993,"tag":1034,"props":6066,"children":6067},{"class":1036,"line":182},[6068,6072,6076,6080,6084,6088,6093,6098,6102,6106,6110,6114,6118,6122],{"type":993,"tag":1034,"props":6069,"children":6070},{"style":1090},[6071],{"type":998,"value":2821},{"type":993,"tag":1034,"props":6073,"children":6074},{"style":1046},[6075],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6077,"children":6078},{"style":1040},[6079],{"type":998,"value":1103},{"type":993,"tag":1034,"props":6081,"children":6082},{"style":1106},[6083],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6085,"children":6086},{"style":1090},[6087],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6089,"children":6090},{"style":1046},[6091],{"type":998,"value":6092},"name",{"type":993,"tag":1034,"props":6094,"children":6095},{"style":1040},[6096],{"type":998,"value":6097},":15",{"type":993,"tag":1034,"props":6099,"children":6100},{"style":1090},[6101],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6103,"children":6104},{"style":1106},[6105],{"type":998,"value":5452},{"type":993,"tag":1034,"props":6107,"children":6108},{"style":1090},[6109],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6111,"children":6112},{"style":1046},[6113],{"type":998,"value":1471},{"type":993,"tag":1034,"props":6115,"children":6116},{"style":1090},[6117],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6119,"children":6120},{"style":1106},[6121],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6123,"children":6124},{"style":1046},[6125],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6127,"children":6128},{"class":1036,"line":191},[6129],{"type":993,"tag":1034,"props":6130,"children":6131},{"emptyLinePlaceholder":13},[6132],{"type":998,"value":1057},{"type":993,"tag":1034,"props":6134,"children":6135},{"class":1036,"line":201},[6136],{"type":993,"tag":1034,"props":6137,"children":6138},{"style":1063},[6139],{"type":998,"value":6140},"# Custom business formats\n",{"type":993,"tag":1034,"props":6142,"children":6143},{"class":1036,"line":210},[6144,6149,6153,6157,6162,6166,6170],{"type":993,"tag":1034,"props":6145,"children":6146},{"style":1046},[6147],{"type":998,"value":6148},"invoice_date ",{"type":993,"tag":1034,"props":6150,"children":6151},{"style":1040},[6152],{"type":998,"value":1079},{"type":993,"tag":1034,"props":6154,"children":6155},{"style":1046},[6156],{"type":998,"value":1423},{"type":993,"tag":1034,"props":6158,"children":6159},{"style":1106},[6160],{"type":998,"value":6161},"\"Invoice Date: %B ",{"type":993,"tag":1034,"props":6163,"children":6164},{"style":1090},[6165],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6167,"children":6168},{"style":1106},[6169],{"type":998,"value":5909},{"type":993,"tag":1034,"props":6171,"children":6172},{"style":1046},[6173],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6175,"children":6176},{"class":1036,"line":219},[6177,6182,6186,6190,6195,6199,6204],{"type":993,"tag":1034,"props":6178,"children":6179},{"style":1046},[6180],{"type":998,"value":6181},"log_timestamp ",{"type":993,"tag":1034,"props":6183,"children":6184},{"style":1040},[6185],{"type":998,"value":1079},{"type":993,"tag":1034,"props":6187,"children":6188},{"style":1046},[6189],{"type":998,"value":1423},{"type":993,"tag":1034,"props":6191,"children":6192},{"style":1106},[6193],{"type":998,"value":6194},"\"[%Y-%m-",{"type":993,"tag":1034,"props":6196,"children":6197},{"style":1090},[6198],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6200,"children":6201},{"style":1106},[6202],{"type":998,"value":6203}," %H:%M:%S]\"",{"type":993,"tag":1034,"props":6205,"children":6206},{"style":1046},[6207],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6209,"children":6210},{"class":1036,"line":228},[6211,6216,6220,6224,6229,6233,6238],{"type":993,"tag":1034,"props":6212,"children":6213},{"style":1046},[6214],{"type":998,"value":6215},"filename_date ",{"type":993,"tag":1034,"props":6217,"children":6218},{"style":1040},[6219],{"type":998,"value":1079},{"type":993,"tag":1034,"props":6221,"children":6222},{"style":1046},[6223],{"type":998,"value":1423},{"type":993,"tag":1034,"props":6225,"children":6226},{"style":1106},[6227],{"type":998,"value":6228},"\"report_%Y%m",{"type":993,"tag":1034,"props":6230,"children":6231},{"style":1090},[6232],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6234,"children":6235},{"style":1106},[6236],{"type":998,"value":6237},"_%H%M%S.txt\"",{"type":993,"tag":1034,"props":6239,"children":6240},{"style":1046},[6241],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6243,"children":6244},{"class":1036,"line":238},[6245],{"type":993,"tag":1034,"props":6246,"children":6247},{"emptyLinePlaceholder":13},[6248],{"type":998,"value":1057},{"type":993,"tag":1034,"props":6250,"children":6251},{"class":1036,"line":247},[6252,6256,6260,6264,6268,6273,6278,6282,6286],{"type":993,"tag":1034,"props":6253,"children":6254},{"style":1090},[6255],{"type":998,"value":1093},{"type":993,"tag":1034,"props":6257,"children":6258},{"style":1046},[6259],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6261,"children":6262},{"style":1040},[6263],{"type":998,"value":1103},{"type":993,"tag":1034,"props":6265,"children":6266},{"style":1106},[6267],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6269,"children":6270},{"style":1090},[6271],{"type":998,"value":6272},"\\n{",{"type":993,"tag":1034,"props":6274,"children":6275},{"style":1046},[6276],{"type":998,"value":6277},"invoice_date",{"type":993,"tag":1034,"props":6279,"children":6280},{"style":1090},[6281],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6283,"children":6284},{"style":1106},[6285],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6287,"children":6288},{"style":1046},[6289],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6291,"children":6292},{"class":1036,"line":256},[6293,6297,6301,6305,6309,6313,6318,6322,6327],{"type":993,"tag":1034,"props":6294,"children":6295},{"style":1090},[6296],{"type":998,"value":1093},{"type":993,"tag":1034,"props":6298,"children":6299},{"style":1046},[6300],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6302,"children":6303},{"style":1040},[6304],{"type":998,"value":1103},{"type":993,"tag":1034,"props":6306,"children":6307},{"style":1106},[6308],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6310,"children":6311},{"style":1090},[6312],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6314,"children":6315},{"style":1046},[6316],{"type":998,"value":6317},"log_timestamp",{"type":993,"tag":1034,"props":6319,"children":6320},{"style":1090},[6321],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6323,"children":6324},{"style":1106},[6325],{"type":998,"value":6326}," System started\"",{"type":993,"tag":1034,"props":6328,"children":6329},{"style":1046},[6330],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6332,"children":6333},{"class":1036,"line":265},[6334,6338,6342,6346,6351,6355,6360,6364,6368],{"type":993,"tag":1034,"props":6335,"children":6336},{"style":1090},[6337],{"type":998,"value":1093},{"type":993,"tag":1034,"props":6339,"children":6340},{"style":1046},[6341],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6343,"children":6344},{"style":1040},[6345],{"type":998,"value":1103},{"type":993,"tag":1034,"props":6347,"children":6348},{"style":1106},[6349],{"type":998,"value":6350},"\"Filename: ",{"type":993,"tag":1034,"props":6352,"children":6353},{"style":1090},[6354],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6356,"children":6357},{"style":1046},[6358],{"type":998,"value":6359},"filename_date",{"type":993,"tag":1034,"props":6361,"children":6362},{"style":1090},[6363],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6365,"children":6366},{"style":1106},[6367],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6369,"children":6370},{"style":1046},[6371],{"type":998,"value":1134},{"type":993,"tag":1662,"props":6373,"children":6375},{"id":6374},"parsing-dates-from-strings",[6376],{"type":998,"value":6377},"Parsing Dates from Strings",{"type":993,"tag":1001,"props":6379,"children":6380},{},[6381,6382,6388],{"type":998,"value":5671},{"type":993,"tag":1007,"props":6383,"children":6385},{"className":6384},[],[6386],{"type":998,"value":6387},"strptime()",{"type":998,"value":6389}," to convert string representations back to date objects for processing.",{"type":993,"tag":1021,"props":6391,"children":6392},{},[6393],{"type":993,"tag":1025,"props":6394,"children":6396},{"className":1027,"code":6395,"language":6,"meta":8,"style":8},"import datetime\n\n# Common date string formats\ndate_strings = [\n    (\"2024-03-15\", \"%Y-%m-%d\"),\n    (\"03/15/2024\", \"%m/%d/%Y\"),\n    (\"15/03/2024\", \"%d/%m/%Y\"),\n    (\"March 15, 2024\", \"%B %d, %Y\"),\n    (\"15-Mar-2024\", \"%d-%b-%Y\"),\n    (\"2024-03-15 14:30:00\", \"%Y-%m-%d %H:%M:%S\"),\n    (\"03/15/24 2:30 PM\", \"%m/%d/%y %I:%M %p\")\n]\n\nprint(\"Parsing Date Strings:\")\nfor date_str, format_str in date_strings:\n    try:\n        parsed = datetime.datetime.strptime(date_str, format_str)\n        print(f\"'{date_str}' -> {parsed}\")\n    except ValueError as e:\n        print(f\"'{date_str}' -> Error: {e}\")\n\n# Flexible parsing function\ndef parse_date_flexible(date_string):\n    \"\"\"Try multiple common formats to parse a date string\"\"\"\n    formats = [\n        \"%Y-%m-%d\", \"%m/%d/%Y\", \"%d/%m/%Y\", \n        \"%Y-%m-%d %H:%M:%S\", \"%m/%d/%Y %I:%M %p\",\n        \"%B %d, %Y\", \"%d-%b-%Y\"\n    ]\n    \n    for fmt in formats:\n        try:\n            return datetime.datetime.strptime(date_string, fmt)\n        except ValueError:\n            continue\n    \n    raise ValueError(f\"Unable to parse date: {date_string}\")\n\n# Test flexible parsing\ntest_dates = [\"2024-03-15\", \"03/15/2024\", \"March 15, 2024\"]\nfor test_date in test_dates:\n    try:\n        result = parse_date_flexible(test_date)\n        print(f\"Flexible parse '{test_date}': {result.date()}\")\n    except ValueError as e:\n        print(f\"Error: {e}\")\n",[6397],{"type":993,"tag":1007,"props":6398,"children":6399},{"__ignoreMap":8},[6400,6411,6418,6426,6443,6476,6509,6542,6574,6615,6647,6680,6688,6695,6715,6736,6748,6765,6825,6848,6905,6912,6920,6937,6945,6961,7014,7050,7091,7099,7106,7128,7140,7153,7169,7177,7184,7230,7237,7245,7286,7307,7318,7335,7394,7413],{"type":993,"tag":1034,"props":6401,"children":6402},{"class":1036,"line":12},[6403,6407],{"type":993,"tag":1034,"props":6404,"children":6405},{"style":1040},[6406],{"type":998,"value":1043},{"type":993,"tag":1034,"props":6408,"children":6409},{"style":1046},[6410],{"type":998,"value":1049},{"type":993,"tag":1034,"props":6412,"children":6413},{"class":1036,"line":27},[6414],{"type":993,"tag":1034,"props":6415,"children":6416},{"emptyLinePlaceholder":13},[6417],{"type":998,"value":1057},{"type":993,"tag":1034,"props":6419,"children":6420},{"class":1036,"line":36},[6421],{"type":993,"tag":1034,"props":6422,"children":6423},{"style":1063},[6424],{"type":998,"value":6425},"# Common date string formats\n",{"type":993,"tag":1034,"props":6427,"children":6428},{"class":1036,"line":45},[6429,6434,6438],{"type":993,"tag":1034,"props":6430,"children":6431},{"style":1046},[6432],{"type":998,"value":6433},"date_strings ",{"type":993,"tag":1034,"props":6435,"children":6436},{"style":1040},[6437],{"type":998,"value":1079},{"type":993,"tag":1034,"props":6439,"children":6440},{"style":1046},[6441],{"type":998,"value":6442}," [\n",{"type":993,"tag":1034,"props":6444,"children":6445},{"class":1036,"line":54},[6446,6451,6456,6460,6464,6468,6472],{"type":993,"tag":1034,"props":6447,"children":6448},{"style":1046},[6449],{"type":998,"value":6450},"    (",{"type":993,"tag":1034,"props":6452,"children":6453},{"style":1106},[6454],{"type":998,"value":6455},"\"2024-03-15\"",{"type":993,"tag":1034,"props":6457,"children":6458},{"style":1046},[6459],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6461,"children":6462},{"style":1106},[6463],{"type":998,"value":2190},{"type":993,"tag":1034,"props":6465,"children":6466},{"style":1090},[6467],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6469,"children":6470},{"style":1106},[6471],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6473,"children":6474},{"style":1046},[6475],{"type":998,"value":5824},{"type":993,"tag":1034,"props":6477,"children":6478},{"class":1036,"line":63},[6479,6483,6488,6492,6496,6500,6505],{"type":993,"tag":1034,"props":6480,"children":6481},{"style":1046},[6482],{"type":998,"value":6450},{"type":993,"tag":1034,"props":6484,"children":6485},{"style":1106},[6486],{"type":998,"value":6487},"\"03/15/2024\"",{"type":993,"tag":1034,"props":6489,"children":6490},{"style":1046},[6491],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6493,"children":6494},{"style":1106},[6495],{"type":998,"value":5841},{"type":993,"tag":1034,"props":6497,"children":6498},{"style":1090},[6499],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6501,"children":6502},{"style":1106},[6503],{"type":998,"value":6504},"/%Y\"",{"type":993,"tag":1034,"props":6506,"children":6507},{"style":1046},[6508],{"type":998,"value":5824},{"type":993,"tag":1034,"props":6510,"children":6511},{"class":1036,"line":72},[6512,6516,6521,6525,6529,6533,6538],{"type":993,"tag":1034,"props":6513,"children":6514},{"style":1046},[6515],{"type":998,"value":6450},{"type":993,"tag":1034,"props":6517,"children":6518},{"style":1106},[6519],{"type":998,"value":6520},"\"15/03/2024\"",{"type":993,"tag":1034,"props":6522,"children":6523},{"style":1046},[6524],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6526,"children":6527},{"style":1106},[6528],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6530,"children":6531},{"style":1090},[6532],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6534,"children":6535},{"style":1106},[6536],{"type":998,"value":6537},"/%m/%Y\"",{"type":993,"tag":1034,"props":6539,"children":6540},{"style":1046},[6541],{"type":998,"value":5824},{"type":993,"tag":1034,"props":6543,"children":6544},{"class":1036,"line":81},[6545,6549,6554,6558,6562,6566,6570],{"type":993,"tag":1034,"props":6546,"children":6547},{"style":1046},[6548],{"type":998,"value":6450},{"type":993,"tag":1034,"props":6550,"children":6551},{"style":1106},[6552],{"type":998,"value":6553},"\"March 15, 2024\"",{"type":993,"tag":1034,"props":6555,"children":6556},{"style":1046},[6557],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6559,"children":6560},{"style":1106},[6561],{"type":998,"value":1428},{"type":993,"tag":1034,"props":6563,"children":6564},{"style":1090},[6565],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6567,"children":6568},{"style":1106},[6569],{"type":998,"value":5909},{"type":993,"tag":1034,"props":6571,"children":6572},{"style":1046},[6573],{"type":998,"value":5824},{"type":993,"tag":1034,"props":6575,"children":6576},{"class":1036,"line":91},[6577,6581,6586,6590,6594,6598,6602,6606,6611],{"type":993,"tag":1034,"props":6578,"children":6579},{"style":1046},[6580],{"type":998,"value":6450},{"type":993,"tag":1034,"props":6582,"children":6583},{"style":1106},[6584],{"type":998,"value":6585},"\"15-Mar-2024\"",{"type":993,"tag":1034,"props":6587,"children":6588},{"style":1046},[6589],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6591,"children":6592},{"style":1106},[6593],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6595,"children":6596},{"style":1090},[6597],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6599,"children":6600},{"style":1106},[6601],{"type":998,"value":1272},{"type":993,"tag":1034,"props":6603,"children":6604},{"style":1090},[6605],{"type":998,"value":5943},{"type":993,"tag":1034,"props":6607,"children":6608},{"style":1106},[6609],{"type":998,"value":6610},"-%Y\"",{"type":993,"tag":1034,"props":6612,"children":6613},{"style":1046},[6614],{"type":998,"value":5824},{"type":993,"tag":1034,"props":6616,"children":6617},{"class":1036,"line":100},[6618,6622,6627,6631,6635,6639,6643],{"type":993,"tag":1034,"props":6619,"children":6620},{"style":1046},[6621],{"type":998,"value":6450},{"type":993,"tag":1034,"props":6623,"children":6624},{"style":1106},[6625],{"type":998,"value":6626},"\"2024-03-15 14:30:00\"",{"type":993,"tag":1034,"props":6628,"children":6629},{"style":1046},[6630],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6632,"children":6633},{"style":1106},[6634],{"type":998,"value":2190},{"type":993,"tag":1034,"props":6636,"children":6637},{"style":1090},[6638],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6640,"children":6641},{"style":1106},[6642],{"type":998,"value":5819},{"type":993,"tag":1034,"props":6644,"children":6645},{"style":1046},[6646],{"type":998,"value":5824},{"type":993,"tag":1034,"props":6648,"children":6649},{"class":1036,"line":109},[6650,6654,6659,6663,6667,6671,6676],{"type":993,"tag":1034,"props":6651,"children":6652},{"style":1046},[6653],{"type":998,"value":6450},{"type":993,"tag":1034,"props":6655,"children":6656},{"style":1106},[6657],{"type":998,"value":6658},"\"03/15/24 2:30 PM\"",{"type":993,"tag":1034,"props":6660,"children":6661},{"style":1046},[6662],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6664,"children":6665},{"style":1106},[6666],{"type":998,"value":5841},{"type":993,"tag":1034,"props":6668,"children":6669},{"style":1090},[6670],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6672,"children":6673},{"style":1106},[6674],{"type":998,"value":6675},"/%y %I:%M %p\"",{"type":993,"tag":1034,"props":6677,"children":6678},{"style":1046},[6679],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6681,"children":6682},{"class":1036,"line":118},[6683],{"type":993,"tag":1034,"props":6684,"children":6685},{"style":1046},[6686],{"type":998,"value":6687},"]\n",{"type":993,"tag":1034,"props":6689,"children":6690},{"class":1036,"line":127},[6691],{"type":993,"tag":1034,"props":6692,"children":6693},{"emptyLinePlaceholder":13},[6694],{"type":998,"value":1057},{"type":993,"tag":1034,"props":6696,"children":6697},{"class":1036,"line":136},[6698,6702,6706,6711],{"type":993,"tag":1034,"props":6699,"children":6700},{"style":1090},[6701],{"type":998,"value":1093},{"type":993,"tag":1034,"props":6703,"children":6704},{"style":1046},[6705],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6707,"children":6708},{"style":1106},[6709],{"type":998,"value":6710},"\"Parsing Date Strings:\"",{"type":993,"tag":1034,"props":6712,"children":6713},{"style":1046},[6714],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6716,"children":6717},{"class":1036,"line":146},[6718,6722,6727,6731],{"type":993,"tag":1034,"props":6719,"children":6720},{"style":1040},[6721],{"type":998,"value":6049},{"type":993,"tag":1034,"props":6723,"children":6724},{"style":1046},[6725],{"type":998,"value":6726}," date_str, format_str ",{"type":993,"tag":1034,"props":6728,"children":6729},{"style":1040},[6730],{"type":998,"value":6059},{"type":993,"tag":1034,"props":6732,"children":6733},{"style":1046},[6734],{"type":998,"value":6735}," date_strings:\n",{"type":993,"tag":1034,"props":6737,"children":6738},{"class":1036,"line":155},[6739,6744],{"type":993,"tag":1034,"props":6740,"children":6741},{"style":1040},[6742],{"type":998,"value":6743},"    try",{"type":993,"tag":1034,"props":6745,"children":6746},{"style":1046},[6747],{"type":998,"value":2847},{"type":993,"tag":1034,"props":6749,"children":6750},{"class":1036,"line":164},[6751,6756,6760],{"type":993,"tag":1034,"props":6752,"children":6753},{"style":1046},[6754],{"type":998,"value":6755},"        parsed ",{"type":993,"tag":1034,"props":6757,"children":6758},{"style":1040},[6759],{"type":998,"value":1079},{"type":993,"tag":1034,"props":6761,"children":6762},{"style":1046},[6763],{"type":998,"value":6764}," datetime.datetime.strptime(date_str, format_str)\n",{"type":993,"tag":1034,"props":6766,"children":6767},{"class":1036,"line":173},[6768,6773,6777,6781,6786,6790,6795,6799,6804,6808,6813,6817,6821],{"type":993,"tag":1034,"props":6769,"children":6770},{"style":1090},[6771],{"type":998,"value":6772},"        print",{"type":993,"tag":1034,"props":6774,"children":6775},{"style":1046},[6776],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6778,"children":6779},{"style":1040},[6780],{"type":998,"value":1103},{"type":993,"tag":1034,"props":6782,"children":6783},{"style":1106},[6784],{"type":998,"value":6785},"\"'",{"type":993,"tag":1034,"props":6787,"children":6788},{"style":1090},[6789],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6791,"children":6792},{"style":1046},[6793],{"type":998,"value":6794},"date_str",{"type":993,"tag":1034,"props":6796,"children":6797},{"style":1090},[6798],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6800,"children":6801},{"style":1106},[6802],{"type":998,"value":6803},"' -> ",{"type":993,"tag":1034,"props":6805,"children":6806},{"style":1090},[6807],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6809,"children":6810},{"style":1046},[6811],{"type":998,"value":6812},"parsed",{"type":993,"tag":1034,"props":6814,"children":6815},{"style":1090},[6816],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6818,"children":6819},{"style":1106},[6820],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6822,"children":6823},{"style":1046},[6824],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6826,"children":6827},{"class":1036,"line":182},[6828,6833,6838,6843],{"type":993,"tag":1034,"props":6829,"children":6830},{"style":1040},[6831],{"type":998,"value":6832},"    except",{"type":993,"tag":1034,"props":6834,"children":6835},{"style":1090},[6836],{"type":998,"value":6837}," ValueError",{"type":993,"tag":1034,"props":6839,"children":6840},{"style":1040},[6841],{"type":998,"value":6842}," as",{"type":993,"tag":1034,"props":6844,"children":6845},{"style":1046},[6846],{"type":998,"value":6847}," e:\n",{"type":993,"tag":1034,"props":6849,"children":6850},{"class":1036,"line":191},[6851,6855,6859,6863,6867,6871,6875,6879,6884,6888,6893,6897,6901],{"type":993,"tag":1034,"props":6852,"children":6853},{"style":1090},[6854],{"type":998,"value":6772},{"type":993,"tag":1034,"props":6856,"children":6857},{"style":1046},[6858],{"type":998,"value":1098},{"type":993,"tag":1034,"props":6860,"children":6861},{"style":1040},[6862],{"type":998,"value":1103},{"type":993,"tag":1034,"props":6864,"children":6865},{"style":1106},[6866],{"type":998,"value":6785},{"type":993,"tag":1034,"props":6868,"children":6869},{"style":1090},[6870],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6872,"children":6873},{"style":1046},[6874],{"type":998,"value":6794},{"type":993,"tag":1034,"props":6876,"children":6877},{"style":1090},[6878],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6880,"children":6881},{"style":1106},[6882],{"type":998,"value":6883},"' -> Error: ",{"type":993,"tag":1034,"props":6885,"children":6886},{"style":1090},[6887],{"type":998,"value":1114},{"type":993,"tag":1034,"props":6889,"children":6890},{"style":1046},[6891],{"type":998,"value":6892},"e",{"type":993,"tag":1034,"props":6894,"children":6895},{"style":1090},[6896],{"type":998,"value":1124},{"type":993,"tag":1034,"props":6898,"children":6899},{"style":1106},[6900],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6902,"children":6903},{"style":1046},[6904],{"type":998,"value":1134},{"type":993,"tag":1034,"props":6906,"children":6907},{"class":1036,"line":201},[6908],{"type":993,"tag":1034,"props":6909,"children":6910},{"emptyLinePlaceholder":13},[6911],{"type":998,"value":1057},{"type":993,"tag":1034,"props":6913,"children":6914},{"class":1036,"line":210},[6915],{"type":993,"tag":1034,"props":6916,"children":6917},{"style":1063},[6918],{"type":998,"value":6919},"# Flexible parsing function\n",{"type":993,"tag":1034,"props":6921,"children":6922},{"class":1036,"line":219},[6923,6927,6932],{"type":993,"tag":1034,"props":6924,"children":6925},{"style":1040},[6926],{"type":998,"value":4561},{"type":993,"tag":1034,"props":6928,"children":6929},{"style":4564},[6930],{"type":998,"value":6931}," parse_date_flexible",{"type":993,"tag":1034,"props":6933,"children":6934},{"style":1046},[6935],{"type":998,"value":6936},"(date_string):\n",{"type":993,"tag":1034,"props":6938,"children":6939},{"class":1036,"line":228},[6940],{"type":993,"tag":1034,"props":6941,"children":6942},{"style":1106},[6943],{"type":998,"value":6944},"    \"\"\"Try multiple common formats to parse a date string\"\"\"\n",{"type":993,"tag":1034,"props":6946,"children":6947},{"class":1036,"line":238},[6948,6953,6957],{"type":993,"tag":1034,"props":6949,"children":6950},{"style":1046},[6951],{"type":998,"value":6952},"    formats ",{"type":993,"tag":1034,"props":6954,"children":6955},{"style":1040},[6956],{"type":998,"value":1079},{"type":993,"tag":1034,"props":6958,"children":6959},{"style":1046},[6960],{"type":998,"value":6442},{"type":993,"tag":1034,"props":6962,"children":6963},{"class":1036,"line":247},[6964,6969,6973,6977,6981,6985,6989,6993,6997,7001,7005,7009],{"type":993,"tag":1034,"props":6965,"children":6966},{"style":1106},[6967],{"type":998,"value":6968},"        \"%Y-%m-",{"type":993,"tag":1034,"props":6970,"children":6971},{"style":1090},[6972],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6974,"children":6975},{"style":1106},[6976],{"type":998,"value":1129},{"type":993,"tag":1034,"props":6978,"children":6979},{"style":1046},[6980],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6982,"children":6983},{"style":1106},[6984],{"type":998,"value":5841},{"type":993,"tag":1034,"props":6986,"children":6987},{"style":1090},[6988],{"type":998,"value":1433},{"type":993,"tag":1034,"props":6990,"children":6991},{"style":1106},[6992],{"type":998,"value":6504},{"type":993,"tag":1034,"props":6994,"children":6995},{"style":1046},[6996],{"type":998,"value":1176},{"type":993,"tag":1034,"props":6998,"children":6999},{"style":1106},[7000],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7002,"children":7003},{"style":1090},[7004],{"type":998,"value":1433},{"type":993,"tag":1034,"props":7006,"children":7007},{"style":1106},[7008],{"type":998,"value":6537},{"type":993,"tag":1034,"props":7010,"children":7011},{"style":1046},[7012],{"type":998,"value":7013},", \n",{"type":993,"tag":1034,"props":7015,"children":7016},{"class":1036,"line":256},[7017,7021,7025,7029,7033,7037,7041,7045],{"type":993,"tag":1034,"props":7018,"children":7019},{"style":1106},[7020],{"type":998,"value":6968},{"type":993,"tag":1034,"props":7022,"children":7023},{"style":1090},[7024],{"type":998,"value":1433},{"type":993,"tag":1034,"props":7026,"children":7027},{"style":1106},[7028],{"type":998,"value":5819},{"type":993,"tag":1034,"props":7030,"children":7031},{"style":1046},[7032],{"type":998,"value":1176},{"type":993,"tag":1034,"props":7034,"children":7035},{"style":1106},[7036],{"type":998,"value":5841},{"type":993,"tag":1034,"props":7038,"children":7039},{"style":1090},[7040],{"type":998,"value":1433},{"type":993,"tag":1034,"props":7042,"children":7043},{"style":1106},[7044],{"type":998,"value":5850},{"type":993,"tag":1034,"props":7046,"children":7047},{"style":1046},[7048],{"type":998,"value":7049},",\n",{"type":993,"tag":1034,"props":7051,"children":7052},{"class":1036,"line":265},[7053,7058,7062,7066,7070,7074,7078,7082,7086],{"type":993,"tag":1034,"props":7054,"children":7055},{"style":1106},[7056],{"type":998,"value":7057},"        \"%B ",{"type":993,"tag":1034,"props":7059,"children":7060},{"style":1090},[7061],{"type":998,"value":1433},{"type":993,"tag":1034,"props":7063,"children":7064},{"style":1106},[7065],{"type":998,"value":5909},{"type":993,"tag":1034,"props":7067,"children":7068},{"style":1046},[7069],{"type":998,"value":1176},{"type":993,"tag":1034,"props":7071,"children":7072},{"style":1106},[7073],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7075,"children":7076},{"style":1090},[7077],{"type":998,"value":1433},{"type":993,"tag":1034,"props":7079,"children":7080},{"style":1106},[7081],{"type":998,"value":1272},{"type":993,"tag":1034,"props":7083,"children":7084},{"style":1090},[7085],{"type":998,"value":5943},{"type":993,"tag":1034,"props":7087,"children":7088},{"style":1106},[7089],{"type":998,"value":7090},"-%Y\"\n",{"type":993,"tag":1034,"props":7092,"children":7093},{"class":1036,"line":274},[7094],{"type":993,"tag":1034,"props":7095,"children":7096},{"style":1046},[7097],{"type":998,"value":7098},"    ]\n",{"type":993,"tag":1034,"props":7100,"children":7101},{"class":1036,"line":284},[7102],{"type":993,"tag":1034,"props":7103,"children":7104},{"style":1046},[7105],{"type":998,"value":4621},{"type":993,"tag":1034,"props":7107,"children":7108},{"class":1036,"line":293},[7109,7114,7119,7123],{"type":993,"tag":1034,"props":7110,"children":7111},{"style":1040},[7112],{"type":998,"value":7113},"    for",{"type":993,"tag":1034,"props":7115,"children":7116},{"style":1046},[7117],{"type":998,"value":7118}," fmt ",{"type":993,"tag":1034,"props":7120,"children":7121},{"style":1040},[7122],{"type":998,"value":6059},{"type":993,"tag":1034,"props":7124,"children":7125},{"style":1046},[7126],{"type":998,"value":7127}," formats:\n",{"type":993,"tag":1034,"props":7129,"children":7130},{"class":1036,"line":302},[7131,7136],{"type":993,"tag":1034,"props":7132,"children":7133},{"style":1040},[7134],{"type":998,"value":7135},"        try",{"type":993,"tag":1034,"props":7137,"children":7138},{"style":1046},[7139],{"type":998,"value":2847},{"type":993,"tag":1034,"props":7141,"children":7142},{"class":1036,"line":311},[7143,7148],{"type":993,"tag":1034,"props":7144,"children":7145},{"style":1040},[7146],{"type":998,"value":7147},"            return",{"type":993,"tag":1034,"props":7149,"children":7150},{"style":1046},[7151],{"type":998,"value":7152}," datetime.datetime.strptime(date_string, fmt)\n",{"type":993,"tag":1034,"props":7154,"children":7155},{"class":1036,"line":320},[7156,7161,7165],{"type":993,"tag":1034,"props":7157,"children":7158},{"style":1040},[7159],{"type":998,"value":7160},"        except",{"type":993,"tag":1034,"props":7162,"children":7163},{"style":1090},[7164],{"type":998,"value":6837},{"type":993,"tag":1034,"props":7166,"children":7167},{"style":1046},[7168],{"type":998,"value":2847},{"type":993,"tag":1034,"props":7170,"children":7171},{"class":1036,"line":329},[7172],{"type":993,"tag":1034,"props":7173,"children":7174},{"style":1040},[7175],{"type":998,"value":7176},"            continue\n",{"type":993,"tag":1034,"props":7178,"children":7179},{"class":1036,"line":338},[7180],{"type":993,"tag":1034,"props":7181,"children":7182},{"style":1046},[7183],{"type":998,"value":4621},{"type":993,"tag":1034,"props":7185,"children":7186},{"class":1036,"line":347},[7187,7192,7196,7200,7204,7209,7213,7218,7222,7226],{"type":993,"tag":1034,"props":7188,"children":7189},{"style":1040},[7190],{"type":998,"value":7191},"    raise",{"type":993,"tag":1034,"props":7193,"children":7194},{"style":1090},[7195],{"type":998,"value":6837},{"type":993,"tag":1034,"props":7197,"children":7198},{"style":1046},[7199],{"type":998,"value":1098},{"type":993,"tag":1034,"props":7201,"children":7202},{"style":1040},[7203],{"type":998,"value":1103},{"type":993,"tag":1034,"props":7205,"children":7206},{"style":1106},[7207],{"type":998,"value":7208},"\"Unable to parse date: ",{"type":993,"tag":1034,"props":7210,"children":7211},{"style":1090},[7212],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7214,"children":7215},{"style":1046},[7216],{"type":998,"value":7217},"date_string",{"type":993,"tag":1034,"props":7219,"children":7220},{"style":1090},[7221],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7223,"children":7224},{"style":1106},[7225],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7227,"children":7228},{"style":1046},[7229],{"type":998,"value":1134},{"type":993,"tag":1034,"props":7231,"children":7232},{"class":1036,"line":356},[7233],{"type":993,"tag":1034,"props":7234,"children":7235},{"emptyLinePlaceholder":13},[7236],{"type":998,"value":1057},{"type":993,"tag":1034,"props":7238,"children":7239},{"class":1036,"line":365},[7240],{"type":993,"tag":1034,"props":7241,"children":7242},{"style":1063},[7243],{"type":998,"value":7244},"# Test flexible parsing\n",{"type":993,"tag":1034,"props":7246,"children":7247},{"class":1036,"line":374},[7248,7253,7257,7262,7266,7270,7274,7278,7282],{"type":993,"tag":1034,"props":7249,"children":7250},{"style":1046},[7251],{"type":998,"value":7252},"test_dates ",{"type":993,"tag":1034,"props":7254,"children":7255},{"style":1040},[7256],{"type":998,"value":1079},{"type":993,"tag":1034,"props":7258,"children":7259},{"style":1046},[7260],{"type":998,"value":7261}," [",{"type":993,"tag":1034,"props":7263,"children":7264},{"style":1106},[7265],{"type":998,"value":6455},{"type":993,"tag":1034,"props":7267,"children":7268},{"style":1046},[7269],{"type":998,"value":1176},{"type":993,"tag":1034,"props":7271,"children":7272},{"style":1106},[7273],{"type":998,"value":6487},{"type":993,"tag":1034,"props":7275,"children":7276},{"style":1046},[7277],{"type":998,"value":1176},{"type":993,"tag":1034,"props":7279,"children":7280},{"style":1106},[7281],{"type":998,"value":6553},{"type":993,"tag":1034,"props":7283,"children":7284},{"style":1046},[7285],{"type":998,"value":6687},{"type":993,"tag":1034,"props":7287,"children":7288},{"class":1036,"line":384},[7289,7293,7298,7302],{"type":993,"tag":1034,"props":7290,"children":7291},{"style":1040},[7292],{"type":998,"value":6049},{"type":993,"tag":1034,"props":7294,"children":7295},{"style":1046},[7296],{"type":998,"value":7297}," test_date ",{"type":993,"tag":1034,"props":7299,"children":7300},{"style":1040},[7301],{"type":998,"value":6059},{"type":993,"tag":1034,"props":7303,"children":7304},{"style":1046},[7305],{"type":998,"value":7306}," test_dates:\n",{"type":993,"tag":1034,"props":7308,"children":7309},{"class":1036,"line":393},[7310,7314],{"type":993,"tag":1034,"props":7311,"children":7312},{"style":1040},[7313],{"type":998,"value":6743},{"type":993,"tag":1034,"props":7315,"children":7316},{"style":1046},[7317],{"type":998,"value":2847},{"type":993,"tag":1034,"props":7319,"children":7320},{"class":1036,"line":402},[7321,7326,7330],{"type":993,"tag":1034,"props":7322,"children":7323},{"style":1046},[7324],{"type":998,"value":7325},"        result ",{"type":993,"tag":1034,"props":7327,"children":7328},{"style":1040},[7329],{"type":998,"value":1079},{"type":993,"tag":1034,"props":7331,"children":7332},{"style":1046},[7333],{"type":998,"value":7334}," parse_date_flexible(test_date)\n",{"type":993,"tag":1034,"props":7336,"children":7337},{"class":1036,"line":411},[7338,7342,7346,7350,7355,7359,7364,7368,7373,7377,7382,7386,7390],{"type":993,"tag":1034,"props":7339,"children":7340},{"style":1090},[7341],{"type":998,"value":6772},{"type":993,"tag":1034,"props":7343,"children":7344},{"style":1046},[7345],{"type":998,"value":1098},{"type":993,"tag":1034,"props":7347,"children":7348},{"style":1040},[7349],{"type":998,"value":1103},{"type":993,"tag":1034,"props":7351,"children":7352},{"style":1106},[7353],{"type":998,"value":7354},"\"Flexible parse '",{"type":993,"tag":1034,"props":7356,"children":7357},{"style":1090},[7358],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7360,"children":7361},{"style":1046},[7362],{"type":998,"value":7363},"test_date",{"type":993,"tag":1034,"props":7365,"children":7366},{"style":1090},[7367],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7369,"children":7370},{"style":1106},[7371],{"type":998,"value":7372},"': ",{"type":993,"tag":1034,"props":7374,"children":7375},{"style":1090},[7376],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7378,"children":7379},{"style":1046},[7380],{"type":998,"value":7381},"result.date()",{"type":993,"tag":1034,"props":7383,"children":7384},{"style":1090},[7385],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7387,"children":7388},{"style":1106},[7389],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7391,"children":7392},{"style":1046},[7393],{"type":998,"value":1134},{"type":993,"tag":1034,"props":7395,"children":7396},{"class":1036,"line":420},[7397,7401,7405,7409],{"type":993,"tag":1034,"props":7398,"children":7399},{"style":1040},[7400],{"type":998,"value":6832},{"type":993,"tag":1034,"props":7402,"children":7403},{"style":1090},[7404],{"type":998,"value":6837},{"type":993,"tag":1034,"props":7406,"children":7407},{"style":1040},[7408],{"type":998,"value":6842},{"type":993,"tag":1034,"props":7410,"children":7411},{"style":1046},[7412],{"type":998,"value":6847},{"type":993,"tag":1034,"props":7414,"children":7415},{"class":1036,"line":429},[7416,7420,7424,7428,7433,7437,7441,7445,7449],{"type":993,"tag":1034,"props":7417,"children":7418},{"style":1090},[7419],{"type":998,"value":6772},{"type":993,"tag":1034,"props":7421,"children":7422},{"style":1046},[7423],{"type":998,"value":1098},{"type":993,"tag":1034,"props":7425,"children":7426},{"style":1040},[7427],{"type":998,"value":1103},{"type":993,"tag":1034,"props":7429,"children":7430},{"style":1106},[7431],{"type":998,"value":7432},"\"Error: ",{"type":993,"tag":1034,"props":7434,"children":7435},{"style":1090},[7436],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7438,"children":7439},{"style":1046},[7440],{"type":998,"value":6892},{"type":993,"tag":1034,"props":7442,"children":7443},{"style":1090},[7444],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7446,"children":7447},{"style":1106},[7448],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7450,"children":7451},{"style":1046},[7452],{"type":998,"value":1134},{"type":993,"tag":1497,"props":7454,"children":7458},{"emoji":7455,"title":7456,"type":7457},"✅","Best Practices","success",[7459,7467,7490,7498,7521,7529],{"type":993,"tag":1001,"props":7460,"children":7461},{},[7462],{"type":993,"tag":1507,"props":7463,"children":7464},{},[7465],{"type":998,"value":7466},"Date Handling Guidelines:",{"type":993,"tag":1513,"props":7468,"children":7469},{},[7470,7475,7480,7485],{"type":993,"tag":1517,"props":7471,"children":7472},{},[7473],{"type":998,"value":7474},"Always use timezone-aware datetimes for production applications",{"type":993,"tag":1517,"props":7476,"children":7477},{},[7478],{"type":998,"value":7479},"Store dates in ISO format (YYYY-MM-DD) for consistency",{"type":993,"tag":1517,"props":7481,"children":7482},{},[7483],{"type":998,"value":7484},"Use datetime objects for calculations, strings only for display",{"type":993,"tag":1517,"props":7486,"children":7487},{},[7488],{"type":998,"value":7489},"Handle edge cases like leap years and month boundaries",{"type":993,"tag":1001,"props":7491,"children":7492},{},[7493],{"type":993,"tag":1507,"props":7494,"children":7495},{},[7496],{"type":998,"value":7497},"Common Patterns:",{"type":993,"tag":1513,"props":7499,"children":7500},{},[7501,7506,7511,7516],{"type":993,"tag":1517,"props":7502,"children":7503},{},[7504],{"type":998,"value":7505},"Use date.today() for current date without time",{"type":993,"tag":1517,"props":7507,"children":7508},{},[7509],{"type":998,"value":7510},"Use datetime.now() for current timestamp",{"type":993,"tag":1517,"props":7512,"children":7513},{},[7514],{"type":998,"value":7515},"Use timedelta for duration calculations",{"type":993,"tag":1517,"props":7517,"children":7518},{},[7519],{"type":998,"value":7520},"Parse user input with try/except for error handling",{"type":993,"tag":1001,"props":7522,"children":7523},{},[7524],{"type":993,"tag":1507,"props":7525,"children":7526},{},[7527],{"type":998,"value":7528},"Performance Tips:",{"type":993,"tag":1513,"props":7530,"children":7531},{},[7532,7537,7542,7547],{"type":993,"tag":1517,"props":7533,"children":7534},{},[7535],{"type":998,"value":7536},"Cache frequently calculated date ranges",{"type":993,"tag":1517,"props":7538,"children":7539},{},[7540],{"type":998,"value":7541},"Use date objects instead of datetime when time isn't needed",{"type":993,"tag":1517,"props":7543,"children":7544},{},[7545],{"type":998,"value":7546},"Consider using dateutil library for complex parsing",{"type":993,"tag":1517,"props":7548,"children":7549},{},[7550],{"type":998,"value":7551},"Store recurring events as rules rather than individual instances",{"type":993,"tag":7553,"props":7554,"children":7556},"content-exercise",{":widget-view":7555,"category":6,"id":748},"true",[],{"type":993,"tag":7558,"props":7559,"children":7562},"exercise",{"hint":7560,"prompt":7561},"Use datetime.date.today() for current date, datetime.date() to create birthday, and calculate the difference using subtraction","Create a simple birthday calculator that tells you how many days until your next birthday and how old you will be. Use datetime to calculate the difference between today and your birthday.",[7563],{"type":993,"tag":1025,"props":7564,"children":7566},{"className":1027,"code":7565,"language":6,"meta":8,"style":8},"import datetime\n\ndef calculate_birthday_info(birth_year, birth_month, birth_day):\n    # TODO: Get today's date\n    # TODO: Create your birth date\n    # TODO: Create this year's birthday\n    # TODO: If birthday already passed this year, use next year\n    # TODO: Calculate days until birthday\n    # TODO: Calculate age on next birthday\n    # TODO: Return the information\n    pass\n\n# TODO: Test with your birthday\nbirth_year = 1990\nbirth_month = 6\nbirth_day = 15\n\nresult = calculate_birthday_info(birth_year, birth_month, birth_day)\nprint(f\"Days until birthday: {result['days_until']}\")\nprint(f\"Age on next birthday: {result['age_on_birthday']}\")\nprint(f\"Next birthday: {result['next_birthday']}\")\n",[7567],{"type":993,"tag":1007,"props":7568,"children":7569},{"__ignoreMap":8},[7570,7581,7588,7605,7623,7639,7655,7671,7687,7703,7719,7727,7734,7751,7768,7785,7802,7809,7826,7876,7925],{"type":993,"tag":1034,"props":7571,"children":7572},{"class":1036,"line":12},[7573,7577],{"type":993,"tag":1034,"props":7574,"children":7575},{"style":1040},[7576],{"type":998,"value":1043},{"type":993,"tag":1034,"props":7578,"children":7579},{"style":1046},[7580],{"type":998,"value":1049},{"type":993,"tag":1034,"props":7582,"children":7583},{"class":1036,"line":27},[7584],{"type":993,"tag":1034,"props":7585,"children":7586},{"emptyLinePlaceholder":13},[7587],{"type":998,"value":1057},{"type":993,"tag":1034,"props":7589,"children":7590},{"class":1036,"line":36},[7591,7595,7600],{"type":993,"tag":1034,"props":7592,"children":7593},{"style":1040},[7594],{"type":998,"value":4561},{"type":993,"tag":1034,"props":7596,"children":7597},{"style":4564},[7598],{"type":998,"value":7599}," calculate_birthday_info",{"type":993,"tag":1034,"props":7601,"children":7602},{"style":1046},[7603],{"type":998,"value":7604},"(birth_year, birth_month, birth_day):\n",{"type":993,"tag":1034,"props":7606,"children":7607},{"class":1036,"line":45},[7608,7613,7618],{"type":993,"tag":1034,"props":7609,"children":7610},{"style":1063},[7611],{"type":998,"value":7612},"    # ",{"type":993,"tag":1034,"props":7614,"children":7615},{"style":1040},[7616],{"type":998,"value":7617},"TODO",{"type":993,"tag":1034,"props":7619,"children":7620},{"style":1063},[7621],{"type":998,"value":7622},": Get today's date\n",{"type":993,"tag":1034,"props":7624,"children":7625},{"class":1036,"line":54},[7626,7630,7634],{"type":993,"tag":1034,"props":7627,"children":7628},{"style":1063},[7629],{"type":998,"value":7612},{"type":993,"tag":1034,"props":7631,"children":7632},{"style":1040},[7633],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7635,"children":7636},{"style":1063},[7637],{"type":998,"value":7638},": Create your birth date\n",{"type":993,"tag":1034,"props":7640,"children":7641},{"class":1036,"line":63},[7642,7646,7650],{"type":993,"tag":1034,"props":7643,"children":7644},{"style":1063},[7645],{"type":998,"value":7612},{"type":993,"tag":1034,"props":7647,"children":7648},{"style":1040},[7649],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7651,"children":7652},{"style":1063},[7653],{"type":998,"value":7654},": Create this year's birthday\n",{"type":993,"tag":1034,"props":7656,"children":7657},{"class":1036,"line":72},[7658,7662,7666],{"type":993,"tag":1034,"props":7659,"children":7660},{"style":1063},[7661],{"type":998,"value":7612},{"type":993,"tag":1034,"props":7663,"children":7664},{"style":1040},[7665],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7667,"children":7668},{"style":1063},[7669],{"type":998,"value":7670},": If birthday already passed this year, use next year\n",{"type":993,"tag":1034,"props":7672,"children":7673},{"class":1036,"line":81},[7674,7678,7682],{"type":993,"tag":1034,"props":7675,"children":7676},{"style":1063},[7677],{"type":998,"value":7612},{"type":993,"tag":1034,"props":7679,"children":7680},{"style":1040},[7681],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7683,"children":7684},{"style":1063},[7685],{"type":998,"value":7686},": Calculate days until birthday\n",{"type":993,"tag":1034,"props":7688,"children":7689},{"class":1036,"line":91},[7690,7694,7698],{"type":993,"tag":1034,"props":7691,"children":7692},{"style":1063},[7693],{"type":998,"value":7612},{"type":993,"tag":1034,"props":7695,"children":7696},{"style":1040},[7697],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7699,"children":7700},{"style":1063},[7701],{"type":998,"value":7702},": Calculate age on next birthday\n",{"type":993,"tag":1034,"props":7704,"children":7705},{"class":1036,"line":100},[7706,7710,7714],{"type":993,"tag":1034,"props":7707,"children":7708},{"style":1063},[7709],{"type":998,"value":7612},{"type":993,"tag":1034,"props":7711,"children":7712},{"style":1040},[7713],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7715,"children":7716},{"style":1063},[7717],{"type":998,"value":7718},": Return the information\n",{"type":993,"tag":1034,"props":7720,"children":7721},{"class":1036,"line":109},[7722],{"type":993,"tag":1034,"props":7723,"children":7724},{"style":1040},[7725],{"type":998,"value":7726},"    pass\n",{"type":993,"tag":1034,"props":7728,"children":7729},{"class":1036,"line":118},[7730],{"type":993,"tag":1034,"props":7731,"children":7732},{"emptyLinePlaceholder":13},[7733],{"type":998,"value":1057},{"type":993,"tag":1034,"props":7735,"children":7736},{"class":1036,"line":127},[7737,7742,7746],{"type":993,"tag":1034,"props":7738,"children":7739},{"style":1063},[7740],{"type":998,"value":7741},"# ",{"type":993,"tag":1034,"props":7743,"children":7744},{"style":1040},[7745],{"type":998,"value":7617},{"type":993,"tag":1034,"props":7747,"children":7748},{"style":1063},[7749],{"type":998,"value":7750},": Test with your birthday\n",{"type":993,"tag":1034,"props":7752,"children":7753},{"class":1036,"line":136},[7754,7759,7763],{"type":993,"tag":1034,"props":7755,"children":7756},{"style":1046},[7757],{"type":998,"value":7758},"birth_year ",{"type":993,"tag":1034,"props":7760,"children":7761},{"style":1040},[7762],{"type":998,"value":1079},{"type":993,"tag":1034,"props":7764,"children":7765},{"style":1090},[7766],{"type":998,"value":7767}," 1990\n",{"type":993,"tag":1034,"props":7769,"children":7770},{"class":1036,"line":146},[7771,7776,7780],{"type":993,"tag":1034,"props":7772,"children":7773},{"style":1046},[7774],{"type":998,"value":7775},"birth_month ",{"type":993,"tag":1034,"props":7777,"children":7778},{"style":1040},[7779],{"type":998,"value":1079},{"type":993,"tag":1034,"props":7781,"children":7782},{"style":1090},[7783],{"type":998,"value":7784}," 6\n",{"type":993,"tag":1034,"props":7786,"children":7787},{"class":1036,"line":155},[7788,7793,7797],{"type":993,"tag":1034,"props":7789,"children":7790},{"style":1046},[7791],{"type":998,"value":7792},"birth_day ",{"type":993,"tag":1034,"props":7794,"children":7795},{"style":1040},[7796],{"type":998,"value":1079},{"type":993,"tag":1034,"props":7798,"children":7799},{"style":1090},[7800],{"type":998,"value":7801}," 15\n",{"type":993,"tag":1034,"props":7803,"children":7804},{"class":1036,"line":164},[7805],{"type":993,"tag":1034,"props":7806,"children":7807},{"emptyLinePlaceholder":13},[7808],{"type":998,"value":1057},{"type":993,"tag":1034,"props":7810,"children":7811},{"class":1036,"line":173},[7812,7817,7821],{"type":993,"tag":1034,"props":7813,"children":7814},{"style":1046},[7815],{"type":998,"value":7816},"result ",{"type":993,"tag":1034,"props":7818,"children":7819},{"style":1040},[7820],{"type":998,"value":1079},{"type":993,"tag":1034,"props":7822,"children":7823},{"style":1046},[7824],{"type":998,"value":7825}," calculate_birthday_info(birth_year, birth_month, birth_day)\n",{"type":993,"tag":1034,"props":7827,"children":7828},{"class":1036,"line":182},[7829,7833,7837,7841,7846,7850,7855,7860,7864,7868,7872],{"type":993,"tag":1034,"props":7830,"children":7831},{"style":1090},[7832],{"type":998,"value":1093},{"type":993,"tag":1034,"props":7834,"children":7835},{"style":1046},[7836],{"type":998,"value":1098},{"type":993,"tag":1034,"props":7838,"children":7839},{"style":1040},[7840],{"type":998,"value":1103},{"type":993,"tag":1034,"props":7842,"children":7843},{"style":1106},[7844],{"type":998,"value":7845},"\"Days until birthday: ",{"type":993,"tag":1034,"props":7847,"children":7848},{"style":1090},[7849],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7851,"children":7852},{"style":1046},[7853],{"type":998,"value":7854},"result[",{"type":993,"tag":1034,"props":7856,"children":7857},{"style":1106},[7858],{"type":998,"value":7859},"'days_until'",{"type":993,"tag":1034,"props":7861,"children":7862},{"style":1046},[7863],{"type":998,"value":5584},{"type":993,"tag":1034,"props":7865,"children":7866},{"style":1090},[7867],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7869,"children":7870},{"style":1106},[7871],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7873,"children":7874},{"style":1046},[7875],{"type":998,"value":1134},{"type":993,"tag":1034,"props":7877,"children":7878},{"class":1036,"line":191},[7879,7883,7887,7891,7896,7900,7904,7909,7913,7917,7921],{"type":993,"tag":1034,"props":7880,"children":7881},{"style":1090},[7882],{"type":998,"value":1093},{"type":993,"tag":1034,"props":7884,"children":7885},{"style":1046},[7886],{"type":998,"value":1098},{"type":993,"tag":1034,"props":7888,"children":7889},{"style":1040},[7890],{"type":998,"value":1103},{"type":993,"tag":1034,"props":7892,"children":7893},{"style":1106},[7894],{"type":998,"value":7895},"\"Age on next birthday: ",{"type":993,"tag":1034,"props":7897,"children":7898},{"style":1090},[7899],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7901,"children":7902},{"style":1046},[7903],{"type":998,"value":7854},{"type":993,"tag":1034,"props":7905,"children":7906},{"style":1106},[7907],{"type":998,"value":7908},"'age_on_birthday'",{"type":993,"tag":1034,"props":7910,"children":7911},{"style":1046},[7912],{"type":998,"value":5584},{"type":993,"tag":1034,"props":7914,"children":7915},{"style":1090},[7916],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7918,"children":7919},{"style":1106},[7920],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7922,"children":7923},{"style":1046},[7924],{"type":998,"value":1134},{"type":993,"tag":1034,"props":7926,"children":7927},{"class":1036,"line":201},[7928,7932,7936,7940,7945,7949,7953,7958,7962,7966,7970],{"type":993,"tag":1034,"props":7929,"children":7930},{"style":1090},[7931],{"type":998,"value":1093},{"type":993,"tag":1034,"props":7933,"children":7934},{"style":1046},[7935],{"type":998,"value":1098},{"type":993,"tag":1034,"props":7937,"children":7938},{"style":1040},[7939],{"type":998,"value":1103},{"type":993,"tag":1034,"props":7941,"children":7942},{"style":1106},[7943],{"type":998,"value":7944},"\"Next birthday: ",{"type":993,"tag":1034,"props":7946,"children":7947},{"style":1090},[7948],{"type":998,"value":1114},{"type":993,"tag":1034,"props":7950,"children":7951},{"style":1046},[7952],{"type":998,"value":7854},{"type":993,"tag":1034,"props":7954,"children":7955},{"style":1106},[7956],{"type":998,"value":7957},"'next_birthday'",{"type":993,"tag":1034,"props":7959,"children":7960},{"style":1046},[7961],{"type":998,"value":5584},{"type":993,"tag":1034,"props":7963,"children":7964},{"style":1090},[7965],{"type":998,"value":1124},{"type":993,"tag":1034,"props":7967,"children":7968},{"style":1106},[7969],{"type":998,"value":1129},{"type":993,"tag":1034,"props":7971,"children":7972},{"style":1046},[7973],{"type":998,"value":1134},{"type":993,"tag":1662,"props":7975,"children":7977},{"id":7976},"solution-and-explanation",[7978],{"type":998,"value":7979},"Solution and Explanation 💡",{"type":993,"tag":7981,"props":7982,"children":7983},"details",{},[7984,7992,8611,8619],{"type":993,"tag":7985,"props":7986,"children":7989},"summary",{"className":7987},[7988],"cursor-pointer",[7990],{"type":998,"value":7991},"Click to see the complete solution",{"type":993,"tag":1021,"props":7993,"children":7994},{},[7995],{"type":993,"tag":1025,"props":7996,"children":7998},{"className":1027,"code":7997,"language":6,"meta":8,"style":8},"import datetime\n\ndef calculate_birthday_info(birth_year, birth_month, birth_day):\n    # Get today's date\n    today = datetime.date.today()\n    \n    # Create your birth date\n    birth_date = datetime.date(birth_year, birth_month, birth_day)\n    \n    # Create this year's birthday\n    this_year_birthday = datetime.date(today.year, birth_month, birth_day)\n    \n    # If birthday already passed this year, use next year\n    if this_year_birthday \u003C today:\n        next_birthday = datetime.date(today.year + 1, birth_month, birth_day)\n    else:\n        next_birthday = this_year_birthday\n    \n    # Calculate days until birthday\n    days_until = (next_birthday - today).days\n    \n    # Calculate age on next birthday\n    age_on_birthday = next_birthday.year - birth_year\n    \n    # Return the information\n    return {\n        'days_until': days_until,\n        'age_on_birthday': age_on_birthday,\n        'next_birthday': next_birthday.strftime(\"%B %d, %Y\")\n    }\n\n# Test with your birthday\nbirth_year = 1990\nbirth_month = 6\nbirth_day = 15\n\nresult = calculate_birthday_info(birth_year, birth_month, birth_day)\nprint(f\"Days until birthday: {result['days_until']}\")\nprint(f\"Age on next birthday: {result['age_on_birthday']}\")\nprint(f\"Next birthday: {result['next_birthday']}\")\n",[7999],{"type":993,"tag":1007,"props":8000,"children":8001},{"__ignoreMap":8},[8002,8013,8020,8035,8043,8059,8066,8074,8091,8098,8106,8123,8130,8138,8159,8189,8201,8217,8224,8232,8258,8265,8273,8299,8306,8314,8325,8338,8351,8380,8388,8395,8403,8418,8433,8448,8455,8470,8517,8564],{"type":993,"tag":1034,"props":8003,"children":8004},{"class":1036,"line":12},[8005,8009],{"type":993,"tag":1034,"props":8006,"children":8007},{"style":1040},[8008],{"type":998,"value":1043},{"type":993,"tag":1034,"props":8010,"children":8011},{"style":1046},[8012],{"type":998,"value":1049},{"type":993,"tag":1034,"props":8014,"children":8015},{"class":1036,"line":27},[8016],{"type":993,"tag":1034,"props":8017,"children":8018},{"emptyLinePlaceholder":13},[8019],{"type":998,"value":1057},{"type":993,"tag":1034,"props":8021,"children":8022},{"class":1036,"line":36},[8023,8027,8031],{"type":993,"tag":1034,"props":8024,"children":8025},{"style":1040},[8026],{"type":998,"value":4561},{"type":993,"tag":1034,"props":8028,"children":8029},{"style":4564},[8030],{"type":998,"value":7599},{"type":993,"tag":1034,"props":8032,"children":8033},{"style":1046},[8034],{"type":998,"value":7604},{"type":993,"tag":1034,"props":8036,"children":8037},{"class":1036,"line":45},[8038],{"type":993,"tag":1034,"props":8039,"children":8040},{"style":1063},[8041],{"type":998,"value":8042},"    # Get today's date\n",{"type":993,"tag":1034,"props":8044,"children":8045},{"class":1036,"line":54},[8046,8051,8055],{"type":993,"tag":1034,"props":8047,"children":8048},{"style":1046},[8049],{"type":998,"value":8050},"    today ",{"type":993,"tag":1034,"props":8052,"children":8053},{"style":1040},[8054],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8056,"children":8057},{"style":1046},[8058],{"type":998,"value":1084},{"type":993,"tag":1034,"props":8060,"children":8061},{"class":1036,"line":63},[8062],{"type":993,"tag":1034,"props":8063,"children":8064},{"style":1046},[8065],{"type":998,"value":4621},{"type":993,"tag":1034,"props":8067,"children":8068},{"class":1036,"line":72},[8069],{"type":993,"tag":1034,"props":8070,"children":8071},{"style":1063},[8072],{"type":998,"value":8073},"    # Create your birth date\n",{"type":993,"tag":1034,"props":8075,"children":8076},{"class":1036,"line":81},[8077,8082,8086],{"type":993,"tag":1034,"props":8078,"children":8079},{"style":1046},[8080],{"type":998,"value":8081},"    birth_date ",{"type":993,"tag":1034,"props":8083,"children":8084},{"style":1040},[8085],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8087,"children":8088},{"style":1046},[8089],{"type":998,"value":8090}," datetime.date(birth_year, birth_month, birth_day)\n",{"type":993,"tag":1034,"props":8092,"children":8093},{"class":1036,"line":91},[8094],{"type":993,"tag":1034,"props":8095,"children":8096},{"style":1046},[8097],{"type":998,"value":4621},{"type":993,"tag":1034,"props":8099,"children":8100},{"class":1036,"line":100},[8101],{"type":993,"tag":1034,"props":8102,"children":8103},{"style":1063},[8104],{"type":998,"value":8105},"    # Create this year's birthday\n",{"type":993,"tag":1034,"props":8107,"children":8108},{"class":1036,"line":109},[8109,8114,8118],{"type":993,"tag":1034,"props":8110,"children":8111},{"style":1046},[8112],{"type":998,"value":8113},"    this_year_birthday ",{"type":993,"tag":1034,"props":8115,"children":8116},{"style":1040},[8117],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8119,"children":8120},{"style":1046},[8121],{"type":998,"value":8122}," datetime.date(today.year, birth_month, birth_day)\n",{"type":993,"tag":1034,"props":8124,"children":8125},{"class":1036,"line":118},[8126],{"type":993,"tag":1034,"props":8127,"children":8128},{"style":1046},[8129],{"type":998,"value":4621},{"type":993,"tag":1034,"props":8131,"children":8132},{"class":1036,"line":127},[8133],{"type":993,"tag":1034,"props":8134,"children":8135},{"style":1063},[8136],{"type":998,"value":8137},"    # If birthday already passed this year, use next year\n",{"type":993,"tag":1034,"props":8139,"children":8140},{"class":1036,"line":136},[8141,8145,8150,8154],{"type":993,"tag":1034,"props":8142,"children":8143},{"style":1040},[8144],{"type":998,"value":4807},{"type":993,"tag":1034,"props":8146,"children":8147},{"style":1046},[8148],{"type":998,"value":8149}," this_year_birthday ",{"type":993,"tag":1034,"props":8151,"children":8152},{"style":1040},[8153],{"type":998,"value":4639},{"type":993,"tag":1034,"props":8155,"children":8156},{"style":1046},[8157],{"type":998,"value":8158}," today:\n",{"type":993,"tag":1034,"props":8160,"children":8161},{"class":1036,"line":146},[8162,8167,8171,8176,8180,8184],{"type":993,"tag":1034,"props":8163,"children":8164},{"style":1046},[8165],{"type":998,"value":8166},"        next_birthday ",{"type":993,"tag":1034,"props":8168,"children":8169},{"style":1040},[8170],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8172,"children":8173},{"style":1046},[8174],{"type":998,"value":8175}," datetime.date(today.year ",{"type":993,"tag":1034,"props":8177,"children":8178},{"style":1040},[8179],{"type":998,"value":3877},{"type":993,"tag":1034,"props":8181,"children":8182},{"style":1090},[8183],{"type":998,"value":5012},{"type":993,"tag":1034,"props":8185,"children":8186},{"style":1046},[8187],{"type":998,"value":8188},", birth_month, birth_day)\n",{"type":993,"tag":1034,"props":8190,"children":8191},{"class":1036,"line":155},[8192,8197],{"type":993,"tag":1034,"props":8193,"children":8194},{"style":1040},[8195],{"type":998,"value":8196},"    else",{"type":993,"tag":1034,"props":8198,"children":8199},{"style":1046},[8200],{"type":998,"value":2847},{"type":993,"tag":1034,"props":8202,"children":8203},{"class":1036,"line":164},[8204,8208,8212],{"type":993,"tag":1034,"props":8205,"children":8206},{"style":1046},[8207],{"type":998,"value":8166},{"type":993,"tag":1034,"props":8209,"children":8210},{"style":1040},[8211],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8213,"children":8214},{"style":1046},[8215],{"type":998,"value":8216}," this_year_birthday\n",{"type":993,"tag":1034,"props":8218,"children":8219},{"class":1036,"line":173},[8220],{"type":993,"tag":1034,"props":8221,"children":8222},{"style":1046},[8223],{"type":998,"value":4621},{"type":993,"tag":1034,"props":8225,"children":8226},{"class":1036,"line":182},[8227],{"type":993,"tag":1034,"props":8228,"children":8229},{"style":1063},[8230],{"type":998,"value":8231},"    # Calculate days until birthday\n",{"type":993,"tag":1034,"props":8233,"children":8234},{"class":1036,"line":191},[8235,8240,8244,8249,8253],{"type":993,"tag":1034,"props":8236,"children":8237},{"style":1046},[8238],{"type":998,"value":8239},"    days_until ",{"type":993,"tag":1034,"props":8241,"children":8242},{"style":1040},[8243],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8245,"children":8246},{"style":1046},[8247],{"type":998,"value":8248}," (next_birthday ",{"type":993,"tag":1034,"props":8250,"children":8251},{"style":1040},[8252],{"type":998,"value":1272},{"type":993,"tag":1034,"props":8254,"children":8255},{"style":1046},[8256],{"type":998,"value":8257}," today).days\n",{"type":993,"tag":1034,"props":8259,"children":8260},{"class":1036,"line":201},[8261],{"type":993,"tag":1034,"props":8262,"children":8263},{"style":1046},[8264],{"type":998,"value":4621},{"type":993,"tag":1034,"props":8266,"children":8267},{"class":1036,"line":210},[8268],{"type":993,"tag":1034,"props":8269,"children":8270},{"style":1063},[8271],{"type":998,"value":8272},"    # Calculate age on next birthday\n",{"type":993,"tag":1034,"props":8274,"children":8275},{"class":1036,"line":219},[8276,8281,8285,8290,8294],{"type":993,"tag":1034,"props":8277,"children":8278},{"style":1046},[8279],{"type":998,"value":8280},"    age_on_birthday ",{"type":993,"tag":1034,"props":8282,"children":8283},{"style":1040},[8284],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8286,"children":8287},{"style":1046},[8288],{"type":998,"value":8289}," next_birthday.year ",{"type":993,"tag":1034,"props":8291,"children":8292},{"style":1040},[8293],{"type":998,"value":1272},{"type":993,"tag":1034,"props":8295,"children":8296},{"style":1046},[8297],{"type":998,"value":8298}," birth_year\n",{"type":993,"tag":1034,"props":8300,"children":8301},{"class":1036,"line":228},[8302],{"type":993,"tag":1034,"props":8303,"children":8304},{"style":1046},[8305],{"type":998,"value":4621},{"type":993,"tag":1034,"props":8307,"children":8308},{"class":1036,"line":238},[8309],{"type":993,"tag":1034,"props":8310,"children":8311},{"style":1063},[8312],{"type":998,"value":8313},"    # Return the information\n",{"type":993,"tag":1034,"props":8315,"children":8316},{"class":1036,"line":247},[8317,8321],{"type":993,"tag":1034,"props":8318,"children":8319},{"style":1040},[8320],{"type":998,"value":4748},{"type":993,"tag":1034,"props":8322,"children":8323},{"style":1046},[8324],{"type":998,"value":5793},{"type":993,"tag":1034,"props":8326,"children":8327},{"class":1036,"line":256},[8328,8333],{"type":993,"tag":1034,"props":8329,"children":8330},{"style":1106},[8331],{"type":998,"value":8332},"        'days_until'",{"type":993,"tag":1034,"props":8334,"children":8335},{"style":1046},[8336],{"type":998,"value":8337},": days_until,\n",{"type":993,"tag":1034,"props":8339,"children":8340},{"class":1036,"line":265},[8341,8346],{"type":993,"tag":1034,"props":8342,"children":8343},{"style":1106},[8344],{"type":998,"value":8345},"        'age_on_birthday'",{"type":993,"tag":1034,"props":8347,"children":8348},{"style":1046},[8349],{"type":998,"value":8350},": age_on_birthday,\n",{"type":993,"tag":1034,"props":8352,"children":8353},{"class":1036,"line":274},[8354,8359,8364,8368,8372,8376],{"type":993,"tag":1034,"props":8355,"children":8356},{"style":1106},[8357],{"type":998,"value":8358},"        'next_birthday'",{"type":993,"tag":1034,"props":8360,"children":8361},{"style":1046},[8362],{"type":998,"value":8363},": next_birthday.strftime(",{"type":993,"tag":1034,"props":8365,"children":8366},{"style":1106},[8367],{"type":998,"value":1428},{"type":993,"tag":1034,"props":8369,"children":8370},{"style":1090},[8371],{"type":998,"value":1433},{"type":993,"tag":1034,"props":8373,"children":8374},{"style":1106},[8375],{"type":998,"value":5909},{"type":993,"tag":1034,"props":8377,"children":8378},{"style":1046},[8379],{"type":998,"value":1134},{"type":993,"tag":1034,"props":8381,"children":8382},{"class":1036,"line":284},[8383],{"type":993,"tag":1034,"props":8384,"children":8385},{"style":1046},[8386],{"type":998,"value":8387},"    }\n",{"type":993,"tag":1034,"props":8389,"children":8390},{"class":1036,"line":293},[8391],{"type":993,"tag":1034,"props":8392,"children":8393},{"emptyLinePlaceholder":13},[8394],{"type":998,"value":1057},{"type":993,"tag":1034,"props":8396,"children":8397},{"class":1036,"line":302},[8398],{"type":993,"tag":1034,"props":8399,"children":8400},{"style":1063},[8401],{"type":998,"value":8402},"# Test with your birthday\n",{"type":993,"tag":1034,"props":8404,"children":8405},{"class":1036,"line":311},[8406,8410,8414],{"type":993,"tag":1034,"props":8407,"children":8408},{"style":1046},[8409],{"type":998,"value":7758},{"type":993,"tag":1034,"props":8411,"children":8412},{"style":1040},[8413],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8415,"children":8416},{"style":1090},[8417],{"type":998,"value":7767},{"type":993,"tag":1034,"props":8419,"children":8420},{"class":1036,"line":320},[8421,8425,8429],{"type":993,"tag":1034,"props":8422,"children":8423},{"style":1046},[8424],{"type":998,"value":7775},{"type":993,"tag":1034,"props":8426,"children":8427},{"style":1040},[8428],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8430,"children":8431},{"style":1090},[8432],{"type":998,"value":7784},{"type":993,"tag":1034,"props":8434,"children":8435},{"class":1036,"line":329},[8436,8440,8444],{"type":993,"tag":1034,"props":8437,"children":8438},{"style":1046},[8439],{"type":998,"value":7792},{"type":993,"tag":1034,"props":8441,"children":8442},{"style":1040},[8443],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8445,"children":8446},{"style":1090},[8447],{"type":998,"value":7801},{"type":993,"tag":1034,"props":8449,"children":8450},{"class":1036,"line":338},[8451],{"type":993,"tag":1034,"props":8452,"children":8453},{"emptyLinePlaceholder":13},[8454],{"type":998,"value":1057},{"type":993,"tag":1034,"props":8456,"children":8457},{"class":1036,"line":347},[8458,8462,8466],{"type":993,"tag":1034,"props":8459,"children":8460},{"style":1046},[8461],{"type":998,"value":7816},{"type":993,"tag":1034,"props":8463,"children":8464},{"style":1040},[8465],{"type":998,"value":1079},{"type":993,"tag":1034,"props":8467,"children":8468},{"style":1046},[8469],{"type":998,"value":7825},{"type":993,"tag":1034,"props":8471,"children":8472},{"class":1036,"line":356},[8473,8477,8481,8485,8489,8493,8497,8501,8505,8509,8513],{"type":993,"tag":1034,"props":8474,"children":8475},{"style":1090},[8476],{"type":998,"value":1093},{"type":993,"tag":1034,"props":8478,"children":8479},{"style":1046},[8480],{"type":998,"value":1098},{"type":993,"tag":1034,"props":8482,"children":8483},{"style":1040},[8484],{"type":998,"value":1103},{"type":993,"tag":1034,"props":8486,"children":8487},{"style":1106},[8488],{"type":998,"value":7845},{"type":993,"tag":1034,"props":8490,"children":8491},{"style":1090},[8492],{"type":998,"value":1114},{"type":993,"tag":1034,"props":8494,"children":8495},{"style":1046},[8496],{"type":998,"value":7854},{"type":993,"tag":1034,"props":8498,"children":8499},{"style":1106},[8500],{"type":998,"value":7859},{"type":993,"tag":1034,"props":8502,"children":8503},{"style":1046},[8504],{"type":998,"value":5584},{"type":993,"tag":1034,"props":8506,"children":8507},{"style":1090},[8508],{"type":998,"value":1124},{"type":993,"tag":1034,"props":8510,"children":8511},{"style":1106},[8512],{"type":998,"value":1129},{"type":993,"tag":1034,"props":8514,"children":8515},{"style":1046},[8516],{"type":998,"value":1134},{"type":993,"tag":1034,"props":8518,"children":8519},{"class":1036,"line":365},[8520,8524,8528,8532,8536,8540,8544,8548,8552,8556,8560],{"type":993,"tag":1034,"props":8521,"children":8522},{"style":1090},[8523],{"type":998,"value":1093},{"type":993,"tag":1034,"props":8525,"children":8526},{"style":1046},[8527],{"type":998,"value":1098},{"type":993,"tag":1034,"props":8529,"children":8530},{"style":1040},[8531],{"type":998,"value":1103},{"type":993,"tag":1034,"props":8533,"children":8534},{"style":1106},[8535],{"type":998,"value":7895},{"type":993,"tag":1034,"props":8537,"children":8538},{"style":1090},[8539],{"type":998,"value":1114},{"type":993,"tag":1034,"props":8541,"children":8542},{"style":1046},[8543],{"type":998,"value":7854},{"type":993,"tag":1034,"props":8545,"children":8546},{"style":1106},[8547],{"type":998,"value":7908},{"type":993,"tag":1034,"props":8549,"children":8550},{"style":1046},[8551],{"type":998,"value":5584},{"type":993,"tag":1034,"props":8553,"children":8554},{"style":1090},[8555],{"type":998,"value":1124},{"type":993,"tag":1034,"props":8557,"children":8558},{"style":1106},[8559],{"type":998,"value":1129},{"type":993,"tag":1034,"props":8561,"children":8562},{"style":1046},[8563],{"type":998,"value":1134},{"type":993,"tag":1034,"props":8565,"children":8566},{"class":1036,"line":374},[8567,8571,8575,8579,8583,8587,8591,8595,8599,8603,8607],{"type":993,"tag":1034,"props":8568,"children":8569},{"style":1090},[8570],{"type":998,"value":1093},{"type":993,"tag":1034,"props":8572,"children":8573},{"style":1046},[8574],{"type":998,"value":1098},{"type":993,"tag":1034,"props":8576,"children":8577},{"style":1040},[8578],{"type":998,"value":1103},{"type":993,"tag":1034,"props":8580,"children":8581},{"style":1106},[8582],{"type":998,"value":7944},{"type":993,"tag":1034,"props":8584,"children":8585},{"style":1090},[8586],{"type":998,"value":1114},{"type":993,"tag":1034,"props":8588,"children":8589},{"style":1046},[8590],{"type":998,"value":7854},{"type":993,"tag":1034,"props":8592,"children":8593},{"style":1106},[8594],{"type":998,"value":7957},{"type":993,"tag":1034,"props":8596,"children":8597},{"style":1046},[8598],{"type":998,"value":5584},{"type":993,"tag":1034,"props":8600,"children":8601},{"style":1090},[8602],{"type":998,"value":1124},{"type":993,"tag":1034,"props":8604,"children":8605},{"style":1106},[8606],{"type":998,"value":1129},{"type":993,"tag":1034,"props":8608,"children":8609},{"style":1046},[8610],{"type":998,"value":1134},{"type":993,"tag":1001,"props":8612,"children":8613},{},[8614],{"type":993,"tag":1507,"props":8615,"children":8616},{},[8617],{"type":998,"value":8618},"Key Learning Points:",{"type":993,"tag":1513,"props":8620,"children":8621},{},[8622,8634,8645,8656,8667],{"type":993,"tag":1517,"props":8623,"children":8624},{},[8625,8627,8632],{"type":998,"value":8626},"📌 ",{"type":993,"tag":1507,"props":8628,"children":8629},{},[8630],{"type":998,"value":8631},"datetime.date.today()",{"type":998,"value":8633},": Gets current date without time information",{"type":993,"tag":1517,"props":8635,"children":8636},{},[8637,8638,8643],{"type":998,"value":8626},{"type":993,"tag":1507,"props":8639,"children":8640},{},[8641],{"type":998,"value":8642},"datetime.date()",{"type":998,"value":8644},": Creates specific dates with year, month, day",{"type":993,"tag":1517,"props":8646,"children":8647},{},[8648,8649,8654],{"type":998,"value":8626},{"type":993,"tag":1507,"props":8650,"children":8651},{},[8652],{"type":998,"value":8653},"Date arithmetic",{"type":998,"value":8655},": Subtract dates to get timedelta objects",{"type":993,"tag":1517,"props":8657,"children":8658},{},[8659,8660,8665],{"type":998,"value":8626},{"type":993,"tag":1507,"props":8661,"children":8662},{},[8663],{"type":998,"value":8664},"Date comparison",{"type":998,"value":8666},": Use \u003C, >, == to compare dates",{"type":993,"tag":1517,"props":8668,"children":8669},{},[8670,8671,8675],{"type":998,"value":8626},{"type":993,"tag":1507,"props":8672,"children":8673},{},[8674],{"type":998,"value":5677},{"type":998,"value":8676},": Format dates as readable strings",{"type":993,"tag":1001,"props":8678,"children":8679},{},[8680,8682,8688],{"type":998,"value":8681},"Learn more about ",{"type":993,"tag":8683,"props":8684,"children":8685},"a",{"href":754},[8686],{"type":998,"value":8687},"mathematical operations",{"type":998,"value":8689}," to perform calculations with your date-based data.",{"type":993,"tag":1485,"props":8691,"children":8693},{"id":8692},"essential-date-methods-and-functions",[8694],{"type":998,"value":8695},"Essential Date Methods and Functions",{"type":993,"tag":1001,"props":8697,"children":8698},{},[8699],{"type":998,"value":8700},"Understanding the most commonly used date methods helps you work efficiently with temporal data.",{"type":993,"tag":8702,"props":8703,"children":8704},"table",{},[8705,8734],{"type":993,"tag":8706,"props":8707,"children":8708},"thead",{},[8709],{"type":993,"tag":8710,"props":8711,"children":8712},"tr",{},[8713,8719,8724,8729],{"type":993,"tag":8714,"props":8715,"children":8716},"th",{},[8717],{"type":998,"value":8718},"Method/Function",{"type":993,"tag":8714,"props":8720,"children":8721},{},[8722],{"type":998,"value":8723},"Purpose",{"type":993,"tag":8714,"props":8725,"children":8726},{},[8727],{"type":998,"value":8728},"Example",{"type":993,"tag":8714,"props":8730,"children":8731},{},[8732],{"type":998,"value":8733},"Result",{"type":993,"tag":8735,"props":8736,"children":8737},"tbody",{},[8738,8773,8808,8841,8871,8905,8941,8972],{"type":993,"tag":8710,"props":8739,"children":8740},{},[8741,8751,8756,8764],{"type":993,"tag":8742,"props":8743,"children":8744},"td",{},[8745],{"type":993,"tag":1007,"props":8746,"children":8748},{"className":8747},[],[8749],{"type":998,"value":8750},"date.today()",{"type":993,"tag":8742,"props":8752,"children":8753},{},[8754],{"type":998,"value":8755},"Get current date",{"type":993,"tag":8742,"props":8757,"children":8758},{},[8759],{"type":993,"tag":1007,"props":8760,"children":8762},{"className":8761},[],[8763],{"type":998,"value":8631},{"type":993,"tag":8742,"props":8765,"children":8766},{},[8767],{"type":993,"tag":1007,"props":8768,"children":8770},{"className":8769},[],[8771],{"type":998,"value":8772},"2024-03-15",{"type":993,"tag":8710,"props":8774,"children":8775},{},[8776,8785,8790,8799],{"type":993,"tag":8742,"props":8777,"children":8778},{},[8779],{"type":993,"tag":1007,"props":8780,"children":8782},{"className":8781},[],[8783],{"type":998,"value":8784},"datetime.now()",{"type":993,"tag":8742,"props":8786,"children":8787},{},[8788],{"type":998,"value":8789},"Get current datetime",{"type":993,"tag":8742,"props":8791,"children":8792},{},[8793],{"type":993,"tag":1007,"props":8794,"children":8796},{"className":8795},[],[8797],{"type":998,"value":8798},"datetime.datetime.now()",{"type":993,"tag":8742,"props":8800,"children":8801},{},[8802],{"type":993,"tag":1007,"props":8803,"children":8805},{"className":8804},[],[8806],{"type":998,"value":8807},"2024-03-15 14:30:25",{"type":993,"tag":8710,"props":8809,"children":8810},{},[8811,8819,8824,8833],{"type":993,"tag":8742,"props":8812,"children":8813},{},[8814],{"type":993,"tag":1007,"props":8815,"children":8817},{"className":8816},[],[8818],{"type":998,"value":5677},{"type":993,"tag":8742,"props":8820,"children":8821},{},[8822],{"type":998,"value":8823},"Format date as string",{"type":993,"tag":8742,"props":8825,"children":8826},{},[8827],{"type":993,"tag":1007,"props":8828,"children":8830},{"className":8829},[],[8831],{"type":998,"value":8832},"date.strftime(\"%B %d, %Y\")",{"type":993,"tag":8742,"props":8834,"children":8835},{},[8836],{"type":993,"tag":1007,"props":8837,"children":8839},{"className":8838},[],[8840],{"type":998,"value":6553},{"type":993,"tag":8710,"props":8842,"children":8843},{},[8844,8852,8857,8866],{"type":993,"tag":8742,"props":8845,"children":8846},{},[8847],{"type":993,"tag":1007,"props":8848,"children":8850},{"className":8849},[],[8851],{"type":998,"value":6387},{"type":993,"tag":8742,"props":8853,"children":8854},{},[8855],{"type":998,"value":8856},"Parse string to date",{"type":993,"tag":8742,"props":8858,"children":8859},{},[8860],{"type":993,"tag":1007,"props":8861,"children":8863},{"className":8862},[],[8864],{"type":998,"value":8865},"datetime.strptime(\"2024-03-15\", \"%Y-%m-%d\")",{"type":993,"tag":8742,"props":8867,"children":8868},{},[8869],{"type":998,"value":8870},"datetime object",{"type":993,"tag":8710,"props":8872,"children":8873},{},[8874,8883,8888,8897],{"type":993,"tag":8742,"props":8875,"children":8876},{},[8877],{"type":993,"tag":1007,"props":8878,"children":8880},{"className":8879},[],[8881],{"type":998,"value":8882},"isoformat()",{"type":993,"tag":8742,"props":8884,"children":8885},{},[8886],{"type":998,"value":8887},"ISO 8601 format",{"type":993,"tag":8742,"props":8889,"children":8890},{},[8891],{"type":993,"tag":1007,"props":8892,"children":8894},{"className":8893},[],[8895],{"type":998,"value":8896},"date.isoformat()",{"type":993,"tag":8742,"props":8898,"children":8899},{},[8900],{"type":993,"tag":1007,"props":8901,"children":8903},{"className":8902},[],[8904],{"type":998,"value":6455},{"type":993,"tag":8710,"props":8906,"children":8907},{},[8908,8917,8922,8931],{"type":993,"tag":8742,"props":8909,"children":8910},{},[8911],{"type":993,"tag":1007,"props":8912,"children":8914},{"className":8913},[],[8915],{"type":998,"value":8916},"weekday()",{"type":993,"tag":8742,"props":8918,"children":8919},{},[8920],{"type":998,"value":8921},"Day of week (0=Mon)",{"type":993,"tag":8742,"props":8923,"children":8924},{},[8925],{"type":993,"tag":1007,"props":8926,"children":8928},{"className":8927},[],[8929],{"type":998,"value":8930},"date.weekday()",{"type":993,"tag":8742,"props":8932,"children":8933},{},[8934,8939],{"type":993,"tag":1007,"props":8935,"children":8937},{"className":8936},[],[8938],{"type":998,"value":1858},{"type":998,"value":8940}," (Friday)",{"type":993,"tag":8710,"props":8942,"children":8943},{},[8944,8953,8958,8967],{"type":993,"tag":8742,"props":8945,"children":8946},{},[8947],{"type":993,"tag":1007,"props":8948,"children":8950},{"className":8949},[],[8951],{"type":998,"value":8952},"replace()",{"type":993,"tag":8742,"props":8954,"children":8955},{},[8956],{"type":998,"value":8957},"Create new date with changes",{"type":993,"tag":8742,"props":8959,"children":8960},{},[8961],{"type":993,"tag":1007,"props":8962,"children":8964},{"className":8963},[],[8965],{"type":998,"value":8966},"date.replace(year=2025)",{"type":993,"tag":8742,"props":8968,"children":8969},{},[8970],{"type":998,"value":8971},"Modified date",{"type":993,"tag":8710,"props":8973,"children":8974},{},[8975,8984,8989,8998],{"type":993,"tag":8742,"props":8976,"children":8977},{},[8978],{"type":993,"tag":1007,"props":8979,"children":8981},{"className":8980},[],[8982],{"type":998,"value":8983},"timedelta()",{"type":993,"tag":8742,"props":8985,"children":8986},{},[8987],{"type":998,"value":8988},"Create duration",{"type":993,"tag":8742,"props":8990,"children":8991},{},[8992],{"type":993,"tag":1007,"props":8993,"children":8995},{"className":8994},[],[8996],{"type":998,"value":8997},"timedelta(days=7)",{"type":993,"tag":8742,"props":8999,"children":9000},{},[9001],{"type":998,"value":9002},"7-day duration",{"type":993,"tag":1485,"props":9004,"children":9006},{"id":9005},"test-your-knowledge",[9007],{"type":998,"value":9008},"Test Your Knowledge",{"type":993,"tag":1001,"props":9010,"children":9011},{},[9012],{"type":998,"value":9013},"Test what you've learned about working with dates:",{"type":993,"tag":9015,"props":9016,"children":9020},"redirect-button",{"icon":9017,"label":9018,"url":9019},"pi pi-send","Take Quiz","/tutorial-quiz/python/working-with-dates",[],{"type":993,"tag":1485,"props":9022,"children":9024},{"id":9023},"whats-next",[9025],{"type":998,"value":9026},"What's Next?",{"type":993,"tag":1001,"props":9028,"children":9029},{},[9030],{"type":998,"value":9031},"Now that you can handle dates and times effectively, you're ready to explore mathematical operations. Learn how to perform complex calculations, statistical analysis, and scientific computing to complement your date handling skills.",{"type":993,"tag":1001,"props":9033,"children":9034},{},[9035,9037,9041],{"type":998,"value":9036},"Ready to continue? Check out our lesson on ",{"type":993,"tag":8683,"props":9038,"children":9039},{"href":754},[9040],{"type":998,"value":755},{"type":998,"value":9042},".",{"type":993,"tag":9044,"props":9045,"children":9046},"style",{},[9047],{"type":998,"value":9048},"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":9050},[9051,9056,9060,9065,9066,9067],{"id":1487,"depth":27,"text":1490,"children":9052},[9053,9054,9055],{"id":1664,"depth":36,"text":1667},{"id":2247,"depth":36,"text":2250},{"id":2870,"depth":36,"text":2873},{"id":3506,"depth":27,"text":3509,"children":9057},[9058,9059],{"id":3517,"depth":36,"text":3520},{"id":4517,"depth":36,"text":4520},{"id":5652,"depth":27,"text":5655,"children":9061},[9062,9063,9064],{"id":5663,"depth":36,"text":5666},{"id":6374,"depth":36,"text":6377},{"id":7976,"depth":36,"text":7979},{"id":8692,"depth":27,"text":8695},{"id":9005,"depth":27,"text":9008},{"id":9023,"depth":27,"text":9026},1782373748630]