[{"data":1,"prerenderedAt":4343},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/structure-code":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,"expanded":13},"/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,"expanded":13},"/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",[539],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"body":602,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},{"type":603,"children":604,"toc":4334},"root",[605,614,620,1388,1395,1400,1503,1510,2717,2723,3975,3981,4181,4187,4303,4309,4314,4328],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"️-structure-your-code",[611],{"type":612,"value":613},"text","🏗️ Structure Your Code",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Well-structured code is easier to understand, maintain, and debug. Good organization makes your projects scalable and helps other developers (including future you) work with your code effectively.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Example of well-structured code organization\n\n# config.py - Configuration constants\nDATABASE_URL = \"sqlite:///app.db\"\nAPI_TIMEOUT = 30\nMAX_RETRIES = 3\n\n# models.py - Data models\nclass User:\n    def __init__(self, username: str, email: str):\n        self.username = username\n        self.email = email\n        self.is_active = True\n    \n    def deactivate(self):\n        \"\"\"Deactivate the user account.\"\"\"\n        self.is_active = False\n\n# services.py - Business logic\nclass UserService:\n    def __init__(self):\n        self.users = {}\n    \n    def create_user(self, username: str, email: str) -> User:\n        \"\"\"Create a new user.\"\"\"\n        if username in self.users:\n            raise ValueError(f\"User {username} already exists\")\n        \n        user = User(username, email)\n        self.users[username] = user\n        return user\n    \n    def get_user(self, username: str) -> User:\n        \"\"\"Get user by username.\"\"\"\n        return self.users.get(username)\n\n# main.py - Application entry point\ndef main():\n    service = UserService()\n    user = service.create_user(\"alice\", \"alice@example.com\")\n    print(f\"Created user: {user.username}\")\n\nif __name__ == \"__main__\":\n    main()\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,654,662,683,700,717,724,732,753,790,813,834,855,863,880,888,908,915,923,939,954,975,982,1015,1023,1051,1104,1112,1129,1150,1162,1169,1193,1201,1217,1224,1232,1250,1267,1303,1346,1353,1380],{"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},"# Example of well-structured code organization\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649],{"type":606,"tag":636,"props":650,"children":651},{"emptyLinePlaceholder":13},[652],{"type":612,"value":653},"\n",{"type":606,"tag":636,"props":655,"children":656},{"class":638,"line":36},[657],{"type":606,"tag":636,"props":658,"children":659},{"style":642},[660],{"type":612,"value":661},"# config.py - Configuration constants\n",{"type":606,"tag":636,"props":663,"children":664},{"class":638,"line":45},[665,671,677],{"type":606,"tag":636,"props":666,"children":668},{"style":667},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[669],{"type":612,"value":670},"DATABASE_URL",{"type":606,"tag":636,"props":672,"children":674},{"style":673},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[675],{"type":612,"value":676}," =",{"type":606,"tag":636,"props":678,"children":680},{"style":679},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[681],{"type":612,"value":682}," \"sqlite:///app.db\"\n",{"type":606,"tag":636,"props":684,"children":685},{"class":638,"line":54},[686,691,695],{"type":606,"tag":636,"props":687,"children":688},{"style":667},[689],{"type":612,"value":690},"API_TIMEOUT",{"type":606,"tag":636,"props":692,"children":693},{"style":673},[694],{"type":612,"value":676},{"type":606,"tag":636,"props":696,"children":697},{"style":667},[698],{"type":612,"value":699}," 30\n",{"type":606,"tag":636,"props":701,"children":702},{"class":638,"line":63},[703,708,712],{"type":606,"tag":636,"props":704,"children":705},{"style":667},[706],{"type":612,"value":707},"MAX_RETRIES",{"type":606,"tag":636,"props":709,"children":710},{"style":673},[711],{"type":612,"value":676},{"type":606,"tag":636,"props":713,"children":714},{"style":667},[715],{"type":612,"value":716}," 3\n",{"type":606,"tag":636,"props":718,"children":719},{"class":638,"line":72},[720],{"type":606,"tag":636,"props":721,"children":722},{"emptyLinePlaceholder":13},[723],{"type":612,"value":653},{"type":606,"tag":636,"props":725,"children":726},{"class":638,"line":81},[727],{"type":606,"tag":636,"props":728,"children":729},{"style":642},[730],{"type":612,"value":731},"# models.py - Data models\n",{"type":606,"tag":636,"props":733,"children":735},{"class":638,"line":734},9,[736,741,747],{"type":606,"tag":636,"props":737,"children":738},{"style":673},[739],{"type":612,"value":740},"class",{"type":606,"tag":636,"props":742,"children":744},{"style":743},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[745],{"type":612,"value":746}," User",{"type":606,"tag":636,"props":748,"children":750},{"style":749},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[751],{"type":612,"value":752},":\n",{"type":606,"tag":636,"props":754,"children":755},{"class":638,"line":99},[756,761,766,771,776,781,785],{"type":606,"tag":636,"props":757,"children":758},{"style":673},[759],{"type":612,"value":760},"    def",{"type":606,"tag":636,"props":762,"children":763},{"style":667},[764],{"type":612,"value":765}," __init__",{"type":606,"tag":636,"props":767,"children":768},{"style":749},[769],{"type":612,"value":770},"(self, username: ",{"type":606,"tag":636,"props":772,"children":773},{"style":667},[774],{"type":612,"value":775},"str",{"type":606,"tag":636,"props":777,"children":778},{"style":749},[779],{"type":612,"value":780},", email: ",{"type":606,"tag":636,"props":782,"children":783},{"style":667},[784],{"type":612,"value":775},{"type":606,"tag":636,"props":786,"children":787},{"style":749},[788],{"type":612,"value":789},"):\n",{"type":606,"tag":636,"props":791,"children":792},{"class":638,"line":108},[793,798,803,808],{"type":606,"tag":636,"props":794,"children":795},{"style":667},[796],{"type":612,"value":797},"        self",{"type":606,"tag":636,"props":799,"children":800},{"style":749},[801],{"type":612,"value":802},".username ",{"type":606,"tag":636,"props":804,"children":805},{"style":673},[806],{"type":612,"value":807},"=",{"type":606,"tag":636,"props":809,"children":810},{"style":749},[811],{"type":612,"value":812}," username\n",{"type":606,"tag":636,"props":814,"children":815},{"class":638,"line":117},[816,820,825,829],{"type":606,"tag":636,"props":817,"children":818},{"style":667},[819],{"type":612,"value":797},{"type":606,"tag":636,"props":821,"children":822},{"style":749},[823],{"type":612,"value":824},".email ",{"type":606,"tag":636,"props":826,"children":827},{"style":673},[828],{"type":612,"value":807},{"type":606,"tag":636,"props":830,"children":831},{"style":749},[832],{"type":612,"value":833}," email\n",{"type":606,"tag":636,"props":835,"children":836},{"class":638,"line":126},[837,841,846,850],{"type":606,"tag":636,"props":838,"children":839},{"style":667},[840],{"type":612,"value":797},{"type":606,"tag":636,"props":842,"children":843},{"style":749},[844],{"type":612,"value":845},".is_active ",{"type":606,"tag":636,"props":847,"children":848},{"style":673},[849],{"type":612,"value":807},{"type":606,"tag":636,"props":851,"children":852},{"style":667},[853],{"type":612,"value":854}," True\n",{"type":606,"tag":636,"props":856,"children":857},{"class":638,"line":135},[858],{"type":606,"tag":636,"props":859,"children":860},{"style":749},[861],{"type":612,"value":862},"    \n",{"type":606,"tag":636,"props":864,"children":865},{"class":638,"line":144},[866,870,875],{"type":606,"tag":636,"props":867,"children":868},{"style":673},[869],{"type":612,"value":760},{"type":606,"tag":636,"props":871,"children":872},{"style":743},[873],{"type":612,"value":874}," deactivate",{"type":606,"tag":636,"props":876,"children":877},{"style":749},[878],{"type":612,"value":879},"(self):\n",{"type":606,"tag":636,"props":881,"children":882},{"class":638,"line":153},[883],{"type":606,"tag":636,"props":884,"children":885},{"style":679},[886],{"type":612,"value":887},"        \"\"\"Deactivate the user account.\"\"\"\n",{"type":606,"tag":636,"props":889,"children":890},{"class":638,"line":163},[891,895,899,903],{"type":606,"tag":636,"props":892,"children":893},{"style":667},[894],{"type":612,"value":797},{"type":606,"tag":636,"props":896,"children":897},{"style":749},[898],{"type":612,"value":845},{"type":606,"tag":636,"props":900,"children":901},{"style":673},[902],{"type":612,"value":807},{"type":606,"tag":636,"props":904,"children":905},{"style":667},[906],{"type":612,"value":907}," False\n",{"type":606,"tag":636,"props":909,"children":910},{"class":638,"line":172},[911],{"type":606,"tag":636,"props":912,"children":913},{"emptyLinePlaceholder":13},[914],{"type":612,"value":653},{"type":606,"tag":636,"props":916,"children":917},{"class":638,"line":181},[918],{"type":606,"tag":636,"props":919,"children":920},{"style":642},[921],{"type":612,"value":922},"# services.py - Business logic\n",{"type":606,"tag":636,"props":924,"children":925},{"class":638,"line":190},[926,930,935],{"type":606,"tag":636,"props":927,"children":928},{"style":673},[929],{"type":612,"value":740},{"type":606,"tag":636,"props":931,"children":932},{"style":743},[933],{"type":612,"value":934}," UserService",{"type":606,"tag":636,"props":936,"children":937},{"style":749},[938],{"type":612,"value":752},{"type":606,"tag":636,"props":940,"children":941},{"class":638,"line":199},[942,946,950],{"type":606,"tag":636,"props":943,"children":944},{"style":673},[945],{"type":612,"value":760},{"type":606,"tag":636,"props":947,"children":948},{"style":667},[949],{"type":612,"value":765},{"type":606,"tag":636,"props":951,"children":952},{"style":749},[953],{"type":612,"value":879},{"type":606,"tag":636,"props":955,"children":956},{"class":638,"line":208},[957,961,966,970],{"type":606,"tag":636,"props":958,"children":959},{"style":667},[960],{"type":612,"value":797},{"type":606,"tag":636,"props":962,"children":963},{"style":749},[964],{"type":612,"value":965},".users ",{"type":606,"tag":636,"props":967,"children":968},{"style":673},[969],{"type":612,"value":807},{"type":606,"tag":636,"props":971,"children":972},{"style":749},[973],{"type":612,"value":974}," {}\n",{"type":606,"tag":636,"props":976,"children":977},{"class":638,"line":217},[978],{"type":606,"tag":636,"props":979,"children":980},{"style":749},[981],{"type":612,"value":862},{"type":606,"tag":636,"props":983,"children":984},{"class":638,"line":227},[985,989,994,998,1002,1006,1010],{"type":606,"tag":636,"props":986,"children":987},{"style":673},[988],{"type":612,"value":760},{"type":606,"tag":636,"props":990,"children":991},{"style":743},[992],{"type":612,"value":993}," create_user",{"type":606,"tag":636,"props":995,"children":996},{"style":749},[997],{"type":612,"value":770},{"type":606,"tag":636,"props":999,"children":1000},{"style":667},[1001],{"type":612,"value":775},{"type":606,"tag":636,"props":1003,"children":1004},{"style":749},[1005],{"type":612,"value":780},{"type":606,"tag":636,"props":1007,"children":1008},{"style":667},[1009],{"type":612,"value":775},{"type":606,"tag":636,"props":1011,"children":1012},{"style":749},[1013],{"type":612,"value":1014},") -> User:\n",{"type":606,"tag":636,"props":1016,"children":1017},{"class":638,"line":236},[1018],{"type":606,"tag":636,"props":1019,"children":1020},{"style":679},[1021],{"type":612,"value":1022},"        \"\"\"Create a new user.\"\"\"\n",{"type":606,"tag":636,"props":1024,"children":1025},{"class":638,"line":245},[1026,1031,1036,1041,1046],{"type":606,"tag":636,"props":1027,"children":1028},{"style":673},[1029],{"type":612,"value":1030},"        if",{"type":606,"tag":636,"props":1032,"children":1033},{"style":749},[1034],{"type":612,"value":1035}," username ",{"type":606,"tag":636,"props":1037,"children":1038},{"style":673},[1039],{"type":612,"value":1040},"in",{"type":606,"tag":636,"props":1042,"children":1043},{"style":667},[1044],{"type":612,"value":1045}," self",{"type":606,"tag":636,"props":1047,"children":1048},{"style":749},[1049],{"type":612,"value":1050},".users:\n",{"type":606,"tag":636,"props":1052,"children":1053},{"class":638,"line":254},[1054,1059,1064,1069,1074,1079,1084,1089,1094,1099],{"type":606,"tag":636,"props":1055,"children":1056},{"style":673},[1057],{"type":612,"value":1058},"            raise",{"type":606,"tag":636,"props":1060,"children":1061},{"style":667},[1062],{"type":612,"value":1063}," ValueError",{"type":606,"tag":636,"props":1065,"children":1066},{"style":749},[1067],{"type":612,"value":1068},"(",{"type":606,"tag":636,"props":1070,"children":1071},{"style":673},[1072],{"type":612,"value":1073},"f",{"type":606,"tag":636,"props":1075,"children":1076},{"style":679},[1077],{"type":612,"value":1078},"\"User ",{"type":606,"tag":636,"props":1080,"children":1081},{"style":667},[1082],{"type":612,"value":1083},"{",{"type":606,"tag":636,"props":1085,"children":1086},{"style":749},[1087],{"type":612,"value":1088},"username",{"type":606,"tag":636,"props":1090,"children":1091},{"style":667},[1092],{"type":612,"value":1093},"}",{"type":606,"tag":636,"props":1095,"children":1096},{"style":679},[1097],{"type":612,"value":1098}," already exists\"",{"type":606,"tag":636,"props":1100,"children":1101},{"style":749},[1102],{"type":612,"value":1103},")\n",{"type":606,"tag":636,"props":1105,"children":1106},{"class":638,"line":263},[1107],{"type":606,"tag":636,"props":1108,"children":1109},{"style":749},[1110],{"type":612,"value":1111},"        \n",{"type":606,"tag":636,"props":1113,"children":1114},{"class":638,"line":272},[1115,1120,1124],{"type":606,"tag":636,"props":1116,"children":1117},{"style":749},[1118],{"type":612,"value":1119},"        user ",{"type":606,"tag":636,"props":1121,"children":1122},{"style":673},[1123],{"type":612,"value":807},{"type":606,"tag":636,"props":1125,"children":1126},{"style":749},[1127],{"type":612,"value":1128}," User(username, email)\n",{"type":606,"tag":636,"props":1130,"children":1131},{"class":638,"line":281},[1132,1136,1141,1145],{"type":606,"tag":636,"props":1133,"children":1134},{"style":667},[1135],{"type":612,"value":797},{"type":606,"tag":636,"props":1137,"children":1138},{"style":749},[1139],{"type":612,"value":1140},".users[username] ",{"type":606,"tag":636,"props":1142,"children":1143},{"style":673},[1144],{"type":612,"value":807},{"type":606,"tag":636,"props":1146,"children":1147},{"style":749},[1148],{"type":612,"value":1149}," user\n",{"type":606,"tag":636,"props":1151,"children":1152},{"class":638,"line":291},[1153,1158],{"type":606,"tag":636,"props":1154,"children":1155},{"style":673},[1156],{"type":612,"value":1157},"        return",{"type":606,"tag":636,"props":1159,"children":1160},{"style":749},[1161],{"type":612,"value":1149},{"type":606,"tag":636,"props":1163,"children":1164},{"class":638,"line":302},[1165],{"type":606,"tag":636,"props":1166,"children":1167},{"style":749},[1168],{"type":612,"value":862},{"type":606,"tag":636,"props":1170,"children":1171},{"class":638,"line":311},[1172,1176,1181,1185,1189],{"type":606,"tag":636,"props":1173,"children":1174},{"style":673},[1175],{"type":612,"value":760},{"type":606,"tag":636,"props":1177,"children":1178},{"style":743},[1179],{"type":612,"value":1180}," get_user",{"type":606,"tag":636,"props":1182,"children":1183},{"style":749},[1184],{"type":612,"value":770},{"type":606,"tag":636,"props":1186,"children":1187},{"style":667},[1188],{"type":612,"value":775},{"type":606,"tag":636,"props":1190,"children":1191},{"style":749},[1192],{"type":612,"value":1014},{"type":606,"tag":636,"props":1194,"children":1195},{"class":638,"line":320},[1196],{"type":606,"tag":636,"props":1197,"children":1198},{"style":679},[1199],{"type":612,"value":1200},"        \"\"\"Get user by username.\"\"\"\n",{"type":606,"tag":636,"props":1202,"children":1203},{"class":638,"line":329},[1204,1208,1212],{"type":606,"tag":636,"props":1205,"children":1206},{"style":673},[1207],{"type":612,"value":1157},{"type":606,"tag":636,"props":1209,"children":1210},{"style":667},[1211],{"type":612,"value":1045},{"type":606,"tag":636,"props":1213,"children":1214},{"style":749},[1215],{"type":612,"value":1216},".users.get(username)\n",{"type":606,"tag":636,"props":1218,"children":1219},{"class":638,"line":338},[1220],{"type":606,"tag":636,"props":1221,"children":1222},{"emptyLinePlaceholder":13},[1223],{"type":612,"value":653},{"type":606,"tag":636,"props":1225,"children":1226},{"class":638,"line":347},[1227],{"type":606,"tag":636,"props":1228,"children":1229},{"style":642},[1230],{"type":612,"value":1231},"# main.py - Application entry point\n",{"type":606,"tag":636,"props":1233,"children":1234},{"class":638,"line":356},[1235,1240,1245],{"type":606,"tag":636,"props":1236,"children":1237},{"style":673},[1238],{"type":612,"value":1239},"def",{"type":606,"tag":636,"props":1241,"children":1242},{"style":743},[1243],{"type":612,"value":1244}," main",{"type":606,"tag":636,"props":1246,"children":1247},{"style":749},[1248],{"type":612,"value":1249},"():\n",{"type":606,"tag":636,"props":1251,"children":1252},{"class":638,"line":367},[1253,1258,1262],{"type":606,"tag":636,"props":1254,"children":1255},{"style":749},[1256],{"type":612,"value":1257},"    service ",{"type":606,"tag":636,"props":1259,"children":1260},{"style":673},[1261],{"type":612,"value":807},{"type":606,"tag":636,"props":1263,"children":1264},{"style":749},[1265],{"type":612,"value":1266}," UserService()\n",{"type":606,"tag":636,"props":1268,"children":1269},{"class":638,"line":376},[1270,1275,1279,1284,1289,1294,1299],{"type":606,"tag":636,"props":1271,"children":1272},{"style":749},[1273],{"type":612,"value":1274},"    user ",{"type":606,"tag":636,"props":1276,"children":1277},{"style":673},[1278],{"type":612,"value":807},{"type":606,"tag":636,"props":1280,"children":1281},{"style":749},[1282],{"type":612,"value":1283}," service.create_user(",{"type":606,"tag":636,"props":1285,"children":1286},{"style":679},[1287],{"type":612,"value":1288},"\"alice\"",{"type":606,"tag":636,"props":1290,"children":1291},{"style":749},[1292],{"type":612,"value":1293},", ",{"type":606,"tag":636,"props":1295,"children":1296},{"style":679},[1297],{"type":612,"value":1298},"\"alice@example.com\"",{"type":606,"tag":636,"props":1300,"children":1301},{"style":749},[1302],{"type":612,"value":1103},{"type":606,"tag":636,"props":1304,"children":1305},{"class":638,"line":385},[1306,1311,1315,1319,1324,1328,1333,1337,1342],{"type":606,"tag":636,"props":1307,"children":1308},{"style":667},[1309],{"type":612,"value":1310},"    print",{"type":606,"tag":636,"props":1312,"children":1313},{"style":749},[1314],{"type":612,"value":1068},{"type":606,"tag":636,"props":1316,"children":1317},{"style":673},[1318],{"type":612,"value":1073},{"type":606,"tag":636,"props":1320,"children":1321},{"style":679},[1322],{"type":612,"value":1323},"\"Created user: ",{"type":606,"tag":636,"props":1325,"children":1326},{"style":667},[1327],{"type":612,"value":1083},{"type":606,"tag":636,"props":1329,"children":1330},{"style":749},[1331],{"type":612,"value":1332},"user.username",{"type":606,"tag":636,"props":1334,"children":1335},{"style":667},[1336],{"type":612,"value":1093},{"type":606,"tag":636,"props":1338,"children":1339},{"style":679},[1340],{"type":612,"value":1341},"\"",{"type":606,"tag":636,"props":1343,"children":1344},{"style":749},[1345],{"type":612,"value":1103},{"type":606,"tag":636,"props":1347,"children":1348},{"class":638,"line":394},[1349],{"type":606,"tag":636,"props":1350,"children":1351},{"emptyLinePlaceholder":13},[1352],{"type":612,"value":653},{"type":606,"tag":636,"props":1354,"children":1355},{"class":638,"line":403},[1356,1361,1366,1371,1376],{"type":606,"tag":636,"props":1357,"children":1358},{"style":673},[1359],{"type":612,"value":1360},"if",{"type":606,"tag":636,"props":1362,"children":1363},{"style":667},[1364],{"type":612,"value":1365}," __name__",{"type":606,"tag":636,"props":1367,"children":1368},{"style":673},[1369],{"type":612,"value":1370}," ==",{"type":606,"tag":636,"props":1372,"children":1373},{"style":679},[1374],{"type":612,"value":1375}," \"__main__\"",{"type":606,"tag":636,"props":1377,"children":1378},{"style":749},[1379],{"type":612,"value":752},{"type":606,"tag":636,"props":1381,"children":1382},{"class":638,"line":412},[1383],{"type":606,"tag":636,"props":1384,"children":1385},{"style":749},[1386],{"type":612,"value":1387},"    main()\n",{"type":606,"tag":1389,"props":1390,"children":1392},"h2",{"id":1391},"understanding-code-structure",[1393],{"type":612,"value":1394},"🎯 Understanding Code Structure",{"type":606,"tag":615,"props":1396,"children":1397},{},[1398],{"type":612,"value":1399},"Good code structure follows clear patterns that make programs easier to navigate and understand.",{"type":606,"tag":1401,"props":1402,"children":1406},"info-box",{"emoji":1403,"title":1404,"type":1405},"🏗️","Structure Principles","info",[1407,1416,1441,1449,1472,1480],{"type":606,"tag":615,"props":1408,"children":1409},{},[1410],{"type":606,"tag":1411,"props":1412,"children":1413},"strong",{},[1414],{"type":612,"value":1415},"Organization Goals:",{"type":606,"tag":1417,"props":1418,"children":1419},"ul",{},[1420,1426,1431,1436],{"type":606,"tag":1421,"props":1422,"children":1423},"li",{},[1424],{"type":612,"value":1425},"Separate concerns into different modules",{"type":606,"tag":1421,"props":1427,"children":1428},{},[1429],{"type":612,"value":1430},"Group related functionality together",{"type":606,"tag":1421,"props":1432,"children":1433},{},[1434],{"type":612,"value":1435},"Create clear, logical hierarchies",{"type":606,"tag":1421,"props":1437,"children":1438},{},[1439],{"type":612,"value":1440},"Make code easy to find and modify",{"type":606,"tag":615,"props":1442,"children":1443},{},[1444],{"type":606,"tag":1411,"props":1445,"children":1446},{},[1447],{"type":612,"value":1448},"Common Patterns:",{"type":606,"tag":1417,"props":1450,"children":1451},{},[1452,1457,1462,1467],{"type":606,"tag":1421,"props":1453,"children":1454},{},[1455],{"type":612,"value":1456},"Models for data structures",{"type":606,"tag":1421,"props":1458,"children":1459},{},[1460],{"type":612,"value":1461},"Services for business logic",{"type":606,"tag":1421,"props":1463,"children":1464},{},[1465],{"type":612,"value":1466},"Utils for helper functions",{"type":606,"tag":1421,"props":1468,"children":1469},{},[1470],{"type":612,"value":1471},"Config for settings and constants",{"type":606,"tag":615,"props":1473,"children":1474},{},[1475],{"type":606,"tag":1411,"props":1476,"children":1477},{},[1478],{"type":612,"value":1479},"Benefits:",{"type":606,"tag":1417,"props":1481,"children":1482},{},[1483,1488,1493,1498],{"type":606,"tag":1421,"props":1484,"children":1485},{},[1486],{"type":612,"value":1487},"Easier debugging and testing",{"type":606,"tag":1421,"props":1489,"children":1490},{},[1491],{"type":612,"value":1492},"Better code reuse across projects",{"type":606,"tag":1421,"props":1494,"children":1495},{},[1496],{"type":612,"value":1497},"Simpler collaboration with teams",{"type":606,"tag":1421,"props":1499,"children":1500},{},[1501],{"type":612,"value":1502},"Reduced complexity and conflicts",{"type":606,"tag":1504,"props":1505,"children":1507},"h3",{"id":1506},"function-organization",[1508],{"type":612,"value":1509},"Function Organization",{"type":606,"tag":621,"props":1511,"children":1512},{},[1513],{"type":606,"tag":625,"props":1514,"children":1516},{"className":627,"code":1515,"language":629,"meta":8,"style":8},"# Good function structure and organization\n\ndef calculate_total_price(items, tax_rate=0.08, discount=0.0):\n    \"\"\"Calculate total price with tax and discount.\"\"\"\n    if not items:\n        return 0.0\n    \n    subtotal = sum(item['price'] * item['quantity'] for item in items)\n    discounted_total = subtotal * (1 - discount)\n    final_total = discounted_total * (1 + tax_rate)\n    \n    return round(final_total, 2)\n\ndef validate_email(email):\n    \"\"\"Check if email format is valid.\"\"\"\n    if not email or '@' not in email:\n        return False\n    \n    parts = email.split('@')\n    if len(parts) != 2:\n        return False\n    \n    username, domain = parts\n    return len(username) > 0 and '.' in domain\n\ndef format_currency(amount, currency='USD'):\n    \"\"\"Format amount as currency string.\"\"\"\n    symbols = {\n        'USD': '$',\n        'EUR': '€',\n        'GBP': '£'\n    }\n    \n    symbol = symbols.get(currency, '$')\n    return f\"{symbol}{amount:.2f}\"\n\n# Example usage demonstrating clear function purposes\ndef process_order():\n    \"\"\"Process a customer order with proper structure.\"\"\"\n    \n    # Sample order data\n    items = [\n        {'name': 'Laptop', 'price': 999.99, 'quantity': 1},\n        {'name': 'Mouse', 'price': 29.99, 'quantity': 2}\n    ]\n    \n    customer_email = \"customer@example.com\"\n    \n    # Validate customer\n    if not validate_email(customer_email):\n        print(\"Invalid customer email\")\n        return\n    \n    # Calculate totals\n    total = calculate_total_price(items, tax_rate=0.08, discount=0.1)\n    formatted_total = format_currency(total)\n    \n    print(f\"Order total: {formatted_total}\")\n    print(f\"Customer: {customer_email}\")\n\nprocess_order()\n",[1517],{"type":606,"tag":632,"props":1518,"children":1519},{"__ignoreMap":8},[1520,1528,1535,1579,1587,1605,1617,1624,1694,1735,1774,1781,1808,1815,1832,1840,1880,1891,1898,1924,1955,1966,1973,1990,2035,2042,2072,2080,2097,2120,2141,2158,2166,2173,2198,2247,2254,2262,2278,2286,2293,2301,2318,2378,2436,2444,2451,2468,2475,2483,2499,2520,2528,2535,2543,2596,2613,2620,2661,2702,2709],{"type":606,"tag":636,"props":1521,"children":1522},{"class":638,"line":12},[1523],{"type":606,"tag":636,"props":1524,"children":1525},{"style":642},[1526],{"type":612,"value":1527},"# Good function structure and organization\n",{"type":606,"tag":636,"props":1529,"children":1530},{"class":638,"line":27},[1531],{"type":606,"tag":636,"props":1532,"children":1533},{"emptyLinePlaceholder":13},[1534],{"type":612,"value":653},{"type":606,"tag":636,"props":1536,"children":1537},{"class":638,"line":36},[1538,1542,1547,1552,1556,1561,1566,1570,1575],{"type":606,"tag":636,"props":1539,"children":1540},{"style":673},[1541],{"type":612,"value":1239},{"type":606,"tag":636,"props":1543,"children":1544},{"style":743},[1545],{"type":612,"value":1546}," calculate_total_price",{"type":606,"tag":636,"props":1548,"children":1549},{"style":749},[1550],{"type":612,"value":1551},"(items, tax_rate",{"type":606,"tag":636,"props":1553,"children":1554},{"style":673},[1555],{"type":612,"value":807},{"type":606,"tag":636,"props":1557,"children":1558},{"style":667},[1559],{"type":612,"value":1560},"0.08",{"type":606,"tag":636,"props":1562,"children":1563},{"style":749},[1564],{"type":612,"value":1565},", discount",{"type":606,"tag":636,"props":1567,"children":1568},{"style":673},[1569],{"type":612,"value":807},{"type":606,"tag":636,"props":1571,"children":1572},{"style":667},[1573],{"type":612,"value":1574},"0.0",{"type":606,"tag":636,"props":1576,"children":1577},{"style":749},[1578],{"type":612,"value":789},{"type":606,"tag":636,"props":1580,"children":1581},{"class":638,"line":45},[1582],{"type":606,"tag":636,"props":1583,"children":1584},{"style":679},[1585],{"type":612,"value":1586},"    \"\"\"Calculate total price with tax and discount.\"\"\"\n",{"type":606,"tag":636,"props":1588,"children":1589},{"class":638,"line":54},[1590,1595,1600],{"type":606,"tag":636,"props":1591,"children":1592},{"style":673},[1593],{"type":612,"value":1594},"    if",{"type":606,"tag":636,"props":1596,"children":1597},{"style":673},[1598],{"type":612,"value":1599}," not",{"type":606,"tag":636,"props":1601,"children":1602},{"style":749},[1603],{"type":612,"value":1604}," items:\n",{"type":606,"tag":636,"props":1606,"children":1607},{"class":638,"line":63},[1608,1612],{"type":606,"tag":636,"props":1609,"children":1610},{"style":673},[1611],{"type":612,"value":1157},{"type":606,"tag":636,"props":1613,"children":1614},{"style":667},[1615],{"type":612,"value":1616}," 0.0\n",{"type":606,"tag":636,"props":1618,"children":1619},{"class":638,"line":72},[1620],{"type":606,"tag":636,"props":1621,"children":1622},{"style":749},[1623],{"type":612,"value":862},{"type":606,"tag":636,"props":1625,"children":1626},{"class":638,"line":81},[1627,1632,1636,1641,1646,1651,1656,1661,1666,1671,1675,1680,1685,1689],{"type":606,"tag":636,"props":1628,"children":1629},{"style":749},[1630],{"type":612,"value":1631},"    subtotal ",{"type":606,"tag":636,"props":1633,"children":1634},{"style":673},[1635],{"type":612,"value":807},{"type":606,"tag":636,"props":1637,"children":1638},{"style":667},[1639],{"type":612,"value":1640}," sum",{"type":606,"tag":636,"props":1642,"children":1643},{"style":749},[1644],{"type":612,"value":1645},"(item[",{"type":606,"tag":636,"props":1647,"children":1648},{"style":679},[1649],{"type":612,"value":1650},"'price'",{"type":606,"tag":636,"props":1652,"children":1653},{"style":749},[1654],{"type":612,"value":1655},"] ",{"type":606,"tag":636,"props":1657,"children":1658},{"style":673},[1659],{"type":612,"value":1660},"*",{"type":606,"tag":636,"props":1662,"children":1663},{"style":749},[1664],{"type":612,"value":1665}," item[",{"type":606,"tag":636,"props":1667,"children":1668},{"style":679},[1669],{"type":612,"value":1670},"'quantity'",{"type":606,"tag":636,"props":1672,"children":1673},{"style":749},[1674],{"type":612,"value":1655},{"type":606,"tag":636,"props":1676,"children":1677},{"style":673},[1678],{"type":612,"value":1679},"for",{"type":606,"tag":636,"props":1681,"children":1682},{"style":749},[1683],{"type":612,"value":1684}," item ",{"type":606,"tag":636,"props":1686,"children":1687},{"style":673},[1688],{"type":612,"value":1040},{"type":606,"tag":636,"props":1690,"children":1691},{"style":749},[1692],{"type":612,"value":1693}," items)\n",{"type":606,"tag":636,"props":1695,"children":1696},{"class":638,"line":734},[1697,1702,1706,1711,1715,1720,1725,1730],{"type":606,"tag":636,"props":1698,"children":1699},{"style":749},[1700],{"type":612,"value":1701},"    discounted_total ",{"type":606,"tag":636,"props":1703,"children":1704},{"style":673},[1705],{"type":612,"value":807},{"type":606,"tag":636,"props":1707,"children":1708},{"style":749},[1709],{"type":612,"value":1710}," subtotal ",{"type":606,"tag":636,"props":1712,"children":1713},{"style":673},[1714],{"type":612,"value":1660},{"type":606,"tag":636,"props":1716,"children":1717},{"style":749},[1718],{"type":612,"value":1719}," (",{"type":606,"tag":636,"props":1721,"children":1722},{"style":667},[1723],{"type":612,"value":1724},"1",{"type":606,"tag":636,"props":1726,"children":1727},{"style":673},[1728],{"type":612,"value":1729}," -",{"type":606,"tag":636,"props":1731,"children":1732},{"style":749},[1733],{"type":612,"value":1734}," discount)\n",{"type":606,"tag":636,"props":1736,"children":1737},{"class":638,"line":99},[1738,1743,1747,1752,1756,1760,1764,1769],{"type":606,"tag":636,"props":1739,"children":1740},{"style":749},[1741],{"type":612,"value":1742},"    final_total ",{"type":606,"tag":636,"props":1744,"children":1745},{"style":673},[1746],{"type":612,"value":807},{"type":606,"tag":636,"props":1748,"children":1749},{"style":749},[1750],{"type":612,"value":1751}," discounted_total ",{"type":606,"tag":636,"props":1753,"children":1754},{"style":673},[1755],{"type":612,"value":1660},{"type":606,"tag":636,"props":1757,"children":1758},{"style":749},[1759],{"type":612,"value":1719},{"type":606,"tag":636,"props":1761,"children":1762},{"style":667},[1763],{"type":612,"value":1724},{"type":606,"tag":636,"props":1765,"children":1766},{"style":673},[1767],{"type":612,"value":1768}," +",{"type":606,"tag":636,"props":1770,"children":1771},{"style":749},[1772],{"type":612,"value":1773}," tax_rate)\n",{"type":606,"tag":636,"props":1775,"children":1776},{"class":638,"line":108},[1777],{"type":606,"tag":636,"props":1778,"children":1779},{"style":749},[1780],{"type":612,"value":862},{"type":606,"tag":636,"props":1782,"children":1783},{"class":638,"line":117},[1784,1789,1794,1799,1804],{"type":606,"tag":636,"props":1785,"children":1786},{"style":673},[1787],{"type":612,"value":1788},"    return",{"type":606,"tag":636,"props":1790,"children":1791},{"style":667},[1792],{"type":612,"value":1793}," round",{"type":606,"tag":636,"props":1795,"children":1796},{"style":749},[1797],{"type":612,"value":1798},"(final_total, ",{"type":606,"tag":636,"props":1800,"children":1801},{"style":667},[1802],{"type":612,"value":1803},"2",{"type":606,"tag":636,"props":1805,"children":1806},{"style":749},[1807],{"type":612,"value":1103},{"type":606,"tag":636,"props":1809,"children":1810},{"class":638,"line":126},[1811],{"type":606,"tag":636,"props":1812,"children":1813},{"emptyLinePlaceholder":13},[1814],{"type":612,"value":653},{"type":606,"tag":636,"props":1816,"children":1817},{"class":638,"line":135},[1818,1822,1827],{"type":606,"tag":636,"props":1819,"children":1820},{"style":673},[1821],{"type":612,"value":1239},{"type":606,"tag":636,"props":1823,"children":1824},{"style":743},[1825],{"type":612,"value":1826}," validate_email",{"type":606,"tag":636,"props":1828,"children":1829},{"style":749},[1830],{"type":612,"value":1831},"(email):\n",{"type":606,"tag":636,"props":1833,"children":1834},{"class":638,"line":144},[1835],{"type":606,"tag":636,"props":1836,"children":1837},{"style":679},[1838],{"type":612,"value":1839},"    \"\"\"Check if email format is valid.\"\"\"\n",{"type":606,"tag":636,"props":1841,"children":1842},{"class":638,"line":153},[1843,1847,1851,1856,1861,1866,1870,1875],{"type":606,"tag":636,"props":1844,"children":1845},{"style":673},[1846],{"type":612,"value":1594},{"type":606,"tag":636,"props":1848,"children":1849},{"style":673},[1850],{"type":612,"value":1599},{"type":606,"tag":636,"props":1852,"children":1853},{"style":749},[1854],{"type":612,"value":1855}," email ",{"type":606,"tag":636,"props":1857,"children":1858},{"style":673},[1859],{"type":612,"value":1860},"or",{"type":606,"tag":636,"props":1862,"children":1863},{"style":679},[1864],{"type":612,"value":1865}," '@'",{"type":606,"tag":636,"props":1867,"children":1868},{"style":673},[1869],{"type":612,"value":1599},{"type":606,"tag":636,"props":1871,"children":1872},{"style":673},[1873],{"type":612,"value":1874}," in",{"type":606,"tag":636,"props":1876,"children":1877},{"style":749},[1878],{"type":612,"value":1879}," email:\n",{"type":606,"tag":636,"props":1881,"children":1882},{"class":638,"line":163},[1883,1887],{"type":606,"tag":636,"props":1884,"children":1885},{"style":673},[1886],{"type":612,"value":1157},{"type":606,"tag":636,"props":1888,"children":1889},{"style":667},[1890],{"type":612,"value":907},{"type":606,"tag":636,"props":1892,"children":1893},{"class":638,"line":172},[1894],{"type":606,"tag":636,"props":1895,"children":1896},{"style":749},[1897],{"type":612,"value":862},{"type":606,"tag":636,"props":1899,"children":1900},{"class":638,"line":181},[1901,1906,1910,1915,1920],{"type":606,"tag":636,"props":1902,"children":1903},{"style":749},[1904],{"type":612,"value":1905},"    parts ",{"type":606,"tag":636,"props":1907,"children":1908},{"style":673},[1909],{"type":612,"value":807},{"type":606,"tag":636,"props":1911,"children":1912},{"style":749},[1913],{"type":612,"value":1914}," email.split(",{"type":606,"tag":636,"props":1916,"children":1917},{"style":679},[1918],{"type":612,"value":1919},"'@'",{"type":606,"tag":636,"props":1921,"children":1922},{"style":749},[1923],{"type":612,"value":1103},{"type":606,"tag":636,"props":1925,"children":1926},{"class":638,"line":190},[1927,1931,1936,1941,1946,1951],{"type":606,"tag":636,"props":1928,"children":1929},{"style":673},[1930],{"type":612,"value":1594},{"type":606,"tag":636,"props":1932,"children":1933},{"style":667},[1934],{"type":612,"value":1935}," len",{"type":606,"tag":636,"props":1937,"children":1938},{"style":749},[1939],{"type":612,"value":1940},"(parts) ",{"type":606,"tag":636,"props":1942,"children":1943},{"style":673},[1944],{"type":612,"value":1945},"!=",{"type":606,"tag":636,"props":1947,"children":1948},{"style":667},[1949],{"type":612,"value":1950}," 2",{"type":606,"tag":636,"props":1952,"children":1953},{"style":749},[1954],{"type":612,"value":752},{"type":606,"tag":636,"props":1956,"children":1957},{"class":638,"line":199},[1958,1962],{"type":606,"tag":636,"props":1959,"children":1960},{"style":673},[1961],{"type":612,"value":1157},{"type":606,"tag":636,"props":1963,"children":1964},{"style":667},[1965],{"type":612,"value":907},{"type":606,"tag":636,"props":1967,"children":1968},{"class":638,"line":208},[1969],{"type":606,"tag":636,"props":1970,"children":1971},{"style":749},[1972],{"type":612,"value":862},{"type":606,"tag":636,"props":1974,"children":1975},{"class":638,"line":217},[1976,1981,1985],{"type":606,"tag":636,"props":1977,"children":1978},{"style":749},[1979],{"type":612,"value":1980},"    username, domain ",{"type":606,"tag":636,"props":1982,"children":1983},{"style":673},[1984],{"type":612,"value":807},{"type":606,"tag":636,"props":1986,"children":1987},{"style":749},[1988],{"type":612,"value":1989}," parts\n",{"type":606,"tag":636,"props":1991,"children":1992},{"class":638,"line":227},[1993,1997,2001,2006,2011,2016,2021,2026,2030],{"type":606,"tag":636,"props":1994,"children":1995},{"style":673},[1996],{"type":612,"value":1788},{"type":606,"tag":636,"props":1998,"children":1999},{"style":667},[2000],{"type":612,"value":1935},{"type":606,"tag":636,"props":2002,"children":2003},{"style":749},[2004],{"type":612,"value":2005},"(username) ",{"type":606,"tag":636,"props":2007,"children":2008},{"style":673},[2009],{"type":612,"value":2010},">",{"type":606,"tag":636,"props":2012,"children":2013},{"style":667},[2014],{"type":612,"value":2015}," 0",{"type":606,"tag":636,"props":2017,"children":2018},{"style":673},[2019],{"type":612,"value":2020}," and",{"type":606,"tag":636,"props":2022,"children":2023},{"style":679},[2024],{"type":612,"value":2025}," '.'",{"type":606,"tag":636,"props":2027,"children":2028},{"style":673},[2029],{"type":612,"value":1874},{"type":606,"tag":636,"props":2031,"children":2032},{"style":749},[2033],{"type":612,"value":2034}," domain\n",{"type":606,"tag":636,"props":2036,"children":2037},{"class":638,"line":236},[2038],{"type":606,"tag":636,"props":2039,"children":2040},{"emptyLinePlaceholder":13},[2041],{"type":612,"value":653},{"type":606,"tag":636,"props":2043,"children":2044},{"class":638,"line":245},[2045,2049,2054,2059,2063,2068],{"type":606,"tag":636,"props":2046,"children":2047},{"style":673},[2048],{"type":612,"value":1239},{"type":606,"tag":636,"props":2050,"children":2051},{"style":743},[2052],{"type":612,"value":2053}," format_currency",{"type":606,"tag":636,"props":2055,"children":2056},{"style":749},[2057],{"type":612,"value":2058},"(amount, currency",{"type":606,"tag":636,"props":2060,"children":2061},{"style":673},[2062],{"type":612,"value":807},{"type":606,"tag":636,"props":2064,"children":2065},{"style":679},[2066],{"type":612,"value":2067},"'USD'",{"type":606,"tag":636,"props":2069,"children":2070},{"style":749},[2071],{"type":612,"value":789},{"type":606,"tag":636,"props":2073,"children":2074},{"class":638,"line":254},[2075],{"type":606,"tag":636,"props":2076,"children":2077},{"style":679},[2078],{"type":612,"value":2079},"    \"\"\"Format amount as currency string.\"\"\"\n",{"type":606,"tag":636,"props":2081,"children":2082},{"class":638,"line":263},[2083,2088,2092],{"type":606,"tag":636,"props":2084,"children":2085},{"style":749},[2086],{"type":612,"value":2087},"    symbols ",{"type":606,"tag":636,"props":2089,"children":2090},{"style":673},[2091],{"type":612,"value":807},{"type":606,"tag":636,"props":2093,"children":2094},{"style":749},[2095],{"type":612,"value":2096}," {\n",{"type":606,"tag":636,"props":2098,"children":2099},{"class":638,"line":272},[2100,2105,2110,2115],{"type":606,"tag":636,"props":2101,"children":2102},{"style":679},[2103],{"type":612,"value":2104},"        'USD'",{"type":606,"tag":636,"props":2106,"children":2107},{"style":749},[2108],{"type":612,"value":2109},": ",{"type":606,"tag":636,"props":2111,"children":2112},{"style":679},[2113],{"type":612,"value":2114},"'$'",{"type":606,"tag":636,"props":2116,"children":2117},{"style":749},[2118],{"type":612,"value":2119},",\n",{"type":606,"tag":636,"props":2121,"children":2122},{"class":638,"line":281},[2123,2128,2132,2137],{"type":606,"tag":636,"props":2124,"children":2125},{"style":679},[2126],{"type":612,"value":2127},"        'EUR'",{"type":606,"tag":636,"props":2129,"children":2130},{"style":749},[2131],{"type":612,"value":2109},{"type":606,"tag":636,"props":2133,"children":2134},{"style":679},[2135],{"type":612,"value":2136},"'€'",{"type":606,"tag":636,"props":2138,"children":2139},{"style":749},[2140],{"type":612,"value":2119},{"type":606,"tag":636,"props":2142,"children":2143},{"class":638,"line":291},[2144,2149,2153],{"type":606,"tag":636,"props":2145,"children":2146},{"style":679},[2147],{"type":612,"value":2148},"        'GBP'",{"type":606,"tag":636,"props":2150,"children":2151},{"style":749},[2152],{"type":612,"value":2109},{"type":606,"tag":636,"props":2154,"children":2155},{"style":679},[2156],{"type":612,"value":2157},"'£'\n",{"type":606,"tag":636,"props":2159,"children":2160},{"class":638,"line":302},[2161],{"type":606,"tag":636,"props":2162,"children":2163},{"style":749},[2164],{"type":612,"value":2165},"    }\n",{"type":606,"tag":636,"props":2167,"children":2168},{"class":638,"line":311},[2169],{"type":606,"tag":636,"props":2170,"children":2171},{"style":749},[2172],{"type":612,"value":862},{"type":606,"tag":636,"props":2174,"children":2175},{"class":638,"line":320},[2176,2181,2185,2190,2194],{"type":606,"tag":636,"props":2177,"children":2178},{"style":749},[2179],{"type":612,"value":2180},"    symbol ",{"type":606,"tag":636,"props":2182,"children":2183},{"style":673},[2184],{"type":612,"value":807},{"type":606,"tag":636,"props":2186,"children":2187},{"style":749},[2188],{"type":612,"value":2189}," symbols.get(currency, ",{"type":606,"tag":636,"props":2191,"children":2192},{"style":679},[2193],{"type":612,"value":2114},{"type":606,"tag":636,"props":2195,"children":2196},{"style":749},[2197],{"type":612,"value":1103},{"type":606,"tag":636,"props":2199,"children":2200},{"class":638,"line":329},[2201,2205,2210,2214,2218,2223,2228,2233,2238,2242],{"type":606,"tag":636,"props":2202,"children":2203},{"style":673},[2204],{"type":612,"value":1788},{"type":606,"tag":636,"props":2206,"children":2207},{"style":673},[2208],{"type":612,"value":2209}," f",{"type":606,"tag":636,"props":2211,"children":2212},{"style":679},[2213],{"type":612,"value":1341},{"type":606,"tag":636,"props":2215,"children":2216},{"style":667},[2217],{"type":612,"value":1083},{"type":606,"tag":636,"props":2219,"children":2220},{"style":749},[2221],{"type":612,"value":2222},"symbol",{"type":606,"tag":636,"props":2224,"children":2225},{"style":667},[2226],{"type":612,"value":2227},"}{",{"type":606,"tag":636,"props":2229,"children":2230},{"style":749},[2231],{"type":612,"value":2232},"amount",{"type":606,"tag":636,"props":2234,"children":2235},{"style":673},[2236],{"type":612,"value":2237},":.2f",{"type":606,"tag":636,"props":2239,"children":2240},{"style":667},[2241],{"type":612,"value":1093},{"type":606,"tag":636,"props":2243,"children":2244},{"style":679},[2245],{"type":612,"value":2246},"\"\n",{"type":606,"tag":636,"props":2248,"children":2249},{"class":638,"line":338},[2250],{"type":606,"tag":636,"props":2251,"children":2252},{"emptyLinePlaceholder":13},[2253],{"type":612,"value":653},{"type":606,"tag":636,"props":2255,"children":2256},{"class":638,"line":347},[2257],{"type":606,"tag":636,"props":2258,"children":2259},{"style":642},[2260],{"type":612,"value":2261},"# Example usage demonstrating clear function purposes\n",{"type":606,"tag":636,"props":2263,"children":2264},{"class":638,"line":356},[2265,2269,2274],{"type":606,"tag":636,"props":2266,"children":2267},{"style":673},[2268],{"type":612,"value":1239},{"type":606,"tag":636,"props":2270,"children":2271},{"style":743},[2272],{"type":612,"value":2273}," process_order",{"type":606,"tag":636,"props":2275,"children":2276},{"style":749},[2277],{"type":612,"value":1249},{"type":606,"tag":636,"props":2279,"children":2280},{"class":638,"line":367},[2281],{"type":606,"tag":636,"props":2282,"children":2283},{"style":679},[2284],{"type":612,"value":2285},"    \"\"\"Process a customer order with proper structure.\"\"\"\n",{"type":606,"tag":636,"props":2287,"children":2288},{"class":638,"line":376},[2289],{"type":606,"tag":636,"props":2290,"children":2291},{"style":749},[2292],{"type":612,"value":862},{"type":606,"tag":636,"props":2294,"children":2295},{"class":638,"line":385},[2296],{"type":606,"tag":636,"props":2297,"children":2298},{"style":642},[2299],{"type":612,"value":2300},"    # Sample order data\n",{"type":606,"tag":636,"props":2302,"children":2303},{"class":638,"line":394},[2304,2309,2313],{"type":606,"tag":636,"props":2305,"children":2306},{"style":749},[2307],{"type":612,"value":2308},"    items ",{"type":606,"tag":636,"props":2310,"children":2311},{"style":673},[2312],{"type":612,"value":807},{"type":606,"tag":636,"props":2314,"children":2315},{"style":749},[2316],{"type":612,"value":2317}," [\n",{"type":606,"tag":636,"props":2319,"children":2320},{"class":638,"line":403},[2321,2326,2331,2335,2340,2344,2348,2352,2357,2361,2365,2369,2373],{"type":606,"tag":636,"props":2322,"children":2323},{"style":749},[2324],{"type":612,"value":2325},"        {",{"type":606,"tag":636,"props":2327,"children":2328},{"style":679},[2329],{"type":612,"value":2330},"'name'",{"type":606,"tag":636,"props":2332,"children":2333},{"style":749},[2334],{"type":612,"value":2109},{"type":606,"tag":636,"props":2336,"children":2337},{"style":679},[2338],{"type":612,"value":2339},"'Laptop'",{"type":606,"tag":636,"props":2341,"children":2342},{"style":749},[2343],{"type":612,"value":1293},{"type":606,"tag":636,"props":2345,"children":2346},{"style":679},[2347],{"type":612,"value":1650},{"type":606,"tag":636,"props":2349,"children":2350},{"style":749},[2351],{"type":612,"value":2109},{"type":606,"tag":636,"props":2353,"children":2354},{"style":667},[2355],{"type":612,"value":2356},"999.99",{"type":606,"tag":636,"props":2358,"children":2359},{"style":749},[2360],{"type":612,"value":1293},{"type":606,"tag":636,"props":2362,"children":2363},{"style":679},[2364],{"type":612,"value":1670},{"type":606,"tag":636,"props":2366,"children":2367},{"style":749},[2368],{"type":612,"value":2109},{"type":606,"tag":636,"props":2370,"children":2371},{"style":667},[2372],{"type":612,"value":1724},{"type":606,"tag":636,"props":2374,"children":2375},{"style":749},[2376],{"type":612,"value":2377},"},\n",{"type":606,"tag":636,"props":2379,"children":2380},{"class":638,"line":412},[2381,2385,2389,2393,2398,2402,2406,2410,2415,2419,2423,2427,2431],{"type":606,"tag":636,"props":2382,"children":2383},{"style":749},[2384],{"type":612,"value":2325},{"type":606,"tag":636,"props":2386,"children":2387},{"style":679},[2388],{"type":612,"value":2330},{"type":606,"tag":636,"props":2390,"children":2391},{"style":749},[2392],{"type":612,"value":2109},{"type":606,"tag":636,"props":2394,"children":2395},{"style":679},[2396],{"type":612,"value":2397},"'Mouse'",{"type":606,"tag":636,"props":2399,"children":2400},{"style":749},[2401],{"type":612,"value":1293},{"type":606,"tag":636,"props":2403,"children":2404},{"style":679},[2405],{"type":612,"value":1650},{"type":606,"tag":636,"props":2407,"children":2408},{"style":749},[2409],{"type":612,"value":2109},{"type":606,"tag":636,"props":2411,"children":2412},{"style":667},[2413],{"type":612,"value":2414},"29.99",{"type":606,"tag":636,"props":2416,"children":2417},{"style":749},[2418],{"type":612,"value":1293},{"type":606,"tag":636,"props":2420,"children":2421},{"style":679},[2422],{"type":612,"value":1670},{"type":606,"tag":636,"props":2424,"children":2425},{"style":749},[2426],{"type":612,"value":2109},{"type":606,"tag":636,"props":2428,"children":2429},{"style":667},[2430],{"type":612,"value":1803},{"type":606,"tag":636,"props":2432,"children":2433},{"style":749},[2434],{"type":612,"value":2435},"}\n",{"type":606,"tag":636,"props":2437,"children":2438},{"class":638,"line":423},[2439],{"type":606,"tag":636,"props":2440,"children":2441},{"style":749},[2442],{"type":612,"value":2443},"    ]\n",{"type":606,"tag":636,"props":2445,"children":2446},{"class":638,"line":432},[2447],{"type":606,"tag":636,"props":2448,"children":2449},{"style":749},[2450],{"type":612,"value":862},{"type":606,"tag":636,"props":2452,"children":2453},{"class":638,"line":441},[2454,2459,2463],{"type":606,"tag":636,"props":2455,"children":2456},{"style":749},[2457],{"type":612,"value":2458},"    customer_email ",{"type":606,"tag":636,"props":2460,"children":2461},{"style":673},[2462],{"type":612,"value":807},{"type":606,"tag":636,"props":2464,"children":2465},{"style":679},[2466],{"type":612,"value":2467}," \"customer@example.com\"\n",{"type":606,"tag":636,"props":2469,"children":2470},{"class":638,"line":450},[2471],{"type":606,"tag":636,"props":2472,"children":2473},{"style":749},[2474],{"type":612,"value":862},{"type":606,"tag":636,"props":2476,"children":2477},{"class":638,"line":459},[2478],{"type":606,"tag":636,"props":2479,"children":2480},{"style":642},[2481],{"type":612,"value":2482},"    # Validate customer\n",{"type":606,"tag":636,"props":2484,"children":2485},{"class":638,"line":468},[2486,2490,2494],{"type":606,"tag":636,"props":2487,"children":2488},{"style":673},[2489],{"type":612,"value":1594},{"type":606,"tag":636,"props":2491,"children":2492},{"style":673},[2493],{"type":612,"value":1599},{"type":606,"tag":636,"props":2495,"children":2496},{"style":749},[2497],{"type":612,"value":2498}," validate_email(customer_email):\n",{"type":606,"tag":636,"props":2500,"children":2501},{"class":638,"line":477},[2502,2507,2511,2516],{"type":606,"tag":636,"props":2503,"children":2504},{"style":667},[2505],{"type":612,"value":2506},"        print",{"type":606,"tag":636,"props":2508,"children":2509},{"style":749},[2510],{"type":612,"value":1068},{"type":606,"tag":636,"props":2512,"children":2513},{"style":679},[2514],{"type":612,"value":2515},"\"Invalid customer email\"",{"type":606,"tag":636,"props":2517,"children":2518},{"style":749},[2519],{"type":612,"value":1103},{"type":606,"tag":636,"props":2521,"children":2522},{"class":638,"line":488},[2523],{"type":606,"tag":636,"props":2524,"children":2525},{"style":673},[2526],{"type":612,"value":2527},"        return\n",{"type":606,"tag":636,"props":2529,"children":2530},{"class":638,"line":497},[2531],{"type":606,"tag":636,"props":2532,"children":2533},{"style":749},[2534],{"type":612,"value":862},{"type":606,"tag":636,"props":2536,"children":2537},{"class":638,"line":506},[2538],{"type":606,"tag":636,"props":2539,"children":2540},{"style":642},[2541],{"type":612,"value":2542},"    # Calculate totals\n",{"type":606,"tag":636,"props":2544,"children":2545},{"class":638,"line":515},[2546,2551,2555,2560,2566,2570,2574,2578,2583,2587,2592],{"type":606,"tag":636,"props":2547,"children":2548},{"style":749},[2549],{"type":612,"value":2550},"    total ",{"type":606,"tag":636,"props":2552,"children":2553},{"style":673},[2554],{"type":612,"value":807},{"type":606,"tag":636,"props":2556,"children":2557},{"style":749},[2558],{"type":612,"value":2559}," calculate_total_price(items, ",{"type":606,"tag":636,"props":2561,"children":2563},{"style":2562},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[2564],{"type":612,"value":2565},"tax_rate",{"type":606,"tag":636,"props":2567,"children":2568},{"style":673},[2569],{"type":612,"value":807},{"type":606,"tag":636,"props":2571,"children":2572},{"style":667},[2573],{"type":612,"value":1560},{"type":606,"tag":636,"props":2575,"children":2576},{"style":749},[2577],{"type":612,"value":1293},{"type":606,"tag":636,"props":2579,"children":2580},{"style":2562},[2581],{"type":612,"value":2582},"discount",{"type":606,"tag":636,"props":2584,"children":2585},{"style":673},[2586],{"type":612,"value":807},{"type":606,"tag":636,"props":2588,"children":2589},{"style":667},[2590],{"type":612,"value":2591},"0.1",{"type":606,"tag":636,"props":2593,"children":2594},{"style":749},[2595],{"type":612,"value":1103},{"type":606,"tag":636,"props":2597,"children":2598},{"class":638,"line":524},[2599,2604,2608],{"type":606,"tag":636,"props":2600,"children":2601},{"style":749},[2602],{"type":612,"value":2603},"    formatted_total ",{"type":606,"tag":636,"props":2605,"children":2606},{"style":673},[2607],{"type":612,"value":807},{"type":606,"tag":636,"props":2609,"children":2610},{"style":749},[2611],{"type":612,"value":2612}," format_currency(total)\n",{"type":606,"tag":636,"props":2614,"children":2615},{"class":638,"line":533},[2616],{"type":606,"tag":636,"props":2617,"children":2618},{"style":749},[2619],{"type":612,"value":862},{"type":606,"tag":636,"props":2621,"children":2622},{"class":638,"line":544},[2623,2627,2631,2635,2640,2644,2649,2653,2657],{"type":606,"tag":636,"props":2624,"children":2625},{"style":667},[2626],{"type":612,"value":1310},{"type":606,"tag":636,"props":2628,"children":2629},{"style":749},[2630],{"type":612,"value":1068},{"type":606,"tag":636,"props":2632,"children":2633},{"style":673},[2634],{"type":612,"value":1073},{"type":606,"tag":636,"props":2636,"children":2637},{"style":679},[2638],{"type":612,"value":2639},"\"Order total: ",{"type":606,"tag":636,"props":2641,"children":2642},{"style":667},[2643],{"type":612,"value":1083},{"type":606,"tag":636,"props":2645,"children":2646},{"style":749},[2647],{"type":612,"value":2648},"formatted_total",{"type":606,"tag":636,"props":2650,"children":2651},{"style":667},[2652],{"type":612,"value":1093},{"type":606,"tag":636,"props":2654,"children":2655},{"style":679},[2656],{"type":612,"value":1341},{"type":606,"tag":636,"props":2658,"children":2659},{"style":749},[2660],{"type":612,"value":1103},{"type":606,"tag":636,"props":2662,"children":2663},{"class":638,"line":553},[2664,2668,2672,2676,2681,2685,2690,2694,2698],{"type":606,"tag":636,"props":2665,"children":2666},{"style":667},[2667],{"type":612,"value":1310},{"type":606,"tag":636,"props":2669,"children":2670},{"style":749},[2671],{"type":612,"value":1068},{"type":606,"tag":636,"props":2673,"children":2674},{"style":673},[2675],{"type":612,"value":1073},{"type":606,"tag":636,"props":2677,"children":2678},{"style":679},[2679],{"type":612,"value":2680},"\"Customer: ",{"type":606,"tag":636,"props":2682,"children":2683},{"style":667},[2684],{"type":612,"value":1083},{"type":606,"tag":636,"props":2686,"children":2687},{"style":749},[2688],{"type":612,"value":2689},"customer_email",{"type":606,"tag":636,"props":2691,"children":2692},{"style":667},[2693],{"type":612,"value":1093},{"type":606,"tag":636,"props":2695,"children":2696},{"style":679},[2697],{"type":612,"value":1341},{"type":606,"tag":636,"props":2699,"children":2700},{"style":749},[2701],{"type":612,"value":1103},{"type":606,"tag":636,"props":2703,"children":2704},{"class":638,"line":562},[2705],{"type":606,"tag":636,"props":2706,"children":2707},{"emptyLinePlaceholder":13},[2708],{"type":612,"value":653},{"type":606,"tag":636,"props":2710,"children":2711},{"class":638,"line":571},[2712],{"type":606,"tag":636,"props":2713,"children":2714},{"style":749},[2715],{"type":612,"value":2716},"process_order()\n",{"type":606,"tag":1504,"props":2718,"children":2720},{"id":2719},"class-organization",[2721],{"type":612,"value":2722},"Class Organization",{"type":606,"tag":621,"props":2724,"children":2725},{},[2726],{"type":606,"tag":625,"props":2727,"children":2729},{"className":627,"code":2728,"language":629,"meta":8,"style":8},"# Well-structured class design\n\nclass BankAccount:\n    \"\"\"Represents a bank account with basic operations.\"\"\"\n    \n    def __init__(self, account_number: str, initial_balance: float = 0.0):\n        \"\"\"Initialize account with number and balance.\"\"\"\n        self.account_number = account_number\n        self._balance = initial_balance  # Private attribute\n        self._transaction_history = []\n    \n    @property\n    def balance(self) -> float:\n        \"\"\"Get current account balance.\"\"\"\n        return self._balance\n    \n    def deposit(self, amount: float) -> bool:\n        \"\"\"Deposit money to the account.\"\"\"\n        if amount \u003C= 0:\n            return False\n        \n        self._balance += amount\n        self._add_transaction(\"deposit\", amount)\n        return True\n    \n    def withdraw(self, amount: float) -> bool:\n        \"\"\"Withdraw money from the account.\"\"\"\n        if amount \u003C= 0 or amount > self._balance:\n            return False\n        \n        self._balance -= amount\n        self._add_transaction(\"withdrawal\", amount)\n        return True\n    \n    def _add_transaction(self, transaction_type: str, amount: float):\n        \"\"\"Private method to record transactions.\"\"\"\n        from datetime import datetime\n        \n        transaction = {\n            'type': transaction_type,\n            'amount': amount,\n            'timestamp': datetime.now().isoformat(),\n            'balance_after': self._balance\n        }\n        self._transaction_history.append(transaction)\n    \n    def get_statement(self) -> list:\n        \"\"\"Get list of recent transactions.\"\"\"\n        return self._transaction_history.copy()\n\n# Example of inheritance and composition\nclass SavingsAccount(BankAccount):\n    \"\"\"Savings account with interest calculation.\"\"\"\n    \n    def __init__(self, account_number: str, initial_balance: float = 0.0, \n                 interest_rate: float = 0.02):\n        super().__init__(account_number, initial_balance)\n        self.interest_rate = interest_rate\n    \n    def calculate_interest(self) -> float:\n        \"\"\"Calculate interest on current balance.\"\"\"\n        return self._balance * self.interest_rate\n\n# Usage example\naccount = SavingsAccount(\"SAV-001\", 1000.0, 0.03)\naccount.deposit(500.0)\naccount.withdraw(200.0)\n\nprint(f\"Balance: ${account.balance:.2f}\")\nprint(f\"Annual Interest: ${account.calculate_interest():.2f}\")\nprint(f\"Transactions: {len(account.get_statement())}\")\n",[2730],{"type":606,"tag":632,"props":2731,"children":2732},{"__ignoreMap":8},[2733,2741,2748,2764,2772,2779,2822,2830,2851,2877,2898,2905,2918,2943,2951,2967,2974,3009,3017,3042,3054,3061,3082,3104,3115,3122,3154,3162,3203,3214,3221,3241,3261,3272,3279,3313,3321,3344,3351,3367,3380,3393,3406,3427,3435,3447,3454,3479,3487,3503,3510,3518,3543,3551,3558,3598,3623,3646,3667,3674,3698,3706,3734,3741,3750,3795,3813,3831,3839,3886,3932],{"type":606,"tag":636,"props":2734,"children":2735},{"class":638,"line":12},[2736],{"type":606,"tag":636,"props":2737,"children":2738},{"style":642},[2739],{"type":612,"value":2740},"# Well-structured class design\n",{"type":606,"tag":636,"props":2742,"children":2743},{"class":638,"line":27},[2744],{"type":606,"tag":636,"props":2745,"children":2746},{"emptyLinePlaceholder":13},[2747],{"type":612,"value":653},{"type":606,"tag":636,"props":2749,"children":2750},{"class":638,"line":36},[2751,2755,2760],{"type":606,"tag":636,"props":2752,"children":2753},{"style":673},[2754],{"type":612,"value":740},{"type":606,"tag":636,"props":2756,"children":2757},{"style":743},[2758],{"type":612,"value":2759}," BankAccount",{"type":606,"tag":636,"props":2761,"children":2762},{"style":749},[2763],{"type":612,"value":752},{"type":606,"tag":636,"props":2765,"children":2766},{"class":638,"line":45},[2767],{"type":606,"tag":636,"props":2768,"children":2769},{"style":679},[2770],{"type":612,"value":2771},"    \"\"\"Represents a bank account with basic operations.\"\"\"\n",{"type":606,"tag":636,"props":2773,"children":2774},{"class":638,"line":54},[2775],{"type":606,"tag":636,"props":2776,"children":2777},{"style":749},[2778],{"type":612,"value":862},{"type":606,"tag":636,"props":2780,"children":2781},{"class":638,"line":63},[2782,2786,2790,2795,2799,2804,2809,2813,2818],{"type":606,"tag":636,"props":2783,"children":2784},{"style":673},[2785],{"type":612,"value":760},{"type":606,"tag":636,"props":2787,"children":2788},{"style":667},[2789],{"type":612,"value":765},{"type":606,"tag":636,"props":2791,"children":2792},{"style":749},[2793],{"type":612,"value":2794},"(self, account_number: ",{"type":606,"tag":636,"props":2796,"children":2797},{"style":667},[2798],{"type":612,"value":775},{"type":606,"tag":636,"props":2800,"children":2801},{"style":749},[2802],{"type":612,"value":2803},", initial_balance: ",{"type":606,"tag":636,"props":2805,"children":2806},{"style":667},[2807],{"type":612,"value":2808},"float",{"type":606,"tag":636,"props":2810,"children":2811},{"style":673},[2812],{"type":612,"value":676},{"type":606,"tag":636,"props":2814,"children":2815},{"style":667},[2816],{"type":612,"value":2817}," 0.0",{"type":606,"tag":636,"props":2819,"children":2820},{"style":749},[2821],{"type":612,"value":789},{"type":606,"tag":636,"props":2823,"children":2824},{"class":638,"line":72},[2825],{"type":606,"tag":636,"props":2826,"children":2827},{"style":679},[2828],{"type":612,"value":2829},"        \"\"\"Initialize account with number and balance.\"\"\"\n",{"type":606,"tag":636,"props":2831,"children":2832},{"class":638,"line":81},[2833,2837,2842,2846],{"type":606,"tag":636,"props":2834,"children":2835},{"style":667},[2836],{"type":612,"value":797},{"type":606,"tag":636,"props":2838,"children":2839},{"style":749},[2840],{"type":612,"value":2841},".account_number ",{"type":606,"tag":636,"props":2843,"children":2844},{"style":673},[2845],{"type":612,"value":807},{"type":606,"tag":636,"props":2847,"children":2848},{"style":749},[2849],{"type":612,"value":2850}," account_number\n",{"type":606,"tag":636,"props":2852,"children":2853},{"class":638,"line":734},[2854,2858,2863,2867,2872],{"type":606,"tag":636,"props":2855,"children":2856},{"style":667},[2857],{"type":612,"value":797},{"type":606,"tag":636,"props":2859,"children":2860},{"style":749},[2861],{"type":612,"value":2862},"._balance ",{"type":606,"tag":636,"props":2864,"children":2865},{"style":673},[2866],{"type":612,"value":807},{"type":606,"tag":636,"props":2868,"children":2869},{"style":749},[2870],{"type":612,"value":2871}," initial_balance  ",{"type":606,"tag":636,"props":2873,"children":2874},{"style":642},[2875],{"type":612,"value":2876},"# Private attribute\n",{"type":606,"tag":636,"props":2878,"children":2879},{"class":638,"line":99},[2880,2884,2889,2893],{"type":606,"tag":636,"props":2881,"children":2882},{"style":667},[2883],{"type":612,"value":797},{"type":606,"tag":636,"props":2885,"children":2886},{"style":749},[2887],{"type":612,"value":2888},"._transaction_history ",{"type":606,"tag":636,"props":2890,"children":2891},{"style":673},[2892],{"type":612,"value":807},{"type":606,"tag":636,"props":2894,"children":2895},{"style":749},[2896],{"type":612,"value":2897}," []\n",{"type":606,"tag":636,"props":2899,"children":2900},{"class":638,"line":108},[2901],{"type":606,"tag":636,"props":2902,"children":2903},{"style":749},[2904],{"type":612,"value":862},{"type":606,"tag":636,"props":2906,"children":2907},{"class":638,"line":117},[2908,2913],{"type":606,"tag":636,"props":2909,"children":2910},{"style":743},[2911],{"type":612,"value":2912},"    @",{"type":606,"tag":636,"props":2914,"children":2915},{"style":667},[2916],{"type":612,"value":2917},"property\n",{"type":606,"tag":636,"props":2919,"children":2920},{"class":638,"line":126},[2921,2925,2930,2935,2939],{"type":606,"tag":636,"props":2922,"children":2923},{"style":673},[2924],{"type":612,"value":760},{"type":606,"tag":636,"props":2926,"children":2927},{"style":743},[2928],{"type":612,"value":2929}," balance",{"type":606,"tag":636,"props":2931,"children":2932},{"style":749},[2933],{"type":612,"value":2934},"(self) -> ",{"type":606,"tag":636,"props":2936,"children":2937},{"style":667},[2938],{"type":612,"value":2808},{"type":606,"tag":636,"props":2940,"children":2941},{"style":749},[2942],{"type":612,"value":752},{"type":606,"tag":636,"props":2944,"children":2945},{"class":638,"line":135},[2946],{"type":606,"tag":636,"props":2947,"children":2948},{"style":679},[2949],{"type":612,"value":2950},"        \"\"\"Get current account balance.\"\"\"\n",{"type":606,"tag":636,"props":2952,"children":2953},{"class":638,"line":144},[2954,2958,2962],{"type":606,"tag":636,"props":2955,"children":2956},{"style":673},[2957],{"type":612,"value":1157},{"type":606,"tag":636,"props":2959,"children":2960},{"style":667},[2961],{"type":612,"value":1045},{"type":606,"tag":636,"props":2963,"children":2964},{"style":749},[2965],{"type":612,"value":2966},"._balance\n",{"type":606,"tag":636,"props":2968,"children":2969},{"class":638,"line":153},[2970],{"type":606,"tag":636,"props":2971,"children":2972},{"style":749},[2973],{"type":612,"value":862},{"type":606,"tag":636,"props":2975,"children":2976},{"class":638,"line":163},[2977,2981,2986,2991,2995,3000,3005],{"type":606,"tag":636,"props":2978,"children":2979},{"style":673},[2980],{"type":612,"value":760},{"type":606,"tag":636,"props":2982,"children":2983},{"style":743},[2984],{"type":612,"value":2985}," deposit",{"type":606,"tag":636,"props":2987,"children":2988},{"style":749},[2989],{"type":612,"value":2990},"(self, amount: ",{"type":606,"tag":636,"props":2992,"children":2993},{"style":667},[2994],{"type":612,"value":2808},{"type":606,"tag":636,"props":2996,"children":2997},{"style":749},[2998],{"type":612,"value":2999},") -> ",{"type":606,"tag":636,"props":3001,"children":3002},{"style":667},[3003],{"type":612,"value":3004},"bool",{"type":606,"tag":636,"props":3006,"children":3007},{"style":749},[3008],{"type":612,"value":752},{"type":606,"tag":636,"props":3010,"children":3011},{"class":638,"line":172},[3012],{"type":606,"tag":636,"props":3013,"children":3014},{"style":679},[3015],{"type":612,"value":3016},"        \"\"\"Deposit money to the account.\"\"\"\n",{"type":606,"tag":636,"props":3018,"children":3019},{"class":638,"line":181},[3020,3024,3029,3034,3038],{"type":606,"tag":636,"props":3021,"children":3022},{"style":673},[3023],{"type":612,"value":1030},{"type":606,"tag":636,"props":3025,"children":3026},{"style":749},[3027],{"type":612,"value":3028}," amount ",{"type":606,"tag":636,"props":3030,"children":3031},{"style":673},[3032],{"type":612,"value":3033},"\u003C=",{"type":606,"tag":636,"props":3035,"children":3036},{"style":667},[3037],{"type":612,"value":2015},{"type":606,"tag":636,"props":3039,"children":3040},{"style":749},[3041],{"type":612,"value":752},{"type":606,"tag":636,"props":3043,"children":3044},{"class":638,"line":190},[3045,3050],{"type":606,"tag":636,"props":3046,"children":3047},{"style":673},[3048],{"type":612,"value":3049},"            return",{"type":606,"tag":636,"props":3051,"children":3052},{"style":667},[3053],{"type":612,"value":907},{"type":606,"tag":636,"props":3055,"children":3056},{"class":638,"line":199},[3057],{"type":606,"tag":636,"props":3058,"children":3059},{"style":749},[3060],{"type":612,"value":1111},{"type":606,"tag":636,"props":3062,"children":3063},{"class":638,"line":208},[3064,3068,3072,3077],{"type":606,"tag":636,"props":3065,"children":3066},{"style":667},[3067],{"type":612,"value":797},{"type":606,"tag":636,"props":3069,"children":3070},{"style":749},[3071],{"type":612,"value":2862},{"type":606,"tag":636,"props":3073,"children":3074},{"style":673},[3075],{"type":612,"value":3076},"+=",{"type":606,"tag":636,"props":3078,"children":3079},{"style":749},[3080],{"type":612,"value":3081}," amount\n",{"type":606,"tag":636,"props":3083,"children":3084},{"class":638,"line":217},[3085,3089,3094,3099],{"type":606,"tag":636,"props":3086,"children":3087},{"style":667},[3088],{"type":612,"value":797},{"type":606,"tag":636,"props":3090,"children":3091},{"style":749},[3092],{"type":612,"value":3093},"._add_transaction(",{"type":606,"tag":636,"props":3095,"children":3096},{"style":679},[3097],{"type":612,"value":3098},"\"deposit\"",{"type":606,"tag":636,"props":3100,"children":3101},{"style":749},[3102],{"type":612,"value":3103},", amount)\n",{"type":606,"tag":636,"props":3105,"children":3106},{"class":638,"line":227},[3107,3111],{"type":606,"tag":636,"props":3108,"children":3109},{"style":673},[3110],{"type":612,"value":1157},{"type":606,"tag":636,"props":3112,"children":3113},{"style":667},[3114],{"type":612,"value":854},{"type":606,"tag":636,"props":3116,"children":3117},{"class":638,"line":236},[3118],{"type":606,"tag":636,"props":3119,"children":3120},{"style":749},[3121],{"type":612,"value":862},{"type":606,"tag":636,"props":3123,"children":3124},{"class":638,"line":245},[3125,3129,3134,3138,3142,3146,3150],{"type":606,"tag":636,"props":3126,"children":3127},{"style":673},[3128],{"type":612,"value":760},{"type":606,"tag":636,"props":3130,"children":3131},{"style":743},[3132],{"type":612,"value":3133}," withdraw",{"type":606,"tag":636,"props":3135,"children":3136},{"style":749},[3137],{"type":612,"value":2990},{"type":606,"tag":636,"props":3139,"children":3140},{"style":667},[3141],{"type":612,"value":2808},{"type":606,"tag":636,"props":3143,"children":3144},{"style":749},[3145],{"type":612,"value":2999},{"type":606,"tag":636,"props":3147,"children":3148},{"style":667},[3149],{"type":612,"value":3004},{"type":606,"tag":636,"props":3151,"children":3152},{"style":749},[3153],{"type":612,"value":752},{"type":606,"tag":636,"props":3155,"children":3156},{"class":638,"line":254},[3157],{"type":606,"tag":636,"props":3158,"children":3159},{"style":679},[3160],{"type":612,"value":3161},"        \"\"\"Withdraw money from the account.\"\"\"\n",{"type":606,"tag":636,"props":3163,"children":3164},{"class":638,"line":263},[3165,3169,3173,3177,3181,3186,3190,3194,3198],{"type":606,"tag":636,"props":3166,"children":3167},{"style":673},[3168],{"type":612,"value":1030},{"type":606,"tag":636,"props":3170,"children":3171},{"style":749},[3172],{"type":612,"value":3028},{"type":606,"tag":636,"props":3174,"children":3175},{"style":673},[3176],{"type":612,"value":3033},{"type":606,"tag":636,"props":3178,"children":3179},{"style":667},[3180],{"type":612,"value":2015},{"type":606,"tag":636,"props":3182,"children":3183},{"style":673},[3184],{"type":612,"value":3185}," or",{"type":606,"tag":636,"props":3187,"children":3188},{"style":749},[3189],{"type":612,"value":3028},{"type":606,"tag":636,"props":3191,"children":3192},{"style":673},[3193],{"type":612,"value":2010},{"type":606,"tag":636,"props":3195,"children":3196},{"style":667},[3197],{"type":612,"value":1045},{"type":606,"tag":636,"props":3199,"children":3200},{"style":749},[3201],{"type":612,"value":3202},"._balance:\n",{"type":606,"tag":636,"props":3204,"children":3205},{"class":638,"line":272},[3206,3210],{"type":606,"tag":636,"props":3207,"children":3208},{"style":673},[3209],{"type":612,"value":3049},{"type":606,"tag":636,"props":3211,"children":3212},{"style":667},[3213],{"type":612,"value":907},{"type":606,"tag":636,"props":3215,"children":3216},{"class":638,"line":281},[3217],{"type":606,"tag":636,"props":3218,"children":3219},{"style":749},[3220],{"type":612,"value":1111},{"type":606,"tag":636,"props":3222,"children":3223},{"class":638,"line":291},[3224,3228,3232,3237],{"type":606,"tag":636,"props":3225,"children":3226},{"style":667},[3227],{"type":612,"value":797},{"type":606,"tag":636,"props":3229,"children":3230},{"style":749},[3231],{"type":612,"value":2862},{"type":606,"tag":636,"props":3233,"children":3234},{"style":673},[3235],{"type":612,"value":3236},"-=",{"type":606,"tag":636,"props":3238,"children":3239},{"style":749},[3240],{"type":612,"value":3081},{"type":606,"tag":636,"props":3242,"children":3243},{"class":638,"line":302},[3244,3248,3252,3257],{"type":606,"tag":636,"props":3245,"children":3246},{"style":667},[3247],{"type":612,"value":797},{"type":606,"tag":636,"props":3249,"children":3250},{"style":749},[3251],{"type":612,"value":3093},{"type":606,"tag":636,"props":3253,"children":3254},{"style":679},[3255],{"type":612,"value":3256},"\"withdrawal\"",{"type":606,"tag":636,"props":3258,"children":3259},{"style":749},[3260],{"type":612,"value":3103},{"type":606,"tag":636,"props":3262,"children":3263},{"class":638,"line":311},[3264,3268],{"type":606,"tag":636,"props":3265,"children":3266},{"style":673},[3267],{"type":612,"value":1157},{"type":606,"tag":636,"props":3269,"children":3270},{"style":667},[3271],{"type":612,"value":854},{"type":606,"tag":636,"props":3273,"children":3274},{"class":638,"line":320},[3275],{"type":606,"tag":636,"props":3276,"children":3277},{"style":749},[3278],{"type":612,"value":862},{"type":606,"tag":636,"props":3280,"children":3281},{"class":638,"line":329},[3282,3286,3291,3296,3300,3305,3309],{"type":606,"tag":636,"props":3283,"children":3284},{"style":673},[3285],{"type":612,"value":760},{"type":606,"tag":636,"props":3287,"children":3288},{"style":743},[3289],{"type":612,"value":3290}," _add_transaction",{"type":606,"tag":636,"props":3292,"children":3293},{"style":749},[3294],{"type":612,"value":3295},"(self, transaction_type: ",{"type":606,"tag":636,"props":3297,"children":3298},{"style":667},[3299],{"type":612,"value":775},{"type":606,"tag":636,"props":3301,"children":3302},{"style":749},[3303],{"type":612,"value":3304},", amount: ",{"type":606,"tag":636,"props":3306,"children":3307},{"style":667},[3308],{"type":612,"value":2808},{"type":606,"tag":636,"props":3310,"children":3311},{"style":749},[3312],{"type":612,"value":789},{"type":606,"tag":636,"props":3314,"children":3315},{"class":638,"line":338},[3316],{"type":606,"tag":636,"props":3317,"children":3318},{"style":679},[3319],{"type":612,"value":3320},"        \"\"\"Private method to record transactions.\"\"\"\n",{"type":606,"tag":636,"props":3322,"children":3323},{"class":638,"line":347},[3324,3329,3334,3339],{"type":606,"tag":636,"props":3325,"children":3326},{"style":673},[3327],{"type":612,"value":3328},"        from",{"type":606,"tag":636,"props":3330,"children":3331},{"style":749},[3332],{"type":612,"value":3333}," datetime ",{"type":606,"tag":636,"props":3335,"children":3336},{"style":673},[3337],{"type":612,"value":3338},"import",{"type":606,"tag":636,"props":3340,"children":3341},{"style":749},[3342],{"type":612,"value":3343}," datetime\n",{"type":606,"tag":636,"props":3345,"children":3346},{"class":638,"line":356},[3347],{"type":606,"tag":636,"props":3348,"children":3349},{"style":749},[3350],{"type":612,"value":1111},{"type":606,"tag":636,"props":3352,"children":3353},{"class":638,"line":367},[3354,3359,3363],{"type":606,"tag":636,"props":3355,"children":3356},{"style":749},[3357],{"type":612,"value":3358},"        transaction ",{"type":606,"tag":636,"props":3360,"children":3361},{"style":673},[3362],{"type":612,"value":807},{"type":606,"tag":636,"props":3364,"children":3365},{"style":749},[3366],{"type":612,"value":2096},{"type":606,"tag":636,"props":3368,"children":3369},{"class":638,"line":376},[3370,3375],{"type":606,"tag":636,"props":3371,"children":3372},{"style":679},[3373],{"type":612,"value":3374},"            'type'",{"type":606,"tag":636,"props":3376,"children":3377},{"style":749},[3378],{"type":612,"value":3379},": transaction_type,\n",{"type":606,"tag":636,"props":3381,"children":3382},{"class":638,"line":385},[3383,3388],{"type":606,"tag":636,"props":3384,"children":3385},{"style":679},[3386],{"type":612,"value":3387},"            'amount'",{"type":606,"tag":636,"props":3389,"children":3390},{"style":749},[3391],{"type":612,"value":3392},": amount,\n",{"type":606,"tag":636,"props":3394,"children":3395},{"class":638,"line":394},[3396,3401],{"type":606,"tag":636,"props":3397,"children":3398},{"style":679},[3399],{"type":612,"value":3400},"            'timestamp'",{"type":606,"tag":636,"props":3402,"children":3403},{"style":749},[3404],{"type":612,"value":3405},": datetime.now().isoformat(),\n",{"type":606,"tag":636,"props":3407,"children":3408},{"class":638,"line":403},[3409,3414,3418,3423],{"type":606,"tag":636,"props":3410,"children":3411},{"style":679},[3412],{"type":612,"value":3413},"            'balance_after'",{"type":606,"tag":636,"props":3415,"children":3416},{"style":749},[3417],{"type":612,"value":2109},{"type":606,"tag":636,"props":3419,"children":3420},{"style":667},[3421],{"type":612,"value":3422},"self",{"type":606,"tag":636,"props":3424,"children":3425},{"style":749},[3426],{"type":612,"value":2966},{"type":606,"tag":636,"props":3428,"children":3429},{"class":638,"line":412},[3430],{"type":606,"tag":636,"props":3431,"children":3432},{"style":749},[3433],{"type":612,"value":3434},"        }\n",{"type":606,"tag":636,"props":3436,"children":3437},{"class":638,"line":423},[3438,3442],{"type":606,"tag":636,"props":3439,"children":3440},{"style":667},[3441],{"type":612,"value":797},{"type":606,"tag":636,"props":3443,"children":3444},{"style":749},[3445],{"type":612,"value":3446},"._transaction_history.append(transaction)\n",{"type":606,"tag":636,"props":3448,"children":3449},{"class":638,"line":432},[3450],{"type":606,"tag":636,"props":3451,"children":3452},{"style":749},[3453],{"type":612,"value":862},{"type":606,"tag":636,"props":3455,"children":3456},{"class":638,"line":441},[3457,3461,3466,3470,3475],{"type":606,"tag":636,"props":3458,"children":3459},{"style":673},[3460],{"type":612,"value":760},{"type":606,"tag":636,"props":3462,"children":3463},{"style":743},[3464],{"type":612,"value":3465}," get_statement",{"type":606,"tag":636,"props":3467,"children":3468},{"style":749},[3469],{"type":612,"value":2934},{"type":606,"tag":636,"props":3471,"children":3472},{"style":667},[3473],{"type":612,"value":3474},"list",{"type":606,"tag":636,"props":3476,"children":3477},{"style":749},[3478],{"type":612,"value":752},{"type":606,"tag":636,"props":3480,"children":3481},{"class":638,"line":450},[3482],{"type":606,"tag":636,"props":3483,"children":3484},{"style":679},[3485],{"type":612,"value":3486},"        \"\"\"Get list of recent transactions.\"\"\"\n",{"type":606,"tag":636,"props":3488,"children":3489},{"class":638,"line":459},[3490,3494,3498],{"type":606,"tag":636,"props":3491,"children":3492},{"style":673},[3493],{"type":612,"value":1157},{"type":606,"tag":636,"props":3495,"children":3496},{"style":667},[3497],{"type":612,"value":1045},{"type":606,"tag":636,"props":3499,"children":3500},{"style":749},[3501],{"type":612,"value":3502},"._transaction_history.copy()\n",{"type":606,"tag":636,"props":3504,"children":3505},{"class":638,"line":468},[3506],{"type":606,"tag":636,"props":3507,"children":3508},{"emptyLinePlaceholder":13},[3509],{"type":612,"value":653},{"type":606,"tag":636,"props":3511,"children":3512},{"class":638,"line":477},[3513],{"type":606,"tag":636,"props":3514,"children":3515},{"style":642},[3516],{"type":612,"value":3517},"# Example of inheritance and composition\n",{"type":606,"tag":636,"props":3519,"children":3520},{"class":638,"line":488},[3521,3525,3530,3534,3539],{"type":606,"tag":636,"props":3522,"children":3523},{"style":673},[3524],{"type":612,"value":740},{"type":606,"tag":636,"props":3526,"children":3527},{"style":743},[3528],{"type":612,"value":3529}," SavingsAccount",{"type":606,"tag":636,"props":3531,"children":3532},{"style":749},[3533],{"type":612,"value":1068},{"type":606,"tag":636,"props":3535,"children":3536},{"style":743},[3537],{"type":612,"value":3538},"BankAccount",{"type":606,"tag":636,"props":3540,"children":3541},{"style":749},[3542],{"type":612,"value":789},{"type":606,"tag":636,"props":3544,"children":3545},{"class":638,"line":497},[3546],{"type":606,"tag":636,"props":3547,"children":3548},{"style":679},[3549],{"type":612,"value":3550},"    \"\"\"Savings account with interest calculation.\"\"\"\n",{"type":606,"tag":636,"props":3552,"children":3553},{"class":638,"line":506},[3554],{"type":606,"tag":636,"props":3555,"children":3556},{"style":749},[3557],{"type":612,"value":862},{"type":606,"tag":636,"props":3559,"children":3560},{"class":638,"line":515},[3561,3565,3569,3573,3577,3581,3585,3589,3593],{"type":606,"tag":636,"props":3562,"children":3563},{"style":673},[3564],{"type":612,"value":760},{"type":606,"tag":636,"props":3566,"children":3567},{"style":667},[3568],{"type":612,"value":765},{"type":606,"tag":636,"props":3570,"children":3571},{"style":749},[3572],{"type":612,"value":2794},{"type":606,"tag":636,"props":3574,"children":3575},{"style":667},[3576],{"type":612,"value":775},{"type":606,"tag":636,"props":3578,"children":3579},{"style":749},[3580],{"type":612,"value":2803},{"type":606,"tag":636,"props":3582,"children":3583},{"style":667},[3584],{"type":612,"value":2808},{"type":606,"tag":636,"props":3586,"children":3587},{"style":673},[3588],{"type":612,"value":676},{"type":606,"tag":636,"props":3590,"children":3591},{"style":667},[3592],{"type":612,"value":2817},{"type":606,"tag":636,"props":3594,"children":3595},{"style":749},[3596],{"type":612,"value":3597},", \n",{"type":606,"tag":636,"props":3599,"children":3600},{"class":638,"line":524},[3601,3606,3610,3614,3619],{"type":606,"tag":636,"props":3602,"children":3603},{"style":749},[3604],{"type":612,"value":3605},"                 interest_rate: ",{"type":606,"tag":636,"props":3607,"children":3608},{"style":667},[3609],{"type":612,"value":2808},{"type":606,"tag":636,"props":3611,"children":3612},{"style":673},[3613],{"type":612,"value":676},{"type":606,"tag":636,"props":3615,"children":3616},{"style":667},[3617],{"type":612,"value":3618}," 0.02",{"type":606,"tag":636,"props":3620,"children":3621},{"style":749},[3622],{"type":612,"value":789},{"type":606,"tag":636,"props":3624,"children":3625},{"class":638,"line":533},[3626,3631,3636,3641],{"type":606,"tag":636,"props":3627,"children":3628},{"style":667},[3629],{"type":612,"value":3630},"        super",{"type":606,"tag":636,"props":3632,"children":3633},{"style":749},[3634],{"type":612,"value":3635},"().",{"type":606,"tag":636,"props":3637,"children":3638},{"style":667},[3639],{"type":612,"value":3640},"__init__",{"type":606,"tag":636,"props":3642,"children":3643},{"style":749},[3644],{"type":612,"value":3645},"(account_number, initial_balance)\n",{"type":606,"tag":636,"props":3647,"children":3648},{"class":638,"line":544},[3649,3653,3658,3662],{"type":606,"tag":636,"props":3650,"children":3651},{"style":667},[3652],{"type":612,"value":797},{"type":606,"tag":636,"props":3654,"children":3655},{"style":749},[3656],{"type":612,"value":3657},".interest_rate ",{"type":606,"tag":636,"props":3659,"children":3660},{"style":673},[3661],{"type":612,"value":807},{"type":606,"tag":636,"props":3663,"children":3664},{"style":749},[3665],{"type":612,"value":3666}," interest_rate\n",{"type":606,"tag":636,"props":3668,"children":3669},{"class":638,"line":553},[3670],{"type":606,"tag":636,"props":3671,"children":3672},{"style":749},[3673],{"type":612,"value":862},{"type":606,"tag":636,"props":3675,"children":3676},{"class":638,"line":562},[3677,3681,3686,3690,3694],{"type":606,"tag":636,"props":3678,"children":3679},{"style":673},[3680],{"type":612,"value":760},{"type":606,"tag":636,"props":3682,"children":3683},{"style":743},[3684],{"type":612,"value":3685}," calculate_interest",{"type":606,"tag":636,"props":3687,"children":3688},{"style":749},[3689],{"type":612,"value":2934},{"type":606,"tag":636,"props":3691,"children":3692},{"style":667},[3693],{"type":612,"value":2808},{"type":606,"tag":636,"props":3695,"children":3696},{"style":749},[3697],{"type":612,"value":752},{"type":606,"tag":636,"props":3699,"children":3700},{"class":638,"line":571},[3701],{"type":606,"tag":636,"props":3702,"children":3703},{"style":679},[3704],{"type":612,"value":3705},"        \"\"\"Calculate interest on current balance.\"\"\"\n",{"type":606,"tag":636,"props":3707,"children":3708},{"class":638,"line":580},[3709,3713,3717,3721,3725,3729],{"type":606,"tag":636,"props":3710,"children":3711},{"style":673},[3712],{"type":612,"value":1157},{"type":606,"tag":636,"props":3714,"children":3715},{"style":667},[3716],{"type":612,"value":1045},{"type":606,"tag":636,"props":3718,"children":3719},{"style":749},[3720],{"type":612,"value":2862},{"type":606,"tag":636,"props":3722,"children":3723},{"style":673},[3724],{"type":612,"value":1660},{"type":606,"tag":636,"props":3726,"children":3727},{"style":667},[3728],{"type":612,"value":1045},{"type":606,"tag":636,"props":3730,"children":3731},{"style":749},[3732],{"type":612,"value":3733},".interest_rate\n",{"type":606,"tag":636,"props":3735,"children":3736},{"class":638,"line":589},[3737],{"type":606,"tag":636,"props":3738,"children":3739},{"emptyLinePlaceholder":13},[3740],{"type":612,"value":653},{"type":606,"tag":636,"props":3742,"children":3744},{"class":638,"line":3743},64,[3745],{"type":606,"tag":636,"props":3746,"children":3747},{"style":642},[3748],{"type":612,"value":3749},"# Usage example\n",{"type":606,"tag":636,"props":3751,"children":3753},{"class":638,"line":3752},65,[3754,3759,3763,3768,3773,3777,3782,3786,3791],{"type":606,"tag":636,"props":3755,"children":3756},{"style":749},[3757],{"type":612,"value":3758},"account ",{"type":606,"tag":636,"props":3760,"children":3761},{"style":673},[3762],{"type":612,"value":807},{"type":606,"tag":636,"props":3764,"children":3765},{"style":749},[3766],{"type":612,"value":3767}," SavingsAccount(",{"type":606,"tag":636,"props":3769,"children":3770},{"style":679},[3771],{"type":612,"value":3772},"\"SAV-001\"",{"type":606,"tag":636,"props":3774,"children":3775},{"style":749},[3776],{"type":612,"value":1293},{"type":606,"tag":636,"props":3778,"children":3779},{"style":667},[3780],{"type":612,"value":3781},"1000.0",{"type":606,"tag":636,"props":3783,"children":3784},{"style":749},[3785],{"type":612,"value":1293},{"type":606,"tag":636,"props":3787,"children":3788},{"style":667},[3789],{"type":612,"value":3790},"0.03",{"type":606,"tag":636,"props":3792,"children":3793},{"style":749},[3794],{"type":612,"value":1103},{"type":606,"tag":636,"props":3796,"children":3798},{"class":638,"line":3797},66,[3799,3804,3809],{"type":606,"tag":636,"props":3800,"children":3801},{"style":749},[3802],{"type":612,"value":3803},"account.deposit(",{"type":606,"tag":636,"props":3805,"children":3806},{"style":667},[3807],{"type":612,"value":3808},"500.0",{"type":606,"tag":636,"props":3810,"children":3811},{"style":749},[3812],{"type":612,"value":1103},{"type":606,"tag":636,"props":3814,"children":3816},{"class":638,"line":3815},67,[3817,3822,3827],{"type":606,"tag":636,"props":3818,"children":3819},{"style":749},[3820],{"type":612,"value":3821},"account.withdraw(",{"type":606,"tag":636,"props":3823,"children":3824},{"style":667},[3825],{"type":612,"value":3826},"200.0",{"type":606,"tag":636,"props":3828,"children":3829},{"style":749},[3830],{"type":612,"value":1103},{"type":606,"tag":636,"props":3832,"children":3834},{"class":638,"line":3833},68,[3835],{"type":606,"tag":636,"props":3836,"children":3837},{"emptyLinePlaceholder":13},[3838],{"type":612,"value":653},{"type":606,"tag":636,"props":3840,"children":3842},{"class":638,"line":3841},69,[3843,3848,3852,3856,3861,3865,3870,3874,3878,3882],{"type":606,"tag":636,"props":3844,"children":3845},{"style":667},[3846],{"type":612,"value":3847},"print",{"type":606,"tag":636,"props":3849,"children":3850},{"style":749},[3851],{"type":612,"value":1068},{"type":606,"tag":636,"props":3853,"children":3854},{"style":673},[3855],{"type":612,"value":1073},{"type":606,"tag":636,"props":3857,"children":3858},{"style":679},[3859],{"type":612,"value":3860},"\"Balance: $",{"type":606,"tag":636,"props":3862,"children":3863},{"style":667},[3864],{"type":612,"value":1083},{"type":606,"tag":636,"props":3866,"children":3867},{"style":749},[3868],{"type":612,"value":3869},"account.balance",{"type":606,"tag":636,"props":3871,"children":3872},{"style":673},[3873],{"type":612,"value":2237},{"type":606,"tag":636,"props":3875,"children":3876},{"style":667},[3877],{"type":612,"value":1093},{"type":606,"tag":636,"props":3879,"children":3880},{"style":679},[3881],{"type":612,"value":1341},{"type":606,"tag":636,"props":3883,"children":3884},{"style":749},[3885],{"type":612,"value":1103},{"type":606,"tag":636,"props":3887,"children":3889},{"class":638,"line":3888},70,[3890,3894,3898,3902,3907,3911,3916,3920,3924,3928],{"type":606,"tag":636,"props":3891,"children":3892},{"style":667},[3893],{"type":612,"value":3847},{"type":606,"tag":636,"props":3895,"children":3896},{"style":749},[3897],{"type":612,"value":1068},{"type":606,"tag":636,"props":3899,"children":3900},{"style":673},[3901],{"type":612,"value":1073},{"type":606,"tag":636,"props":3903,"children":3904},{"style":679},[3905],{"type":612,"value":3906},"\"Annual Interest: $",{"type":606,"tag":636,"props":3908,"children":3909},{"style":667},[3910],{"type":612,"value":1083},{"type":606,"tag":636,"props":3912,"children":3913},{"style":749},[3914],{"type":612,"value":3915},"account.calculate_interest()",{"type":606,"tag":636,"props":3917,"children":3918},{"style":673},[3919],{"type":612,"value":2237},{"type":606,"tag":636,"props":3921,"children":3922},{"style":667},[3923],{"type":612,"value":1093},{"type":606,"tag":636,"props":3925,"children":3926},{"style":679},[3927],{"type":612,"value":1341},{"type":606,"tag":636,"props":3929,"children":3930},{"style":749},[3931],{"type":612,"value":1103},{"type":606,"tag":636,"props":3933,"children":3935},{"class":638,"line":3934},71,[3936,3940,3944,3948,3953,3958,3963,3967,3971],{"type":606,"tag":636,"props":3937,"children":3938},{"style":667},[3939],{"type":612,"value":3847},{"type":606,"tag":636,"props":3941,"children":3942},{"style":749},[3943],{"type":612,"value":1068},{"type":606,"tag":636,"props":3945,"children":3946},{"style":673},[3947],{"type":612,"value":1073},{"type":606,"tag":636,"props":3949,"children":3950},{"style":679},[3951],{"type":612,"value":3952},"\"Transactions: ",{"type":606,"tag":636,"props":3954,"children":3955},{"style":667},[3956],{"type":612,"value":3957},"{len",{"type":606,"tag":636,"props":3959,"children":3960},{"style":749},[3961],{"type":612,"value":3962},"(account.get_statement())",{"type":606,"tag":636,"props":3964,"children":3965},{"style":667},[3966],{"type":612,"value":1093},{"type":606,"tag":636,"props":3968,"children":3969},{"style":679},[3970],{"type":612,"value":1341},{"type":606,"tag":636,"props":3972,"children":3973},{"style":749},[3974],{"type":612,"value":1103},{"type":606,"tag":1389,"props":3976,"children":3978},{"id":3977},"code-organization-patterns",[3979],{"type":612,"value":3980},"📋 Code Organization Patterns",{"type":606,"tag":3982,"props":3983,"children":3984},"table",{},[3985,4009],{"type":606,"tag":3986,"props":3987,"children":3988},"thead",{},[3989],{"type":606,"tag":3990,"props":3991,"children":3992},"tr",{},[3993,3999,4004],{"type":606,"tag":3994,"props":3995,"children":3996},"th",{},[3997],{"type":612,"value":3998},"Pattern",{"type":606,"tag":3994,"props":4000,"children":4001},{},[4002],{"type":612,"value":4003},"Purpose",{"type":606,"tag":3994,"props":4005,"children":4006},{},[4007],{"type":612,"value":4008},"Example",{"type":606,"tag":4010,"props":4011,"children":4012},"tbody",{},[4013,4046,4085,4124,4156],{"type":606,"tag":3990,"props":4014,"children":4015},{},[4016,4025,4030],{"type":606,"tag":4017,"props":4018,"children":4019},"td",{},[4020],{"type":606,"tag":1411,"props":4021,"children":4022},{},[4023],{"type":612,"value":4024},"Modules",{"type":606,"tag":4017,"props":4026,"children":4027},{},[4028],{"type":612,"value":4029},"Group related functions",{"type":606,"tag":4017,"props":4031,"children":4032},{},[4033,4039,4040],{"type":606,"tag":632,"props":4034,"children":4036},{"className":4035},[],[4037],{"type":612,"value":4038},"math_utils.py",{"type":612,"value":1293},{"type":606,"tag":632,"props":4041,"children":4043},{"className":4042},[],[4044],{"type":612,"value":4045},"file_helpers.py",{"type":606,"tag":3990,"props":4047,"children":4048},{},[4049,4057,4062],{"type":606,"tag":4017,"props":4050,"children":4051},{},[4052],{"type":606,"tag":1411,"props":4053,"children":4054},{},[4055],{"type":612,"value":4056},"Classes",{"type":606,"tag":4017,"props":4058,"children":4059},{},[4060],{"type":612,"value":4061},"Bundle data and methods",{"type":606,"tag":4017,"props":4063,"children":4064},{},[4065,4071,4072,4078,4079],{"type":606,"tag":632,"props":4066,"children":4068},{"className":4067},[],[4069],{"type":612,"value":4070},"User",{"type":612,"value":1293},{"type":606,"tag":632,"props":4073,"children":4075},{"className":4074},[],[4076],{"type":612,"value":4077},"Product",{"type":612,"value":1293},{"type":606,"tag":632,"props":4080,"children":4082},{"className":4081},[],[4083],{"type":612,"value":4084},"Calculator",{"type":606,"tag":3990,"props":4086,"children":4087},{},[4088,4096,4101],{"type":606,"tag":4017,"props":4089,"children":4090},{},[4091],{"type":606,"tag":1411,"props":4092,"children":4093},{},[4094],{"type":612,"value":4095},"Packages",{"type":606,"tag":4017,"props":4097,"children":4098},{},[4099],{"type":612,"value":4100},"Organize multiple modules",{"type":606,"tag":4017,"props":4102,"children":4103},{},[4104,4110,4111,4117,4118],{"type":606,"tag":632,"props":4105,"children":4107},{"className":4106},[],[4108],{"type":612,"value":4109},"models/",{"type":612,"value":1293},{"type":606,"tag":632,"props":4112,"children":4114},{"className":4113},[],[4115],{"type":612,"value":4116},"services/",{"type":612,"value":1293},{"type":606,"tag":632,"props":4119,"children":4121},{"className":4120},[],[4122],{"type":612,"value":4123},"utils/",{"type":606,"tag":3990,"props":4125,"children":4126},{},[4127,4135,4140],{"type":606,"tag":4017,"props":4128,"children":4129},{},[4130],{"type":606,"tag":1411,"props":4131,"children":4132},{},[4133],{"type":612,"value":4134},"Functions",{"type":606,"tag":4017,"props":4136,"children":4137},{},[4138],{"type":612,"value":4139},"Single-purpose operations",{"type":606,"tag":4017,"props":4141,"children":4142},{},[4143,4149,4150],{"type":606,"tag":632,"props":4144,"children":4146},{"className":4145},[],[4147],{"type":612,"value":4148},"validate_email()",{"type":612,"value":1293},{"type":606,"tag":632,"props":4151,"children":4153},{"className":4152},[],[4154],{"type":612,"value":4155},"format_date()",{"type":606,"tag":3990,"props":4157,"children":4158},{},[4159,4167,4172],{"type":606,"tag":4017,"props":4160,"children":4161},{},[4162],{"type":606,"tag":1411,"props":4163,"children":4164},{},[4165],{"type":612,"value":4166},"Constants",{"type":606,"tag":4017,"props":4168,"children":4169},{},[4170],{"type":612,"value":4171},"Named configuration values",{"type":606,"tag":4017,"props":4173,"children":4174},{},[4175],{"type":606,"tag":632,"props":4176,"children":4178},{"className":4177},[],[4179],{"type":612,"value":4180},"MAX_RETRIES = 3",{"type":606,"tag":1389,"props":4182,"children":4184},{"id":4183},"key-takeaways",[4185],{"type":612,"value":4186},"🎯 Key Takeaways",{"type":606,"tag":1401,"props":4188,"children":4192},{"emoji":4189,"title":4190,"type":4191},"📚","Code Structure Essentials","success",[4193,4201,4223,4231,4254,4262,4293],{"type":606,"tag":615,"props":4194,"children":4195},{},[4196],{"type":606,"tag":1411,"props":4197,"children":4198},{},[4199],{"type":612,"value":4200},"Organization Principles:",{"type":606,"tag":1417,"props":4202,"children":4203},{},[4204,4209,4214,4218],{"type":606,"tag":1421,"props":4205,"children":4206},{},[4207],{"type":612,"value":4208},"Separate concerns into logical modules",{"type":606,"tag":1421,"props":4210,"children":4211},{},[4212],{"type":612,"value":4213},"Use clear, descriptive names for files and functions",{"type":606,"tag":1421,"props":4215,"children":4216},{},[4217],{"type":612,"value":1430},{"type":606,"tag":1421,"props":4219,"children":4220},{},[4221],{"type":612,"value":4222},"Keep functions small and focused (5-20 lines)",{"type":606,"tag":615,"props":4224,"children":4225},{},[4226],{"type":606,"tag":1411,"props":4227,"children":4228},{},[4229],{"type":612,"value":4230},"Project Structure:",{"type":606,"tag":1417,"props":4232,"children":4233},{},[4234,4239,4244,4249],{"type":606,"tag":1421,"props":4235,"children":4236},{},[4237],{"type":612,"value":4238},"Use standard project layout patterns",{"type":606,"tag":1421,"props":4240,"children":4241},{},[4242],{"type":612,"value":4243},"Organize imports: standard library, third-party, local",{"type":606,"tag":1421,"props":4245,"children":4246},{},[4247],{"type":612,"value":4248},"Create separate modules for models, services, utilities",{"type":606,"tag":1421,"props":4250,"children":4251},{},[4252],{"type":612,"value":4253},"Place configuration in dedicated files",{"type":606,"tag":615,"props":4255,"children":4256},{},[4257],{"type":606,"tag":1411,"props":4258,"children":4259},{},[4260],{"type":612,"value":4261},"Best Practices:",{"type":606,"tag":1417,"props":4263,"children":4264},{},[4265,4270,4283,4288],{"type":606,"tag":1421,"props":4266,"children":4267},{},[4268],{"type":612,"value":4269},"One class per file for large classes",{"type":606,"tag":1421,"props":4271,"children":4272},{},[4273,4275,4281],{"type":612,"value":4274},"Use ",{"type":606,"tag":632,"props":4276,"children":4278},{"className":4277},[],[4279],{"type":612,"value":4280},"__init__.py",{"type":612,"value":4282}," files to make packages",{"type":606,"tag":1421,"props":4284,"children":4285},{},[4286],{"type":612,"value":4287},"Keep related constants together",{"type":606,"tag":1421,"props":4289,"children":4290},{},[4291],{"type":612,"value":4292},"Write modular, reusable code",{"type":606,"tag":615,"props":4294,"children":4295},{},[4296,4301],{"type":606,"tag":1411,"props":4297,"children":4298},{},[4299],{"type":612,"value":4300},"Remember:",{"type":612,"value":4302}," Good structure makes code easier to find, understand, and maintain!",{"type":606,"tag":1389,"props":4304,"children":4306},{"id":4305},"whats-next",[4307],{"type":612,"value":4308},"🚀 What's Next?",{"type":606,"tag":615,"props":4310,"children":4311},{},[4312],{"type":612,"value":4313},"Learn how to write clean, readable code with proper naming conventions and clear logic.",{"type":606,"tag":615,"props":4315,"children":4316},{},[4317,4322,4323],{"type":606,"tag":1411,"props":4318,"children":4319},{},[4320],{"type":612,"value":4321},"Continue to",{"type":612,"value":2109},{"type":606,"tag":4324,"props":4325,"children":4326},"a",{"href":549},[4327],{"type":612,"value":550},{"type":606,"tag":4329,"props":4330,"children":4331},"style",{},[4332],{"type":612,"value":4333},"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":4335},[4336,4340,4341,4342],{"id":1391,"depth":27,"text":1394,"children":4337},[4338,4339],{"id":1506,"depth":36,"text":1509},{"id":2719,"depth":36,"text":2722},{"id":3977,"depth":27,"text":3980},{"id":4183,"depth":27,"text":4186},{"id":4305,"depth":27,"text":4308},1782373764088]