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