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