[{"data":1,"prerenderedAt":2454},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/date-and-time":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_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-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","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-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_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-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_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-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_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-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_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-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_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-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_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-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[285],{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"body":602,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20},{"type":603,"children":604,"toc":2444},"root",[605,614,629,634,976,983,988,1054,1204,1210,1215,1285,1291,1298,1668,1674,1825,1831,1836,2300,2306,2311,2380,2433,2438],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"date-and-time-operations",[611],{"type":612,"value":613},"text","📅 Date and Time Operations",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618,620,627],{"type":612,"value":619},"Working with dates and times is essential in programming - from logging events to scheduling tasks, calculating durations, and handling time zones. Python's ",{"type":606,"tag":621,"props":622,"children":624},"code",{"className":623},[],[625],{"type":612,"value":626},"datetime",{"type":612,"value":628}," module provides powerful tools for all your temporal needs.",{"type":606,"tag":615,"props":630,"children":631},{},[632],{"type":612,"value":633},"Whether you're building a calendar app, processing timestamps, or handling international time zones, Python makes date and time operations intuitive and reliable.",{"type":606,"tag":635,"props":636,"children":637},"code-try",{},[638],{"type":606,"tag":639,"props":640,"children":644},"pre",{"className":641,"code":642,"language":643,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","from datetime import datetime, date, time\n\n# Current date and time\nnow = datetime.now()\ntoday = date.today()\ncurrent_time = time()\n\nprint(f\"Current datetime: {now}\")\nprint(f\"Today's date: {today}\")\nprint(f\"Current time: {current_time}\")\n\n# Formatting dates\nformatted = now.strftime(\"%Y-%m-%d %H:%M:%S\")\nprint(f\"Formatted: {formatted}\")\n","python",[645],{"type":606,"tag":621,"props":646,"children":647},{"__ignoreMap":8},[648,675,683,692,710,727,744,751,801,843,884,891,899,935],{"type":606,"tag":649,"props":650,"children":652},"span",{"class":651,"line":12},"line",[653,659,665,670],{"type":606,"tag":649,"props":654,"children":656},{"style":655},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[657],{"type":612,"value":658},"from",{"type":606,"tag":649,"props":660,"children":662},{"style":661},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[663],{"type":612,"value":664}," datetime ",{"type":606,"tag":649,"props":666,"children":667},{"style":655},[668],{"type":612,"value":669},"import",{"type":606,"tag":649,"props":671,"children":672},{"style":661},[673],{"type":612,"value":674}," datetime, date, time\n",{"type":606,"tag":649,"props":676,"children":677},{"class":651,"line":27},[678],{"type":606,"tag":649,"props":679,"children":680},{"emptyLinePlaceholder":13},[681],{"type":612,"value":682},"\n",{"type":606,"tag":649,"props":684,"children":685},{"class":651,"line":36},[686],{"type":606,"tag":649,"props":687,"children":689},{"style":688},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[690],{"type":612,"value":691},"# Current date and time\n",{"type":606,"tag":649,"props":693,"children":694},{"class":651,"line":45},[695,700,705],{"type":606,"tag":649,"props":696,"children":697},{"style":661},[698],{"type":612,"value":699},"now ",{"type":606,"tag":649,"props":701,"children":702},{"style":655},[703],{"type":612,"value":704},"=",{"type":606,"tag":649,"props":706,"children":707},{"style":661},[708],{"type":612,"value":709}," datetime.now()\n",{"type":606,"tag":649,"props":711,"children":712},{"class":651,"line":54},[713,718,722],{"type":606,"tag":649,"props":714,"children":715},{"style":661},[716],{"type":612,"value":717},"today ",{"type":606,"tag":649,"props":719,"children":720},{"style":655},[721],{"type":612,"value":704},{"type":606,"tag":649,"props":723,"children":724},{"style":661},[725],{"type":612,"value":726}," date.today()\n",{"type":606,"tag":649,"props":728,"children":729},{"class":651,"line":63},[730,735,739],{"type":606,"tag":649,"props":731,"children":732},{"style":661},[733],{"type":612,"value":734},"current_time ",{"type":606,"tag":649,"props":736,"children":737},{"style":655},[738],{"type":612,"value":704},{"type":606,"tag":649,"props":740,"children":741},{"style":661},[742],{"type":612,"value":743}," time()\n",{"type":606,"tag":649,"props":745,"children":746},{"class":651,"line":72},[747],{"type":606,"tag":649,"props":748,"children":749},{"emptyLinePlaceholder":13},[750],{"type":612,"value":682},{"type":606,"tag":649,"props":752,"children":753},{"class":651,"line":81},[754,760,765,770,776,781,786,791,796],{"type":606,"tag":649,"props":755,"children":757},{"style":756},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[758],{"type":612,"value":759},"print",{"type":606,"tag":649,"props":761,"children":762},{"style":661},[763],{"type":612,"value":764},"(",{"type":606,"tag":649,"props":766,"children":767},{"style":655},[768],{"type":612,"value":769},"f",{"type":606,"tag":649,"props":771,"children":773},{"style":772},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[774],{"type":612,"value":775},"\"Current datetime: ",{"type":606,"tag":649,"props":777,"children":778},{"style":756},[779],{"type":612,"value":780},"{",{"type":606,"tag":649,"props":782,"children":783},{"style":661},[784],{"type":612,"value":785},"now",{"type":606,"tag":649,"props":787,"children":788},{"style":756},[789],{"type":612,"value":790},"}",{"type":606,"tag":649,"props":792,"children":793},{"style":772},[794],{"type":612,"value":795},"\"",{"type":606,"tag":649,"props":797,"children":798},{"style":661},[799],{"type":612,"value":800},")\n",{"type":606,"tag":649,"props":802,"children":804},{"class":651,"line":803},9,[805,809,813,817,822,826,831,835,839],{"type":606,"tag":649,"props":806,"children":807},{"style":756},[808],{"type":612,"value":759},{"type":606,"tag":649,"props":810,"children":811},{"style":661},[812],{"type":612,"value":764},{"type":606,"tag":649,"props":814,"children":815},{"style":655},[816],{"type":612,"value":769},{"type":606,"tag":649,"props":818,"children":819},{"style":772},[820],{"type":612,"value":821},"\"Today's date: ",{"type":606,"tag":649,"props":823,"children":824},{"style":756},[825],{"type":612,"value":780},{"type":606,"tag":649,"props":827,"children":828},{"style":661},[829],{"type":612,"value":830},"today",{"type":606,"tag":649,"props":832,"children":833},{"style":756},[834],{"type":612,"value":790},{"type":606,"tag":649,"props":836,"children":837},{"style":772},[838],{"type":612,"value":795},{"type":606,"tag":649,"props":840,"children":841},{"style":661},[842],{"type":612,"value":800},{"type":606,"tag":649,"props":844,"children":845},{"class":651,"line":99},[846,850,854,858,863,867,872,876,880],{"type":606,"tag":649,"props":847,"children":848},{"style":756},[849],{"type":612,"value":759},{"type":606,"tag":649,"props":851,"children":852},{"style":661},[853],{"type":612,"value":764},{"type":606,"tag":649,"props":855,"children":856},{"style":655},[857],{"type":612,"value":769},{"type":606,"tag":649,"props":859,"children":860},{"style":772},[861],{"type":612,"value":862},"\"Current time: ",{"type":606,"tag":649,"props":864,"children":865},{"style":756},[866],{"type":612,"value":780},{"type":606,"tag":649,"props":868,"children":869},{"style":661},[870],{"type":612,"value":871},"current_time",{"type":606,"tag":649,"props":873,"children":874},{"style":756},[875],{"type":612,"value":790},{"type":606,"tag":649,"props":877,"children":878},{"style":772},[879],{"type":612,"value":795},{"type":606,"tag":649,"props":881,"children":882},{"style":661},[883],{"type":612,"value":800},{"type":606,"tag":649,"props":885,"children":886},{"class":651,"line":108},[887],{"type":606,"tag":649,"props":888,"children":889},{"emptyLinePlaceholder":13},[890],{"type":612,"value":682},{"type":606,"tag":649,"props":892,"children":893},{"class":651,"line":117},[894],{"type":606,"tag":649,"props":895,"children":896},{"style":688},[897],{"type":612,"value":898},"# Formatting dates\n",{"type":606,"tag":649,"props":900,"children":901},{"class":651,"line":126},[902,907,911,916,921,926,931],{"type":606,"tag":649,"props":903,"children":904},{"style":661},[905],{"type":612,"value":906},"formatted ",{"type":606,"tag":649,"props":908,"children":909},{"style":655},[910],{"type":612,"value":704},{"type":606,"tag":649,"props":912,"children":913},{"style":661},[914],{"type":612,"value":915}," now.strftime(",{"type":606,"tag":649,"props":917,"children":918},{"style":772},[919],{"type":612,"value":920},"\"%Y-%m-",{"type":606,"tag":649,"props":922,"children":923},{"style":756},[924],{"type":612,"value":925},"%d",{"type":606,"tag":649,"props":927,"children":928},{"style":772},[929],{"type":612,"value":930}," %H:%M:%S\"",{"type":606,"tag":649,"props":932,"children":933},{"style":661},[934],{"type":612,"value":800},{"type":606,"tag":649,"props":936,"children":937},{"class":651,"line":135},[938,942,946,950,955,959,964,968,972],{"type":606,"tag":649,"props":939,"children":940},{"style":756},[941],{"type":612,"value":759},{"type":606,"tag":649,"props":943,"children":944},{"style":661},[945],{"type":612,"value":764},{"type":606,"tag":649,"props":947,"children":948},{"style":655},[949],{"type":612,"value":769},{"type":606,"tag":649,"props":951,"children":952},{"style":772},[953],{"type":612,"value":954},"\"Formatted: ",{"type":606,"tag":649,"props":956,"children":957},{"style":756},[958],{"type":612,"value":780},{"type":606,"tag":649,"props":960,"children":961},{"style":661},[962],{"type":612,"value":963},"formatted",{"type":606,"tag":649,"props":965,"children":966},{"style":756},[967],{"type":612,"value":790},{"type":606,"tag":649,"props":969,"children":970},{"style":772},[971],{"type":612,"value":795},{"type":606,"tag":649,"props":973,"children":974},{"style":661},[975],{"type":612,"value":800},{"type":606,"tag":977,"props":978,"children":980},"h2",{"id":979},"why-date-and-time-matter",[981],{"type":612,"value":982},"🎯 Why Date and Time Matter",{"type":606,"tag":615,"props":984,"children":985},{},[986],{"type":612,"value":987},"Date and time operations are crucial for:",{"type":606,"tag":989,"props":990,"children":991},"ul",{},[992,1004,1014,1024,1034,1044],{"type":606,"tag":993,"props":994,"children":995},"li",{},[996,1002],{"type":606,"tag":997,"props":998,"children":999},"strong",{},[1000],{"type":612,"value":1001},"Event Tracking",{"type":612,"value":1003}," 📊: Log when things happen",{"type":606,"tag":993,"props":1005,"children":1006},{},[1007,1012],{"type":606,"tag":997,"props":1008,"children":1009},{},[1010],{"type":612,"value":1011},"Scheduling",{"type":612,"value":1013}," ⏰: Plan future activities",{"type":606,"tag":993,"props":1015,"children":1016},{},[1017,1022],{"type":606,"tag":997,"props":1018,"children":1019},{},[1020],{"type":612,"value":1021},"Duration Calculations",{"type":612,"value":1023}," ⏱️: Measure time differences",{"type":606,"tag":993,"props":1025,"children":1026},{},[1027,1032],{"type":606,"tag":997,"props":1028,"children":1029},{},[1030],{"type":612,"value":1031},"Time Zones",{"type":612,"value":1033}," 🌍: Handle global applications",{"type":606,"tag":993,"props":1035,"children":1036},{},[1037,1042],{"type":606,"tag":997,"props":1038,"children":1039},{},[1040],{"type":612,"value":1041},"Data Analysis",{"type":612,"value":1043}," 📈: Process time-series data",{"type":606,"tag":993,"props":1045,"children":1046},{},[1047,1052],{"type":606,"tag":997,"props":1048,"children":1049},{},[1050],{"type":612,"value":1051},"User Interfaces",{"type":612,"value":1053}," 🖥️: Display human-readable dates",{"type":606,"tag":1055,"props":1056,"children":1060},"info-box",{"emoji":1057,"title":1058,"type":1059},"📦","Python's Date/Time Toolkit","info",[1061,1069,1115,1123,1168,1176],{"type":606,"tag":615,"props":1062,"children":1063},{},[1064],{"type":606,"tag":997,"props":1065,"children":1066},{},[1067],{"type":612,"value":1068},"Core Modules:",{"type":606,"tag":989,"props":1070,"children":1071},{},[1072,1082,1093,1104],{"type":606,"tag":993,"props":1073,"children":1074},{},[1075,1080],{"type":606,"tag":621,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":612,"value":626},{"type":612,"value":1081},": Main date/time classes",{"type":606,"tag":993,"props":1083,"children":1084},{},[1085,1091],{"type":606,"tag":621,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":612,"value":1090},"time",{"type":612,"value":1092},": Time-related functions",{"type":606,"tag":993,"props":1094,"children":1095},{},[1096,1102],{"type":606,"tag":621,"props":1097,"children":1099},{"className":1098},[],[1100],{"type":612,"value":1101},"calendar",{"type":612,"value":1103},": Calendar utilities",{"type":606,"tag":993,"props":1105,"children":1106},{},[1107,1113],{"type":606,"tag":621,"props":1108,"children":1110},{"className":1109},[],[1111],{"type":612,"value":1112},"zoneinfo",{"type":612,"value":1114},": Time zone support (Python 3.9+)",{"type":606,"tag":615,"props":1116,"children":1117},{},[1118],{"type":606,"tag":997,"props":1119,"children":1120},{},[1121],{"type":612,"value":1122},"Key Classes:",{"type":606,"tag":989,"props":1124,"children":1125},{},[1126,1136,1147,1157],{"type":606,"tag":993,"props":1127,"children":1128},{},[1129,1134],{"type":606,"tag":621,"props":1130,"children":1132},{"className":1131},[],[1133],{"type":612,"value":626},{"type":612,"value":1135},": Date and time combined",{"type":606,"tag":993,"props":1137,"children":1138},{},[1139,1145],{"type":606,"tag":621,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":612,"value":1144},"date",{"type":612,"value":1146},": Date only (year, month, day)",{"type":606,"tag":993,"props":1148,"children":1149},{},[1150,1155],{"type":606,"tag":621,"props":1151,"children":1153},{"className":1152},[],[1154],{"type":612,"value":1090},{"type":612,"value":1156},": Time only (hour, minute, second)",{"type":606,"tag":993,"props":1158,"children":1159},{},[1160,1166],{"type":606,"tag":621,"props":1161,"children":1163},{"className":1162},[],[1164],{"type":612,"value":1165},"timedelta",{"type":612,"value":1167},": Duration/difference",{"type":606,"tag":615,"props":1169,"children":1170},{},[1171],{"type":606,"tag":997,"props":1172,"children":1173},{},[1174],{"type":612,"value":1175},"Common Operations:",{"type":606,"tag":989,"props":1177,"children":1178},{},[1179,1184,1189,1194,1199],{"type":606,"tag":993,"props":1180,"children":1181},{},[1182],{"type":612,"value":1183},"Get current date/time",{"type":606,"tag":993,"props":1185,"children":1186},{},[1187],{"type":612,"value":1188},"Format for display",{"type":606,"tag":993,"props":1190,"children":1191},{},[1192],{"type":612,"value":1193},"Parse from strings",{"type":606,"tag":993,"props":1195,"children":1196},{},[1197],{"type":612,"value":1198},"Calculate differences",{"type":606,"tag":993,"props":1200,"children":1201},{},[1202],{"type":612,"value":1203},"Handle time zones",{"type":606,"tag":977,"props":1205,"children":1207},{"id":1206},"date-and-time-topics",[1208],{"type":612,"value":1209},"📚 Date and Time Topics",{"type":606,"tag":615,"props":1211,"children":1212},{},[1213],{"type":612,"value":1214},"This section covers everything you need for date and time operations:",{"type":606,"tag":989,"props":1216,"children":1217},{},[1218,1230,1241,1252,1263,1274],{"type":606,"tag":993,"props":1219,"children":1220},{},[1221,1223,1228],{"type":612,"value":1222},"🕐 ",{"type":606,"tag":1224,"props":1225,"children":1226},"a",{"href":298},[1227],{"type":612,"value":299},{"type":612,"value":1229}," Learn to retrieve current dates, times, and timestamps for your applications.",{"type":606,"tag":993,"props":1231,"children":1232},{},[1233,1235,1239],{"type":612,"value":1234},"🎨 ",{"type":606,"tag":1224,"props":1236,"children":1237},{"href":307},[1238],{"type":612,"value":308},{"type":612,"value":1240}," Master date formatting for user displays and data output.",{"type":606,"tag":993,"props":1242,"children":1243},{},[1244,1246,1250],{"type":612,"value":1245},"⏱️ ",{"type":606,"tag":1224,"props":1247,"children":1248},{"href":316},[1249],{"type":612,"value":317},{"type":612,"value":1251}," Compute time spans, durations, and intervals between dates.",{"type":606,"tag":993,"props":1253,"children":1254},{},[1255,1257,1261],{"type":612,"value":1256},"📝 ",{"type":606,"tag":1224,"props":1258,"children":1259},{"href":325},[1260],{"type":612,"value":326},{"type":612,"value":1262}," Convert text dates into Python datetime objects.",{"type":606,"tag":993,"props":1264,"children":1265},{},[1266,1268,1272],{"type":612,"value":1267},"🌍 ",{"type":606,"tag":1224,"props":1269,"children":1270},{"href":334},[1271],{"type":612,"value":335},{"type":612,"value":1273}," Work with international time zones and UTC conversions.",{"type":606,"tag":993,"props":1275,"children":1276},{},[1277,1279,1283],{"type":612,"value":1278},"🔢 ",{"type":606,"tag":1224,"props":1280,"children":1281},{"href":343},[1282],{"type":612,"value":344},{"type":612,"value":1284}," Convert between datetime objects and Unix timestamps.",{"type":606,"tag":977,"props":1286,"children":1288},{"id":1287},"datetime-reference-tables",[1289],{"type":612,"value":1290},"📊 Date/Time Reference Tables",{"type":606,"tag":1292,"props":1293,"children":1295},"h3",{"id":1294},"common-format-codes",[1296],{"type":612,"value":1297},"Common Format Codes",{"type":606,"tag":1299,"props":1300,"children":1301},"table",{},[1302,1326],{"type":606,"tag":1303,"props":1304,"children":1305},"thead",{},[1306],{"type":606,"tag":1307,"props":1308,"children":1309},"tr",{},[1310,1316,1321],{"type":606,"tag":1311,"props":1312,"children":1313},"th",{},[1314],{"type":612,"value":1315},"Code",{"type":606,"tag":1311,"props":1317,"children":1318},{},[1319],{"type":612,"value":1320},"Meaning",{"type":606,"tag":1311,"props":1322,"children":1323},{},[1324],{"type":612,"value":1325},"Example",{"type":606,"tag":1327,"props":1328,"children":1329},"tbody",{},[1330,1357,1383,1409,1435,1461,1486,1512,1538,1564,1590,1616,1642],{"type":606,"tag":1307,"props":1331,"children":1332},{},[1333,1343,1348],{"type":606,"tag":1334,"props":1335,"children":1336},"td",{},[1337],{"type":606,"tag":621,"props":1338,"children":1340},{"className":1339},[],[1341],{"type":612,"value":1342},"%Y",{"type":606,"tag":1334,"props":1344,"children":1345},{},[1346],{"type":612,"value":1347},"4-digit year",{"type":606,"tag":1334,"props":1349,"children":1350},{},[1351],{"type":606,"tag":621,"props":1352,"children":1354},{"className":1353},[],[1355],{"type":612,"value":1356},"2024",{"type":606,"tag":1307,"props":1358,"children":1359},{},[1360,1369,1374],{"type":606,"tag":1334,"props":1361,"children":1362},{},[1363],{"type":606,"tag":621,"props":1364,"children":1366},{"className":1365},[],[1367],{"type":612,"value":1368},"%y",{"type":606,"tag":1334,"props":1370,"children":1371},{},[1372],{"type":612,"value":1373},"2-digit year",{"type":606,"tag":1334,"props":1375,"children":1376},{},[1377],{"type":606,"tag":621,"props":1378,"children":1380},{"className":1379},[],[1381],{"type":612,"value":1382},"24",{"type":606,"tag":1307,"props":1384,"children":1385},{},[1386,1395,1400],{"type":606,"tag":1334,"props":1387,"children":1388},{},[1389],{"type":606,"tag":621,"props":1390,"children":1392},{"className":1391},[],[1393],{"type":612,"value":1394},"%m",{"type":606,"tag":1334,"props":1396,"children":1397},{},[1398],{"type":612,"value":1399},"Month (01-12)",{"type":606,"tag":1334,"props":1401,"children":1402},{},[1403],{"type":606,"tag":621,"props":1404,"children":1406},{"className":1405},[],[1407],{"type":612,"value":1408},"03",{"type":606,"tag":1307,"props":1410,"children":1411},{},[1412,1421,1426],{"type":606,"tag":1334,"props":1413,"children":1414},{},[1415],{"type":606,"tag":621,"props":1416,"children":1418},{"className":1417},[],[1419],{"type":612,"value":1420},"%B",{"type":606,"tag":1334,"props":1422,"children":1423},{},[1424],{"type":612,"value":1425},"Full month name",{"type":606,"tag":1334,"props":1427,"children":1428},{},[1429],{"type":606,"tag":621,"props":1430,"children":1432},{"className":1431},[],[1433],{"type":612,"value":1434},"March",{"type":606,"tag":1307,"props":1436,"children":1437},{},[1438,1447,1452],{"type":606,"tag":1334,"props":1439,"children":1440},{},[1441],{"type":606,"tag":621,"props":1442,"children":1444},{"className":1443},[],[1445],{"type":612,"value":1446},"%b",{"type":606,"tag":1334,"props":1448,"children":1449},{},[1450],{"type":612,"value":1451},"Abbreviated month",{"type":606,"tag":1334,"props":1453,"children":1454},{},[1455],{"type":606,"tag":621,"props":1456,"children":1458},{"className":1457},[],[1459],{"type":612,"value":1460},"Mar",{"type":606,"tag":1307,"props":1462,"children":1463},{},[1464,1472,1477],{"type":606,"tag":1334,"props":1465,"children":1466},{},[1467],{"type":606,"tag":621,"props":1468,"children":1470},{"className":1469},[],[1471],{"type":612,"value":925},{"type":606,"tag":1334,"props":1473,"children":1474},{},[1475],{"type":612,"value":1476},"Day of month",{"type":606,"tag":1334,"props":1478,"children":1479},{},[1480],{"type":606,"tag":621,"props":1481,"children":1483},{"className":1482},[],[1484],{"type":612,"value":1485},"15",{"type":606,"tag":1307,"props":1487,"children":1488},{},[1489,1498,1503],{"type":606,"tag":1334,"props":1490,"children":1491},{},[1492],{"type":606,"tag":621,"props":1493,"children":1495},{"className":1494},[],[1496],{"type":612,"value":1497},"%A",{"type":606,"tag":1334,"props":1499,"children":1500},{},[1501],{"type":612,"value":1502},"Full weekday",{"type":606,"tag":1334,"props":1504,"children":1505},{},[1506],{"type":606,"tag":621,"props":1507,"children":1509},{"className":1508},[],[1510],{"type":612,"value":1511},"Monday",{"type":606,"tag":1307,"props":1513,"children":1514},{},[1515,1524,1529],{"type":606,"tag":1334,"props":1516,"children":1517},{},[1518],{"type":606,"tag":621,"props":1519,"children":1521},{"className":1520},[],[1522],{"type":612,"value":1523},"%a",{"type":606,"tag":1334,"props":1525,"children":1526},{},[1527],{"type":612,"value":1528},"Abbreviated weekday",{"type":606,"tag":1334,"props":1530,"children":1531},{},[1532],{"type":606,"tag":621,"props":1533,"children":1535},{"className":1534},[],[1536],{"type":612,"value":1537},"Mon",{"type":606,"tag":1307,"props":1539,"children":1540},{},[1541,1550,1555],{"type":606,"tag":1334,"props":1542,"children":1543},{},[1544],{"type":606,"tag":621,"props":1545,"children":1547},{"className":1546},[],[1548],{"type":612,"value":1549},"%H",{"type":606,"tag":1334,"props":1551,"children":1552},{},[1553],{"type":612,"value":1554},"Hour (00-23)",{"type":606,"tag":1334,"props":1556,"children":1557},{},[1558],{"type":606,"tag":621,"props":1559,"children":1561},{"className":1560},[],[1562],{"type":612,"value":1563},"14",{"type":606,"tag":1307,"props":1565,"children":1566},{},[1567,1576,1581],{"type":606,"tag":1334,"props":1568,"children":1569},{},[1570],{"type":606,"tag":621,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":612,"value":1575},"%I",{"type":606,"tag":1334,"props":1577,"children":1578},{},[1579],{"type":612,"value":1580},"Hour (01-12)",{"type":606,"tag":1334,"props":1582,"children":1583},{},[1584],{"type":606,"tag":621,"props":1585,"children":1587},{"className":1586},[],[1588],{"type":612,"value":1589},"02",{"type":606,"tag":1307,"props":1591,"children":1592},{},[1593,1602,1607],{"type":606,"tag":1334,"props":1594,"children":1595},{},[1596],{"type":606,"tag":621,"props":1597,"children":1599},{"className":1598},[],[1600],{"type":612,"value":1601},"%M",{"type":606,"tag":1334,"props":1603,"children":1604},{},[1605],{"type":612,"value":1606},"Minute",{"type":606,"tag":1334,"props":1608,"children":1609},{},[1610],{"type":606,"tag":621,"props":1611,"children":1613},{"className":1612},[],[1614],{"type":612,"value":1615},"30",{"type":606,"tag":1307,"props":1617,"children":1618},{},[1619,1628,1633],{"type":606,"tag":1334,"props":1620,"children":1621},{},[1622],{"type":606,"tag":621,"props":1623,"children":1625},{"className":1624},[],[1626],{"type":612,"value":1627},"%S",{"type":606,"tag":1334,"props":1629,"children":1630},{},[1631],{"type":612,"value":1632},"Second",{"type":606,"tag":1334,"props":1634,"children":1635},{},[1636],{"type":606,"tag":621,"props":1637,"children":1639},{"className":1638},[],[1640],{"type":612,"value":1641},"45",{"type":606,"tag":1307,"props":1643,"children":1644},{},[1645,1654,1659],{"type":606,"tag":1334,"props":1646,"children":1647},{},[1648],{"type":606,"tag":621,"props":1649,"children":1651},{"className":1650},[],[1652],{"type":612,"value":1653},"%p",{"type":606,"tag":1334,"props":1655,"children":1656},{},[1657],{"type":612,"value":1658},"AM/PM",{"type":606,"tag":1334,"props":1660,"children":1661},{},[1662],{"type":606,"tag":621,"props":1663,"children":1665},{"className":1664},[],[1666],{"type":612,"value":1667},"PM",{"type":606,"tag":1292,"props":1669,"children":1671},{"id":1670},"datetime-classes-comparison",[1672],{"type":612,"value":1673},"DateTime Classes Comparison",{"type":606,"tag":1299,"props":1675,"children":1676},{},[1677,1702],{"type":606,"tag":1303,"props":1678,"children":1679},{},[1680],{"type":606,"tag":1307,"props":1681,"children":1682},{},[1683,1688,1693,1698],{"type":606,"tag":1311,"props":1684,"children":1685},{},[1686],{"type":612,"value":1687},"Class",{"type":606,"tag":1311,"props":1689,"children":1690},{},[1691],{"type":612,"value":1692},"Purpose",{"type":606,"tag":1311,"props":1694,"children":1695},{},[1696],{"type":612,"value":1697},"Components",{"type":606,"tag":1311,"props":1699,"children":1700},{},[1701],{"type":612,"value":1325},{"type":606,"tag":1327,"props":1703,"children":1704},{},[1705,1735,1765,1795],{"type":606,"tag":1307,"props":1706,"children":1707},{},[1708,1716,1721,1726],{"type":606,"tag":1334,"props":1709,"children":1710},{},[1711],{"type":606,"tag":621,"props":1712,"children":1714},{"className":1713},[],[1715],{"type":612,"value":1144},{"type":606,"tag":1334,"props":1717,"children":1718},{},[1719],{"type":612,"value":1720},"Date only",{"type":606,"tag":1334,"props":1722,"children":1723},{},[1724],{"type":612,"value":1725},"year, month, day",{"type":606,"tag":1334,"props":1727,"children":1728},{},[1729],{"type":606,"tag":621,"props":1730,"children":1732},{"className":1731},[],[1733],{"type":612,"value":1734},"2024-03-15",{"type":606,"tag":1307,"props":1736,"children":1737},{},[1738,1746,1751,1756],{"type":606,"tag":1334,"props":1739,"children":1740},{},[1741],{"type":606,"tag":621,"props":1742,"children":1744},{"className":1743},[],[1745],{"type":612,"value":1090},{"type":606,"tag":1334,"props":1747,"children":1748},{},[1749],{"type":612,"value":1750},"Time only",{"type":606,"tag":1334,"props":1752,"children":1753},{},[1754],{"type":612,"value":1755},"hour, minute, second",{"type":606,"tag":1334,"props":1757,"children":1758},{},[1759],{"type":606,"tag":621,"props":1760,"children":1762},{"className":1761},[],[1763],{"type":612,"value":1764},"14:30:45",{"type":606,"tag":1307,"props":1766,"children":1767},{},[1768,1776,1781,1786],{"type":606,"tag":1334,"props":1769,"children":1770},{},[1771],{"type":606,"tag":621,"props":1772,"children":1774},{"className":1773},[],[1775],{"type":612,"value":626},{"type":606,"tag":1334,"props":1777,"children":1778},{},[1779],{"type":612,"value":1780},"Date + time",{"type":606,"tag":1334,"props":1782,"children":1783},{},[1784],{"type":612,"value":1785},"All components",{"type":606,"tag":1334,"props":1787,"children":1788},{},[1789],{"type":606,"tag":621,"props":1790,"children":1792},{"className":1791},[],[1793],{"type":612,"value":1794},"2024-03-15 14:30:45",{"type":606,"tag":1307,"props":1796,"children":1797},{},[1798,1806,1811,1816],{"type":606,"tag":1334,"props":1799,"children":1800},{},[1801],{"type":606,"tag":621,"props":1802,"children":1804},{"className":1803},[],[1805],{"type":612,"value":1165},{"type":606,"tag":1334,"props":1807,"children":1808},{},[1809],{"type":612,"value":1810},"Duration",{"type":606,"tag":1334,"props":1812,"children":1813},{},[1814],{"type":612,"value":1815},"days, seconds, microseconds",{"type":606,"tag":1334,"props":1817,"children":1818},{},[1819],{"type":606,"tag":621,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":612,"value":1824},"7 days, 2:30:00",{"type":606,"tag":977,"props":1826,"children":1828},{"id":1827},"quick-examples-preview",[1829],{"type":612,"value":1830},"🌟 Quick Examples Preview",{"type":606,"tag":615,"props":1832,"children":1833},{},[1834],{"type":612,"value":1835},"Here's what you'll learn to do:",{"type":606,"tag":635,"props":1837,"children":1838},{},[1839],{"type":606,"tag":639,"props":1840,"children":1842},{"className":641,"code":1841,"language":643,"meta":8,"style":8},"from datetime import datetime, timedelta\n\n# Get current date/time\nnow = datetime.now()\nprint(f\"Now: {now.strftime('%B %d, %Y at %I:%M %p')}\")\n\n# Calculate future date\nfuture = now + timedelta(days=30, hours=6)\nprint(f\"In 30 days: {future.strftime('%Y-%m-%d')}\")\n\n# Parse date from string\ndate_str = \"2024-12-25\"\nchristmas = datetime.strptime(date_str, \"%Y-%m-%d\")\nprint(f\"Christmas: {christmas.strftime('%A, %B %d')}\")\n\n# Calculate time difference\ntime_diff = christmas - now\nprint(f\"Days until Christmas: {time_diff.days}\")\n",[1843],{"type":606,"tag":621,"props":1844,"children":1845},{"__ignoreMap":8},[1846,1866,1873,1881,1896,1956,1963,1971,2035,2094,2101,2109,2126,2159,2217,2224,2232,2259],{"type":606,"tag":649,"props":1847,"children":1848},{"class":651,"line":12},[1849,1853,1857,1861],{"type":606,"tag":649,"props":1850,"children":1851},{"style":655},[1852],{"type":612,"value":658},{"type":606,"tag":649,"props":1854,"children":1855},{"style":661},[1856],{"type":612,"value":664},{"type":606,"tag":649,"props":1858,"children":1859},{"style":655},[1860],{"type":612,"value":669},{"type":606,"tag":649,"props":1862,"children":1863},{"style":661},[1864],{"type":612,"value":1865}," datetime, timedelta\n",{"type":606,"tag":649,"props":1867,"children":1868},{"class":651,"line":27},[1869],{"type":606,"tag":649,"props":1870,"children":1871},{"emptyLinePlaceholder":13},[1872],{"type":612,"value":682},{"type":606,"tag":649,"props":1874,"children":1875},{"class":651,"line":36},[1876],{"type":606,"tag":649,"props":1877,"children":1878},{"style":688},[1879],{"type":612,"value":1880},"# Get current date/time\n",{"type":606,"tag":649,"props":1882,"children":1883},{"class":651,"line":45},[1884,1888,1892],{"type":606,"tag":649,"props":1885,"children":1886},{"style":661},[1887],{"type":612,"value":699},{"type":606,"tag":649,"props":1889,"children":1890},{"style":655},[1891],{"type":612,"value":704},{"type":606,"tag":649,"props":1893,"children":1894},{"style":661},[1895],{"type":612,"value":709},{"type":606,"tag":649,"props":1897,"children":1898},{"class":651,"line":54},[1899,1903,1907,1911,1916,1920,1925,1930,1934,1939,1944,1948,1952],{"type":606,"tag":649,"props":1900,"children":1901},{"style":756},[1902],{"type":612,"value":759},{"type":606,"tag":649,"props":1904,"children":1905},{"style":661},[1906],{"type":612,"value":764},{"type":606,"tag":649,"props":1908,"children":1909},{"style":655},[1910],{"type":612,"value":769},{"type":606,"tag":649,"props":1912,"children":1913},{"style":772},[1914],{"type":612,"value":1915},"\"Now: ",{"type":606,"tag":649,"props":1917,"children":1918},{"style":756},[1919],{"type":612,"value":780},{"type":606,"tag":649,"props":1921,"children":1922},{"style":661},[1923],{"type":612,"value":1924},"now.strftime(",{"type":606,"tag":649,"props":1926,"children":1927},{"style":772},[1928],{"type":612,"value":1929},"'%B ",{"type":606,"tag":649,"props":1931,"children":1932},{"style":756},[1933],{"type":612,"value":925},{"type":606,"tag":649,"props":1935,"children":1936},{"style":772},[1937],{"type":612,"value":1938},", %Y at %I:%M %p'",{"type":606,"tag":649,"props":1940,"children":1941},{"style":661},[1942],{"type":612,"value":1943},")",{"type":606,"tag":649,"props":1945,"children":1946},{"style":756},[1947],{"type":612,"value":790},{"type":606,"tag":649,"props":1949,"children":1950},{"style":772},[1951],{"type":612,"value":795},{"type":606,"tag":649,"props":1953,"children":1954},{"style":661},[1955],{"type":612,"value":800},{"type":606,"tag":649,"props":1957,"children":1958},{"class":651,"line":63},[1959],{"type":606,"tag":649,"props":1960,"children":1961},{"emptyLinePlaceholder":13},[1962],{"type":612,"value":682},{"type":606,"tag":649,"props":1964,"children":1965},{"class":651,"line":72},[1966],{"type":606,"tag":649,"props":1967,"children":1968},{"style":688},[1969],{"type":612,"value":1970},"# Calculate future date\n",{"type":606,"tag":649,"props":1972,"children":1973},{"class":651,"line":81},[1974,1979,1983,1988,1993,1998,2004,2008,2012,2017,2022,2026,2031],{"type":606,"tag":649,"props":1975,"children":1976},{"style":661},[1977],{"type":612,"value":1978},"future ",{"type":606,"tag":649,"props":1980,"children":1981},{"style":655},[1982],{"type":612,"value":704},{"type":606,"tag":649,"props":1984,"children":1985},{"style":661},[1986],{"type":612,"value":1987}," now ",{"type":606,"tag":649,"props":1989,"children":1990},{"style":655},[1991],{"type":612,"value":1992},"+",{"type":606,"tag":649,"props":1994,"children":1995},{"style":661},[1996],{"type":612,"value":1997}," timedelta(",{"type":606,"tag":649,"props":1999,"children":2001},{"style":2000},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[2002],{"type":612,"value":2003},"days",{"type":606,"tag":649,"props":2005,"children":2006},{"style":655},[2007],{"type":612,"value":704},{"type":606,"tag":649,"props":2009,"children":2010},{"style":756},[2011],{"type":612,"value":1615},{"type":606,"tag":649,"props":2013,"children":2014},{"style":661},[2015],{"type":612,"value":2016},", ",{"type":606,"tag":649,"props":2018,"children":2019},{"style":2000},[2020],{"type":612,"value":2021},"hours",{"type":606,"tag":649,"props":2023,"children":2024},{"style":655},[2025],{"type":612,"value":704},{"type":606,"tag":649,"props":2027,"children":2028},{"style":756},[2029],{"type":612,"value":2030},"6",{"type":606,"tag":649,"props":2032,"children":2033},{"style":661},[2034],{"type":612,"value":800},{"type":606,"tag":649,"props":2036,"children":2037},{"class":651,"line":803},[2038,2042,2046,2050,2055,2059,2064,2069,2073,2078,2082,2086,2090],{"type":606,"tag":649,"props":2039,"children":2040},{"style":756},[2041],{"type":612,"value":759},{"type":606,"tag":649,"props":2043,"children":2044},{"style":661},[2045],{"type":612,"value":764},{"type":606,"tag":649,"props":2047,"children":2048},{"style":655},[2049],{"type":612,"value":769},{"type":606,"tag":649,"props":2051,"children":2052},{"style":772},[2053],{"type":612,"value":2054},"\"In 30 days: ",{"type":606,"tag":649,"props":2056,"children":2057},{"style":756},[2058],{"type":612,"value":780},{"type":606,"tag":649,"props":2060,"children":2061},{"style":661},[2062],{"type":612,"value":2063},"future.strftime(",{"type":606,"tag":649,"props":2065,"children":2066},{"style":772},[2067],{"type":612,"value":2068},"'%Y-%m-",{"type":606,"tag":649,"props":2070,"children":2071},{"style":756},[2072],{"type":612,"value":925},{"type":606,"tag":649,"props":2074,"children":2075},{"style":772},[2076],{"type":612,"value":2077},"'",{"type":606,"tag":649,"props":2079,"children":2080},{"style":661},[2081],{"type":612,"value":1943},{"type":606,"tag":649,"props":2083,"children":2084},{"style":756},[2085],{"type":612,"value":790},{"type":606,"tag":649,"props":2087,"children":2088},{"style":772},[2089],{"type":612,"value":795},{"type":606,"tag":649,"props":2091,"children":2092},{"style":661},[2093],{"type":612,"value":800},{"type":606,"tag":649,"props":2095,"children":2096},{"class":651,"line":99},[2097],{"type":606,"tag":649,"props":2098,"children":2099},{"emptyLinePlaceholder":13},[2100],{"type":612,"value":682},{"type":606,"tag":649,"props":2102,"children":2103},{"class":651,"line":108},[2104],{"type":606,"tag":649,"props":2105,"children":2106},{"style":688},[2107],{"type":612,"value":2108},"# Parse date from string\n",{"type":606,"tag":649,"props":2110,"children":2111},{"class":651,"line":117},[2112,2117,2121],{"type":606,"tag":649,"props":2113,"children":2114},{"style":661},[2115],{"type":612,"value":2116},"date_str ",{"type":606,"tag":649,"props":2118,"children":2119},{"style":655},[2120],{"type":612,"value":704},{"type":606,"tag":649,"props":2122,"children":2123},{"style":772},[2124],{"type":612,"value":2125}," \"2024-12-25\"\n",{"type":606,"tag":649,"props":2127,"children":2128},{"class":651,"line":126},[2129,2134,2138,2143,2147,2151,2155],{"type":606,"tag":649,"props":2130,"children":2131},{"style":661},[2132],{"type":612,"value":2133},"christmas ",{"type":606,"tag":649,"props":2135,"children":2136},{"style":655},[2137],{"type":612,"value":704},{"type":606,"tag":649,"props":2139,"children":2140},{"style":661},[2141],{"type":612,"value":2142}," datetime.strptime(date_str, ",{"type":606,"tag":649,"props":2144,"children":2145},{"style":772},[2146],{"type":612,"value":920},{"type":606,"tag":649,"props":2148,"children":2149},{"style":756},[2150],{"type":612,"value":925},{"type":606,"tag":649,"props":2152,"children":2153},{"style":772},[2154],{"type":612,"value":795},{"type":606,"tag":649,"props":2156,"children":2157},{"style":661},[2158],{"type":612,"value":800},{"type":606,"tag":649,"props":2160,"children":2161},{"class":651,"line":135},[2162,2166,2170,2174,2179,2183,2188,2193,2197,2201,2205,2209,2213],{"type":606,"tag":649,"props":2163,"children":2164},{"style":756},[2165],{"type":612,"value":759},{"type":606,"tag":649,"props":2167,"children":2168},{"style":661},[2169],{"type":612,"value":764},{"type":606,"tag":649,"props":2171,"children":2172},{"style":655},[2173],{"type":612,"value":769},{"type":606,"tag":649,"props":2175,"children":2176},{"style":772},[2177],{"type":612,"value":2178},"\"Christmas: ",{"type":606,"tag":649,"props":2180,"children":2181},{"style":756},[2182],{"type":612,"value":780},{"type":606,"tag":649,"props":2184,"children":2185},{"style":661},[2186],{"type":612,"value":2187},"christmas.strftime(",{"type":606,"tag":649,"props":2189,"children":2190},{"style":772},[2191],{"type":612,"value":2192},"'%A, %B ",{"type":606,"tag":649,"props":2194,"children":2195},{"style":756},[2196],{"type":612,"value":925},{"type":606,"tag":649,"props":2198,"children":2199},{"style":772},[2200],{"type":612,"value":2077},{"type":606,"tag":649,"props":2202,"children":2203},{"style":661},[2204],{"type":612,"value":1943},{"type":606,"tag":649,"props":2206,"children":2207},{"style":756},[2208],{"type":612,"value":790},{"type":606,"tag":649,"props":2210,"children":2211},{"style":772},[2212],{"type":612,"value":795},{"type":606,"tag":649,"props":2214,"children":2215},{"style":661},[2216],{"type":612,"value":800},{"type":606,"tag":649,"props":2218,"children":2219},{"class":651,"line":144},[2220],{"type":606,"tag":649,"props":2221,"children":2222},{"emptyLinePlaceholder":13},[2223],{"type":612,"value":682},{"type":606,"tag":649,"props":2225,"children":2226},{"class":651,"line":153},[2227],{"type":606,"tag":649,"props":2228,"children":2229},{"style":688},[2230],{"type":612,"value":2231},"# Calculate time difference\n",{"type":606,"tag":649,"props":2233,"children":2234},{"class":651,"line":163},[2235,2240,2244,2249,2254],{"type":606,"tag":649,"props":2236,"children":2237},{"style":661},[2238],{"type":612,"value":2239},"time_diff ",{"type":606,"tag":649,"props":2241,"children":2242},{"style":655},[2243],{"type":612,"value":704},{"type":606,"tag":649,"props":2245,"children":2246},{"style":661},[2247],{"type":612,"value":2248}," christmas ",{"type":606,"tag":649,"props":2250,"children":2251},{"style":655},[2252],{"type":612,"value":2253},"-",{"type":606,"tag":649,"props":2255,"children":2256},{"style":661},[2257],{"type":612,"value":2258}," now\n",{"type":606,"tag":649,"props":2260,"children":2261},{"class":651,"line":172},[2262,2266,2270,2274,2279,2283,2288,2292,2296],{"type":606,"tag":649,"props":2263,"children":2264},{"style":756},[2265],{"type":612,"value":759},{"type":606,"tag":649,"props":2267,"children":2268},{"style":661},[2269],{"type":612,"value":764},{"type":606,"tag":649,"props":2271,"children":2272},{"style":655},[2273],{"type":612,"value":769},{"type":606,"tag":649,"props":2275,"children":2276},{"style":772},[2277],{"type":612,"value":2278},"\"Days until Christmas: ",{"type":606,"tag":649,"props":2280,"children":2281},{"style":756},[2282],{"type":612,"value":780},{"type":606,"tag":649,"props":2284,"children":2285},{"style":661},[2286],{"type":612,"value":2287},"time_diff.days",{"type":606,"tag":649,"props":2289,"children":2290},{"style":756},[2291],{"type":612,"value":790},{"type":606,"tag":649,"props":2293,"children":2294},{"style":772},[2295],{"type":612,"value":795},{"type":606,"tag":649,"props":2297,"children":2298},{"style":661},[2299],{"type":612,"value":800},{"type":606,"tag":977,"props":2301,"children":2303},{"id":2302},"why-pythons-datetime-is-powerful",[2304],{"type":612,"value":2305},"🚀 Why Python's DateTime is Powerful",{"type":606,"tag":615,"props":2307,"children":2308},{},[2309],{"type":612,"value":2310},"Python's date/time handling excels because:",{"type":606,"tag":615,"props":2312,"children":2313},{},[2314,2316,2321,2323,2327,2329,2334,2336,2339,2340,2345,2347,2350,2351,2356,2358,2361,2362,2367,2369,2372,2373,2378],{"type":612,"value":2315},"✅ ",{"type":606,"tag":997,"props":2317,"children":2318},{},[2319],{"type":612,"value":2320},"Intuitive API",{"type":612,"value":2322},": Clear, readable method names",{"type":606,"tag":2324,"props":2325,"children":2326},"br",{},[],{"type":612,"value":2328},"\n✅ ",{"type":606,"tag":997,"props":2330,"children":2331},{},[2332],{"type":612,"value":2333},"Flexible Formatting",{"type":612,"value":2335},": Customizable display formats",{"type":606,"tag":2324,"props":2337,"children":2338},{},[],{"type":612,"value":2328},{"type":606,"tag":997,"props":2341,"children":2342},{},[2343],{"type":612,"value":2344},"Timezone Aware",{"type":612,"value":2346},": Built-in timezone support",{"type":606,"tag":2324,"props":2348,"children":2349},{},[],{"type":612,"value":2328},{"type":606,"tag":997,"props":2352,"children":2353},{},[2354],{"type":612,"value":2355},"Rich Calculations",{"type":612,"value":2357},": Easy arithmetic with dates",{"type":606,"tag":2324,"props":2359,"children":2360},{},[],{"type":612,"value":2328},{"type":606,"tag":997,"props":2363,"children":2364},{},[2365],{"type":612,"value":2366},"Standards Compliant",{"type":612,"value":2368},": Follows ISO 8601 standards",{"type":606,"tag":2324,"props":2370,"children":2371},{},[],{"type":612,"value":2328},{"type":606,"tag":997,"props":2374,"children":2375},{},[2376],{"type":612,"value":2377},"Performance",{"type":612,"value":2379},": Efficient for large datasets",{"type":606,"tag":1055,"props":2381,"children":2385},{"emoji":2382,"title":2383,"type":2384},"⏰","Ready to Master Time?","success",[2386,2391,2419],{"type":606,"tag":615,"props":2387,"children":2388},{},[2389],{"type":612,"value":2390},"Date and time operations are fundamental skills that you'll use in virtually every Python project. Master these topics to:",{"type":606,"tag":989,"props":2392,"children":2393},{},[2394,2399,2404,2409,2414],{"type":606,"tag":993,"props":2395,"children":2396},{},[2397],{"type":612,"value":2398},"📅 Build scheduling applications",{"type":606,"tag":993,"props":2400,"children":2401},{},[2402],{"type":612,"value":2403},"📊 Analyze time-series data",{"type":606,"tag":993,"props":2405,"children":2406},{},[2407],{"type":612,"value":2408},"🌍 Create global applications",{"type":606,"tag":993,"props":2410,"children":2411},{},[2412],{"type":612,"value":2413},"⏱️ Measure performance",{"type":606,"tag":993,"props":2415,"children":2416},{},[2417],{"type":612,"value":2418},"📝 Generate reports with timestamps",{"type":606,"tag":615,"props":2420,"children":2421},{},[2422,2427,2429],{"type":606,"tag":997,"props":2423,"children":2424},{},[2425],{"type":612,"value":2426},"Start your journey",{"type":612,"value":2428},": Begin with ",{"type":606,"tag":1224,"props":2430,"children":2431},{"href":298},[2432],{"type":612,"value":299},{"type":606,"tag":615,"props":2434,"children":2435},{},[2436],{"type":612,"value":2437},"Time to make your Python applications time-aware! ⏰✨",{"type":606,"tag":2439,"props":2440,"children":2441},"style",{},[2442],{"type":612,"value":2443},"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":2445},[2446,2447,2448,2452,2453],{"id":979,"depth":27,"text":982},{"id":1206,"depth":27,"text":1209},{"id":1287,"depth":27,"text":1290,"children":2449},[2450,2451],{"id":1294,"depth":36,"text":1297},{"id":1670,"depth":36,"text":1673},{"id":1827,"depth":27,"text":1830},{"id":2302,"depth":27,"text":2305},1782373757962]