[{"data":1,"prerenderedAt":3005},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/check-string-content":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361,"expanded":13},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417,"expanded":13},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[49],{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"body":602,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},{"type":603,"children":604,"toc":2994},"root",[605,614,620,798,805,810,930,937,1263,1269,1274,1671,1677,1682,2050,2056,2061,2324,2330,2810,2816,2988],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"checking-string-content",[611],{"type":612,"value":613},"text","🔍 Checking String Content",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Python provides several methods to check and validate the content of strings. These methods are essential for data validation, input processing, and text analysis.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic string content checking\ntext = \"Python123\"\nprint(f\"Is alphanumeric: {text.isalnum()}\")\nprint(f\"Is alphabetic: {text.isalpha()}\")\nprint(f\"Is numeric: {text.isdigit()}\")\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,667,716,757],{"type":606,"tag":636,"props":637,"children":639},"span",{"class":638,"line":12},"line",[640],{"type":606,"tag":636,"props":641,"children":643},{"style":642},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[644],{"type":612,"value":645},"# Basic string content checking\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649,655,661],{"type":606,"tag":636,"props":650,"children":652},{"style":651},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[653],{"type":612,"value":654},"text ",{"type":606,"tag":636,"props":656,"children":658},{"style":657},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[659],{"type":612,"value":660},"=",{"type":606,"tag":636,"props":662,"children":664},{"style":663},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[665],{"type":612,"value":666}," \"Python123\"\n",{"type":606,"tag":636,"props":668,"children":669},{"class":638,"line":36},[670,676,681,686,691,696,701,706,711],{"type":606,"tag":636,"props":671,"children":673},{"style":672},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[674],{"type":612,"value":675},"print",{"type":606,"tag":636,"props":677,"children":678},{"style":651},[679],{"type":612,"value":680},"(",{"type":606,"tag":636,"props":682,"children":683},{"style":657},[684],{"type":612,"value":685},"f",{"type":606,"tag":636,"props":687,"children":688},{"style":663},[689],{"type":612,"value":690},"\"Is alphanumeric: ",{"type":606,"tag":636,"props":692,"children":693},{"style":672},[694],{"type":612,"value":695},"{",{"type":606,"tag":636,"props":697,"children":698},{"style":651},[699],{"type":612,"value":700},"text.isalnum()",{"type":606,"tag":636,"props":702,"children":703},{"style":672},[704],{"type":612,"value":705},"}",{"type":606,"tag":636,"props":707,"children":708},{"style":663},[709],{"type":612,"value":710},"\"",{"type":606,"tag":636,"props":712,"children":713},{"style":651},[714],{"type":612,"value":715},")\n",{"type":606,"tag":636,"props":717,"children":718},{"class":638,"line":45},[719,723,727,731,736,740,745,749,753],{"type":606,"tag":636,"props":720,"children":721},{"style":672},[722],{"type":612,"value":675},{"type":606,"tag":636,"props":724,"children":725},{"style":651},[726],{"type":612,"value":680},{"type":606,"tag":636,"props":728,"children":729},{"style":657},[730],{"type":612,"value":685},{"type":606,"tag":636,"props":732,"children":733},{"style":663},[734],{"type":612,"value":735},"\"Is alphabetic: ",{"type":606,"tag":636,"props":737,"children":738},{"style":672},[739],{"type":612,"value":695},{"type":606,"tag":636,"props":741,"children":742},{"style":651},[743],{"type":612,"value":744},"text.isalpha()",{"type":606,"tag":636,"props":746,"children":747},{"style":672},[748],{"type":612,"value":705},{"type":606,"tag":636,"props":750,"children":751},{"style":663},[752],{"type":612,"value":710},{"type":606,"tag":636,"props":754,"children":755},{"style":651},[756],{"type":612,"value":715},{"type":606,"tag":636,"props":758,"children":759},{"class":638,"line":54},[760,764,768,772,777,781,786,790,794],{"type":606,"tag":636,"props":761,"children":762},{"style":672},[763],{"type":612,"value":675},{"type":606,"tag":636,"props":765,"children":766},{"style":651},[767],{"type":612,"value":680},{"type":606,"tag":636,"props":769,"children":770},{"style":657},[771],{"type":612,"value":685},{"type":606,"tag":636,"props":773,"children":774},{"style":663},[775],{"type":612,"value":776},"\"Is numeric: ",{"type":606,"tag":636,"props":778,"children":779},{"style":672},[780],{"type":612,"value":695},{"type":606,"tag":636,"props":782,"children":783},{"style":651},[784],{"type":612,"value":785},"text.isdigit()",{"type":606,"tag":636,"props":787,"children":788},{"style":672},[789],{"type":612,"value":705},{"type":606,"tag":636,"props":791,"children":792},{"style":663},[793],{"type":612,"value":710},{"type":606,"tag":636,"props":795,"children":796},{"style":651},[797],{"type":612,"value":715},{"type":606,"tag":799,"props":800,"children":802},"h2",{"id":801},"string-validation-methods",[803],{"type":612,"value":804},"🎯 String Validation Methods",{"type":606,"tag":615,"props":806,"children":807},{},[808],{"type":612,"value":809},"Python offers a variety of methods to check string content and characteristics.",{"type":606,"tag":811,"props":812,"children":816},"info-box",{"emoji":813,"title":814,"type":815},"📝","String Validation Methods","info",[817,826],{"type":606,"tag":615,"props":818,"children":819},{},[820],{"type":606,"tag":821,"props":822,"children":823},"strong",{},[824],{"type":612,"value":825},"Content Type Checks:",{"type":606,"tag":827,"props":828,"children":829},"ul",{},[830,842,853,864,875,886,897,908,919],{"type":606,"tag":831,"props":832,"children":833},"li",{},[834,840],{"type":606,"tag":632,"props":835,"children":837},{"className":836},[],[838],{"type":612,"value":839},".isalnum()",{"type":612,"value":841},": Letters and numbers only",{"type":606,"tag":831,"props":843,"children":844},{},[845,851],{"type":606,"tag":632,"props":846,"children":848},{"className":847},[],[849],{"type":612,"value":850},".isalpha()",{"type":612,"value":852},": Letters only",{"type":606,"tag":831,"props":854,"children":855},{},[856,862],{"type":606,"tag":632,"props":857,"children":859},{"className":858},[],[860],{"type":612,"value":861},".isdigit()",{"type":612,"value":863},": Digits only",{"type":606,"tag":831,"props":865,"children":866},{},[867,873],{"type":606,"tag":632,"props":868,"children":870},{"className":869},[],[871],{"type":612,"value":872},".isnumeric()",{"type":612,"value":874},": Numeric characters",{"type":606,"tag":831,"props":876,"children":877},{},[878,884],{"type":606,"tag":632,"props":879,"children":881},{"className":880},[],[882],{"type":612,"value":883},".isdecimal()",{"type":612,"value":885},": Decimal characters",{"type":606,"tag":831,"props":887,"children":888},{},[889,895],{"type":606,"tag":632,"props":890,"children":892},{"className":891},[],[893],{"type":612,"value":894},".isspace()",{"type":612,"value":896},": Whitespace only",{"type":606,"tag":831,"props":898,"children":899},{},[900,906],{"type":606,"tag":632,"props":901,"children":903},{"className":902},[],[904],{"type":612,"value":905},".islower()",{"type":612,"value":907},": All lowercase",{"type":606,"tag":831,"props":909,"children":910},{},[911,917],{"type":606,"tag":632,"props":912,"children":914},{"className":913},[],[915],{"type":612,"value":916},".isupper()",{"type":612,"value":918},": All uppercase",{"type":606,"tag":831,"props":920,"children":921},{},[922,928],{"type":606,"tag":632,"props":923,"children":925},{"className":924},[],[926],{"type":612,"value":927},".istitle()",{"type":612,"value":929},": Title case format",{"type":606,"tag":931,"props":932,"children":934},"h3",{"id":933},"basic-examples",[935],{"type":612,"value":936},"Basic Examples",{"type":606,"tag":621,"props":938,"children":939},{},[940],{"type":606,"tag":625,"props":941,"children":943},{"className":627,"code":942,"language":629,"meta":8,"style":8},"# Different ways to check string content\ntexts = [\"Python\", \"123\", \"Python123\", \"   \", \"Hello World\"]\n\nfor text in texts:\n    print(f\"\\nChecking '{text}':\")\n    print(f\"isalpha(): {text.isalpha()}\")\n    print(f\"isdigit(): {text.isdigit()}\")\n    print(f\"isalnum(): {text.isalnum()}\")\n    print(f\"isspace(): {text.isspace()}\")\n",[944],{"type":606,"tag":632,"props":945,"children":946},{"__ignoreMap":8},[947,955,1019,1027,1050,1101,1141,1181,1221],{"type":606,"tag":636,"props":948,"children":949},{"class":638,"line":12},[950],{"type":606,"tag":636,"props":951,"children":952},{"style":642},[953],{"type":612,"value":954},"# Different ways to check string content\n",{"type":606,"tag":636,"props":956,"children":957},{"class":638,"line":27},[958,963,967,972,977,982,987,991,996,1000,1005,1009,1014],{"type":606,"tag":636,"props":959,"children":960},{"style":651},[961],{"type":612,"value":962},"texts ",{"type":606,"tag":636,"props":964,"children":965},{"style":657},[966],{"type":612,"value":660},{"type":606,"tag":636,"props":968,"children":969},{"style":651},[970],{"type":612,"value":971}," [",{"type":606,"tag":636,"props":973,"children":974},{"style":663},[975],{"type":612,"value":976},"\"Python\"",{"type":606,"tag":636,"props":978,"children":979},{"style":651},[980],{"type":612,"value":981},", ",{"type":606,"tag":636,"props":983,"children":984},{"style":663},[985],{"type":612,"value":986},"\"123\"",{"type":606,"tag":636,"props":988,"children":989},{"style":651},[990],{"type":612,"value":981},{"type":606,"tag":636,"props":992,"children":993},{"style":663},[994],{"type":612,"value":995},"\"Python123\"",{"type":606,"tag":636,"props":997,"children":998},{"style":651},[999],{"type":612,"value":981},{"type":606,"tag":636,"props":1001,"children":1002},{"style":663},[1003],{"type":612,"value":1004},"\"   \"",{"type":606,"tag":636,"props":1006,"children":1007},{"style":651},[1008],{"type":612,"value":981},{"type":606,"tag":636,"props":1010,"children":1011},{"style":663},[1012],{"type":612,"value":1013},"\"Hello World\"",{"type":606,"tag":636,"props":1015,"children":1016},{"style":651},[1017],{"type":612,"value":1018},"]\n",{"type":606,"tag":636,"props":1020,"children":1021},{"class":638,"line":36},[1022],{"type":606,"tag":636,"props":1023,"children":1024},{"emptyLinePlaceholder":13},[1025],{"type":612,"value":1026},"\n",{"type":606,"tag":636,"props":1028,"children":1029},{"class":638,"line":45},[1030,1035,1040,1045],{"type":606,"tag":636,"props":1031,"children":1032},{"style":657},[1033],{"type":612,"value":1034},"for",{"type":606,"tag":636,"props":1036,"children":1037},{"style":651},[1038],{"type":612,"value":1039}," text ",{"type":606,"tag":636,"props":1041,"children":1042},{"style":657},[1043],{"type":612,"value":1044},"in",{"type":606,"tag":636,"props":1046,"children":1047},{"style":651},[1048],{"type":612,"value":1049}," texts:\n",{"type":606,"tag":636,"props":1051,"children":1052},{"class":638,"line":54},[1053,1058,1062,1066,1070,1075,1080,1084,1088,1092,1097],{"type":606,"tag":636,"props":1054,"children":1055},{"style":672},[1056],{"type":612,"value":1057},"    print",{"type":606,"tag":636,"props":1059,"children":1060},{"style":651},[1061],{"type":612,"value":680},{"type":606,"tag":636,"props":1063,"children":1064},{"style":657},[1065],{"type":612,"value":685},{"type":606,"tag":636,"props":1067,"children":1068},{"style":663},[1069],{"type":612,"value":710},{"type":606,"tag":636,"props":1071,"children":1072},{"style":672},[1073],{"type":612,"value":1074},"\\n",{"type":606,"tag":636,"props":1076,"children":1077},{"style":663},[1078],{"type":612,"value":1079},"Checking '",{"type":606,"tag":636,"props":1081,"children":1082},{"style":672},[1083],{"type":612,"value":695},{"type":606,"tag":636,"props":1085,"children":1086},{"style":651},[1087],{"type":612,"value":612},{"type":606,"tag":636,"props":1089,"children":1090},{"style":672},[1091],{"type":612,"value":705},{"type":606,"tag":636,"props":1093,"children":1094},{"style":663},[1095],{"type":612,"value":1096},"':\"",{"type":606,"tag":636,"props":1098,"children":1099},{"style":651},[1100],{"type":612,"value":715},{"type":606,"tag":636,"props":1102,"children":1103},{"class":638,"line":63},[1104,1108,1112,1116,1121,1125,1129,1133,1137],{"type":606,"tag":636,"props":1105,"children":1106},{"style":672},[1107],{"type":612,"value":1057},{"type":606,"tag":636,"props":1109,"children":1110},{"style":651},[1111],{"type":612,"value":680},{"type":606,"tag":636,"props":1113,"children":1114},{"style":657},[1115],{"type":612,"value":685},{"type":606,"tag":636,"props":1117,"children":1118},{"style":663},[1119],{"type":612,"value":1120},"\"isalpha(): ",{"type":606,"tag":636,"props":1122,"children":1123},{"style":672},[1124],{"type":612,"value":695},{"type":606,"tag":636,"props":1126,"children":1127},{"style":651},[1128],{"type":612,"value":744},{"type":606,"tag":636,"props":1130,"children":1131},{"style":672},[1132],{"type":612,"value":705},{"type":606,"tag":636,"props":1134,"children":1135},{"style":663},[1136],{"type":612,"value":710},{"type":606,"tag":636,"props":1138,"children":1139},{"style":651},[1140],{"type":612,"value":715},{"type":606,"tag":636,"props":1142,"children":1143},{"class":638,"line":72},[1144,1148,1152,1156,1161,1165,1169,1173,1177],{"type":606,"tag":636,"props":1145,"children":1146},{"style":672},[1147],{"type":612,"value":1057},{"type":606,"tag":636,"props":1149,"children":1150},{"style":651},[1151],{"type":612,"value":680},{"type":606,"tag":636,"props":1153,"children":1154},{"style":657},[1155],{"type":612,"value":685},{"type":606,"tag":636,"props":1157,"children":1158},{"style":663},[1159],{"type":612,"value":1160},"\"isdigit(): ",{"type":606,"tag":636,"props":1162,"children":1163},{"style":672},[1164],{"type":612,"value":695},{"type":606,"tag":636,"props":1166,"children":1167},{"style":651},[1168],{"type":612,"value":785},{"type":606,"tag":636,"props":1170,"children":1171},{"style":672},[1172],{"type":612,"value":705},{"type":606,"tag":636,"props":1174,"children":1175},{"style":663},[1176],{"type":612,"value":710},{"type":606,"tag":636,"props":1178,"children":1179},{"style":651},[1180],{"type":612,"value":715},{"type":606,"tag":636,"props":1182,"children":1183},{"class":638,"line":81},[1184,1188,1192,1196,1201,1205,1209,1213,1217],{"type":606,"tag":636,"props":1185,"children":1186},{"style":672},[1187],{"type":612,"value":1057},{"type":606,"tag":636,"props":1189,"children":1190},{"style":651},[1191],{"type":612,"value":680},{"type":606,"tag":636,"props":1193,"children":1194},{"style":657},[1195],{"type":612,"value":685},{"type":606,"tag":636,"props":1197,"children":1198},{"style":663},[1199],{"type":612,"value":1200},"\"isalnum(): ",{"type":606,"tag":636,"props":1202,"children":1203},{"style":672},[1204],{"type":612,"value":695},{"type":606,"tag":636,"props":1206,"children":1207},{"style":651},[1208],{"type":612,"value":700},{"type":606,"tag":636,"props":1210,"children":1211},{"style":672},[1212],{"type":612,"value":705},{"type":606,"tag":636,"props":1214,"children":1215},{"style":663},[1216],{"type":612,"value":710},{"type":606,"tag":636,"props":1218,"children":1219},{"style":651},[1220],{"type":612,"value":715},{"type":606,"tag":636,"props":1222,"children":1224},{"class":638,"line":1223},9,[1225,1229,1233,1237,1242,1246,1251,1255,1259],{"type":606,"tag":636,"props":1226,"children":1227},{"style":672},[1228],{"type":612,"value":1057},{"type":606,"tag":636,"props":1230,"children":1231},{"style":651},[1232],{"type":612,"value":680},{"type":606,"tag":636,"props":1234,"children":1235},{"style":657},[1236],{"type":612,"value":685},{"type":606,"tag":636,"props":1238,"children":1239},{"style":663},[1240],{"type":612,"value":1241},"\"isspace(): ",{"type":606,"tag":636,"props":1243,"children":1244},{"style":672},[1245],{"type":612,"value":695},{"type":606,"tag":636,"props":1247,"children":1248},{"style":651},[1249],{"type":612,"value":1250},"text.isspace()",{"type":606,"tag":636,"props":1252,"children":1253},{"style":672},[1254],{"type":612,"value":705},{"type":606,"tag":636,"props":1256,"children":1257},{"style":663},[1258],{"type":612,"value":710},{"type":606,"tag":636,"props":1260,"children":1261},{"style":651},[1262],{"type":612,"value":715},{"type":606,"tag":799,"props":1264,"children":1266},{"id":1265},"pattern-matching",[1267],{"type":612,"value":1268},"🔍 Pattern Matching",{"type":606,"tag":615,"props":1270,"children":1271},{},[1272],{"type":612,"value":1273},"You can check if strings match specific patterns or contain certain content.",{"type":606,"tag":621,"props":1275,"children":1276},{},[1277],{"type":606,"tag":625,"props":1278,"children":1280},{"className":627,"code":1279,"language":629,"meta":8,"style":8},"# Pattern matching examples\nemail = \"user@example.com\"\nfilename = \"document.pdf\"\ntext = \"Hello World\"\n\n# Check if contains specific text\nprint(f\"Contains 'World': {'World' in text}\")\nprint(f\"Contains '@': {'@' in email}\")\n\n# Check start and end\nprint(f\"Starts with 'user': {email.startswith('user')}\")\nprint(f\"Ends with '.pdf': {filename.endswith('.pdf')}\")\n\n# Check case\nprint(f\"Is lowercase: {text.islower()}\")\nprint(f\"Is uppercase: {text.isupper()}\")\n",[1281],{"type":606,"tag":632,"props":1282,"children":1283},{"__ignoreMap":8},[1284,1292,1309,1326,1342,1349,1357,1408,1458,1465,1473,1524,1574,1581,1589,1630],{"type":606,"tag":636,"props":1285,"children":1286},{"class":638,"line":12},[1287],{"type":606,"tag":636,"props":1288,"children":1289},{"style":642},[1290],{"type":612,"value":1291},"# Pattern matching examples\n",{"type":606,"tag":636,"props":1293,"children":1294},{"class":638,"line":27},[1295,1300,1304],{"type":606,"tag":636,"props":1296,"children":1297},{"style":651},[1298],{"type":612,"value":1299},"email ",{"type":606,"tag":636,"props":1301,"children":1302},{"style":657},[1303],{"type":612,"value":660},{"type":606,"tag":636,"props":1305,"children":1306},{"style":663},[1307],{"type":612,"value":1308}," \"user@example.com\"\n",{"type":606,"tag":636,"props":1310,"children":1311},{"class":638,"line":36},[1312,1317,1321],{"type":606,"tag":636,"props":1313,"children":1314},{"style":651},[1315],{"type":612,"value":1316},"filename ",{"type":606,"tag":636,"props":1318,"children":1319},{"style":657},[1320],{"type":612,"value":660},{"type":606,"tag":636,"props":1322,"children":1323},{"style":663},[1324],{"type":612,"value":1325}," \"document.pdf\"\n",{"type":606,"tag":636,"props":1327,"children":1328},{"class":638,"line":45},[1329,1333,1337],{"type":606,"tag":636,"props":1330,"children":1331},{"style":651},[1332],{"type":612,"value":654},{"type":606,"tag":636,"props":1334,"children":1335},{"style":657},[1336],{"type":612,"value":660},{"type":606,"tag":636,"props":1338,"children":1339},{"style":663},[1340],{"type":612,"value":1341}," \"Hello World\"\n",{"type":606,"tag":636,"props":1343,"children":1344},{"class":638,"line":54},[1345],{"type":606,"tag":636,"props":1346,"children":1347},{"emptyLinePlaceholder":13},[1348],{"type":612,"value":1026},{"type":606,"tag":636,"props":1350,"children":1351},{"class":638,"line":63},[1352],{"type":606,"tag":636,"props":1353,"children":1354},{"style":642},[1355],{"type":612,"value":1356},"# Check if contains specific text\n",{"type":606,"tag":636,"props":1358,"children":1359},{"class":638,"line":72},[1360,1364,1368,1372,1377,1381,1386,1391,1396,1400,1404],{"type":606,"tag":636,"props":1361,"children":1362},{"style":672},[1363],{"type":612,"value":675},{"type":606,"tag":636,"props":1365,"children":1366},{"style":651},[1367],{"type":612,"value":680},{"type":606,"tag":636,"props":1369,"children":1370},{"style":657},[1371],{"type":612,"value":685},{"type":606,"tag":636,"props":1373,"children":1374},{"style":663},[1375],{"type":612,"value":1376},"\"Contains 'World': ",{"type":606,"tag":636,"props":1378,"children":1379},{"style":672},[1380],{"type":612,"value":695},{"type":606,"tag":636,"props":1382,"children":1383},{"style":663},[1384],{"type":612,"value":1385},"'World'",{"type":606,"tag":636,"props":1387,"children":1388},{"style":657},[1389],{"type":612,"value":1390}," in",{"type":606,"tag":636,"props":1392,"children":1393},{"style":651},[1394],{"type":612,"value":1395}," text",{"type":606,"tag":636,"props":1397,"children":1398},{"style":672},[1399],{"type":612,"value":705},{"type":606,"tag":636,"props":1401,"children":1402},{"style":663},[1403],{"type":612,"value":710},{"type":606,"tag":636,"props":1405,"children":1406},{"style":651},[1407],{"type":612,"value":715},{"type":606,"tag":636,"props":1409,"children":1410},{"class":638,"line":81},[1411,1415,1419,1423,1428,1432,1437,1441,1446,1450,1454],{"type":606,"tag":636,"props":1412,"children":1413},{"style":672},[1414],{"type":612,"value":675},{"type":606,"tag":636,"props":1416,"children":1417},{"style":651},[1418],{"type":612,"value":680},{"type":606,"tag":636,"props":1420,"children":1421},{"style":657},[1422],{"type":612,"value":685},{"type":606,"tag":636,"props":1424,"children":1425},{"style":663},[1426],{"type":612,"value":1427},"\"Contains '@': ",{"type":606,"tag":636,"props":1429,"children":1430},{"style":672},[1431],{"type":612,"value":695},{"type":606,"tag":636,"props":1433,"children":1434},{"style":663},[1435],{"type":612,"value":1436},"'@'",{"type":606,"tag":636,"props":1438,"children":1439},{"style":657},[1440],{"type":612,"value":1390},{"type":606,"tag":636,"props":1442,"children":1443},{"style":651},[1444],{"type":612,"value":1445}," email",{"type":606,"tag":636,"props":1447,"children":1448},{"style":672},[1449],{"type":612,"value":705},{"type":606,"tag":636,"props":1451,"children":1452},{"style":663},[1453],{"type":612,"value":710},{"type":606,"tag":636,"props":1455,"children":1456},{"style":651},[1457],{"type":612,"value":715},{"type":606,"tag":636,"props":1459,"children":1460},{"class":638,"line":1223},[1461],{"type":606,"tag":636,"props":1462,"children":1463},{"emptyLinePlaceholder":13},[1464],{"type":612,"value":1026},{"type":606,"tag":636,"props":1466,"children":1467},{"class":638,"line":99},[1468],{"type":606,"tag":636,"props":1469,"children":1470},{"style":642},[1471],{"type":612,"value":1472},"# Check start and end\n",{"type":606,"tag":636,"props":1474,"children":1475},{"class":638,"line":108},[1476,1480,1484,1488,1493,1497,1502,1507,1512,1516,1520],{"type":606,"tag":636,"props":1477,"children":1478},{"style":672},[1479],{"type":612,"value":675},{"type":606,"tag":636,"props":1481,"children":1482},{"style":651},[1483],{"type":612,"value":680},{"type":606,"tag":636,"props":1485,"children":1486},{"style":657},[1487],{"type":612,"value":685},{"type":606,"tag":636,"props":1489,"children":1490},{"style":663},[1491],{"type":612,"value":1492},"\"Starts with 'user': ",{"type":606,"tag":636,"props":1494,"children":1495},{"style":672},[1496],{"type":612,"value":695},{"type":606,"tag":636,"props":1498,"children":1499},{"style":651},[1500],{"type":612,"value":1501},"email.startswith(",{"type":606,"tag":636,"props":1503,"children":1504},{"style":663},[1505],{"type":612,"value":1506},"'user'",{"type":606,"tag":636,"props":1508,"children":1509},{"style":651},[1510],{"type":612,"value":1511},")",{"type":606,"tag":636,"props":1513,"children":1514},{"style":672},[1515],{"type":612,"value":705},{"type":606,"tag":636,"props":1517,"children":1518},{"style":663},[1519],{"type":612,"value":710},{"type":606,"tag":636,"props":1521,"children":1522},{"style":651},[1523],{"type":612,"value":715},{"type":606,"tag":636,"props":1525,"children":1526},{"class":638,"line":117},[1527,1531,1535,1539,1544,1548,1553,1558,1562,1566,1570],{"type":606,"tag":636,"props":1528,"children":1529},{"style":672},[1530],{"type":612,"value":675},{"type":606,"tag":636,"props":1532,"children":1533},{"style":651},[1534],{"type":612,"value":680},{"type":606,"tag":636,"props":1536,"children":1537},{"style":657},[1538],{"type":612,"value":685},{"type":606,"tag":636,"props":1540,"children":1541},{"style":663},[1542],{"type":612,"value":1543},"\"Ends with '.pdf': ",{"type":606,"tag":636,"props":1545,"children":1546},{"style":672},[1547],{"type":612,"value":695},{"type":606,"tag":636,"props":1549,"children":1550},{"style":651},[1551],{"type":612,"value":1552},"filename.endswith(",{"type":606,"tag":636,"props":1554,"children":1555},{"style":663},[1556],{"type":612,"value":1557},"'.pdf'",{"type":606,"tag":636,"props":1559,"children":1560},{"style":651},[1561],{"type":612,"value":1511},{"type":606,"tag":636,"props":1563,"children":1564},{"style":672},[1565],{"type":612,"value":705},{"type":606,"tag":636,"props":1567,"children":1568},{"style":663},[1569],{"type":612,"value":710},{"type":606,"tag":636,"props":1571,"children":1572},{"style":651},[1573],{"type":612,"value":715},{"type":606,"tag":636,"props":1575,"children":1576},{"class":638,"line":126},[1577],{"type":606,"tag":636,"props":1578,"children":1579},{"emptyLinePlaceholder":13},[1580],{"type":612,"value":1026},{"type":606,"tag":636,"props":1582,"children":1583},{"class":638,"line":135},[1584],{"type":606,"tag":636,"props":1585,"children":1586},{"style":642},[1587],{"type":612,"value":1588},"# Check case\n",{"type":606,"tag":636,"props":1590,"children":1591},{"class":638,"line":144},[1592,1596,1600,1604,1609,1613,1618,1622,1626],{"type":606,"tag":636,"props":1593,"children":1594},{"style":672},[1595],{"type":612,"value":675},{"type":606,"tag":636,"props":1597,"children":1598},{"style":651},[1599],{"type":612,"value":680},{"type":606,"tag":636,"props":1601,"children":1602},{"style":657},[1603],{"type":612,"value":685},{"type":606,"tag":636,"props":1605,"children":1606},{"style":663},[1607],{"type":612,"value":1608},"\"Is lowercase: ",{"type":606,"tag":636,"props":1610,"children":1611},{"style":672},[1612],{"type":612,"value":695},{"type":606,"tag":636,"props":1614,"children":1615},{"style":651},[1616],{"type":612,"value":1617},"text.islower()",{"type":606,"tag":636,"props":1619,"children":1620},{"style":672},[1621],{"type":612,"value":705},{"type":606,"tag":636,"props":1623,"children":1624},{"style":663},[1625],{"type":612,"value":710},{"type":606,"tag":636,"props":1627,"children":1628},{"style":651},[1629],{"type":612,"value":715},{"type":606,"tag":636,"props":1631,"children":1632},{"class":638,"line":153},[1633,1637,1641,1645,1650,1654,1659,1663,1667],{"type":606,"tag":636,"props":1634,"children":1635},{"style":672},[1636],{"type":612,"value":675},{"type":606,"tag":636,"props":1638,"children":1639},{"style":651},[1640],{"type":612,"value":680},{"type":606,"tag":636,"props":1642,"children":1643},{"style":657},[1644],{"type":612,"value":685},{"type":606,"tag":636,"props":1646,"children":1647},{"style":663},[1648],{"type":612,"value":1649},"\"Is uppercase: ",{"type":606,"tag":636,"props":1651,"children":1652},{"style":672},[1653],{"type":612,"value":695},{"type":606,"tag":636,"props":1655,"children":1656},{"style":651},[1657],{"type":612,"value":1658},"text.isupper()",{"type":606,"tag":636,"props":1660,"children":1661},{"style":672},[1662],{"type":612,"value":705},{"type":606,"tag":636,"props":1664,"children":1665},{"style":663},[1666],{"type":612,"value":710},{"type":606,"tag":636,"props":1668,"children":1669},{"style":651},[1670],{"type":612,"value":715},{"type":606,"tag":799,"props":1672,"children":1674},{"id":1673},"common-use-cases",[1675],{"type":612,"value":1676},"🎨 Common Use Cases",{"type":606,"tag":615,"props":1678,"children":1679},{},[1680],{"type":612,"value":1681},"Here are some practical examples of string content checking.",{"type":606,"tag":621,"props":1683,"children":1684},{},[1685],{"type":606,"tag":625,"props":1686,"children":1688},{"className":627,"code":1687,"language":629,"meta":8,"style":8},"# 1. Validating user input\ndef validate_username(username):\n    if not username.isalnum():\n        return \"Username must contain only letters and numbers\"\n    if not username[0].isalpha():\n        return \"Username must start with a letter\"\n    return \"Valid username\"\n\n# 2. Checking file types\ndef is_valid_image(filename):\n    return filename.lower().endswith(('.png', '.jpg', '.jpeg', '.gif'))\n\n# 3. Validating email format\ndef is_valid_email(email):\n    return '@' in email and '.' in email.split('@')[1]\n\n# Test the functions\nprint(validate_username(\"user123\"))\nprint(is_valid_image(\"photo.jpg\"))\nprint(is_valid_email(\"user@example.com\"))\n",[1689],{"type":606,"tag":632,"props":1690,"children":1691},{"__ignoreMap":8},[1692,1700,1719,1737,1750,1776,1788,1801,1808,1816,1833,1882,1889,1897,1914,1972,1979,1987,2008,2029],{"type":606,"tag":636,"props":1693,"children":1694},{"class":638,"line":12},[1695],{"type":606,"tag":636,"props":1696,"children":1697},{"style":642},[1698],{"type":612,"value":1699},"# 1. Validating user input\n",{"type":606,"tag":636,"props":1701,"children":1702},{"class":638,"line":27},[1703,1708,1714],{"type":606,"tag":636,"props":1704,"children":1705},{"style":657},[1706],{"type":612,"value":1707},"def",{"type":606,"tag":636,"props":1709,"children":1711},{"style":1710},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1712],{"type":612,"value":1713}," validate_username",{"type":606,"tag":636,"props":1715,"children":1716},{"style":651},[1717],{"type":612,"value":1718},"(username):\n",{"type":606,"tag":636,"props":1720,"children":1721},{"class":638,"line":36},[1722,1727,1732],{"type":606,"tag":636,"props":1723,"children":1724},{"style":657},[1725],{"type":612,"value":1726},"    if",{"type":606,"tag":636,"props":1728,"children":1729},{"style":657},[1730],{"type":612,"value":1731}," not",{"type":606,"tag":636,"props":1733,"children":1734},{"style":651},[1735],{"type":612,"value":1736}," username.isalnum():\n",{"type":606,"tag":636,"props":1738,"children":1739},{"class":638,"line":45},[1740,1745],{"type":606,"tag":636,"props":1741,"children":1742},{"style":657},[1743],{"type":612,"value":1744},"        return",{"type":606,"tag":636,"props":1746,"children":1747},{"style":663},[1748],{"type":612,"value":1749}," \"Username must contain only letters and numbers\"\n",{"type":606,"tag":636,"props":1751,"children":1752},{"class":638,"line":54},[1753,1757,1761,1766,1771],{"type":606,"tag":636,"props":1754,"children":1755},{"style":657},[1756],{"type":612,"value":1726},{"type":606,"tag":636,"props":1758,"children":1759},{"style":657},[1760],{"type":612,"value":1731},{"type":606,"tag":636,"props":1762,"children":1763},{"style":651},[1764],{"type":612,"value":1765}," username[",{"type":606,"tag":636,"props":1767,"children":1768},{"style":672},[1769],{"type":612,"value":1770},"0",{"type":606,"tag":636,"props":1772,"children":1773},{"style":651},[1774],{"type":612,"value":1775},"].isalpha():\n",{"type":606,"tag":636,"props":1777,"children":1778},{"class":638,"line":63},[1779,1783],{"type":606,"tag":636,"props":1780,"children":1781},{"style":657},[1782],{"type":612,"value":1744},{"type":606,"tag":636,"props":1784,"children":1785},{"style":663},[1786],{"type":612,"value":1787}," \"Username must start with a letter\"\n",{"type":606,"tag":636,"props":1789,"children":1790},{"class":638,"line":72},[1791,1796],{"type":606,"tag":636,"props":1792,"children":1793},{"style":657},[1794],{"type":612,"value":1795},"    return",{"type":606,"tag":636,"props":1797,"children":1798},{"style":663},[1799],{"type":612,"value":1800}," \"Valid username\"\n",{"type":606,"tag":636,"props":1802,"children":1803},{"class":638,"line":81},[1804],{"type":606,"tag":636,"props":1805,"children":1806},{"emptyLinePlaceholder":13},[1807],{"type":612,"value":1026},{"type":606,"tag":636,"props":1809,"children":1810},{"class":638,"line":1223},[1811],{"type":606,"tag":636,"props":1812,"children":1813},{"style":642},[1814],{"type":612,"value":1815},"# 2. Checking file types\n",{"type":606,"tag":636,"props":1817,"children":1818},{"class":638,"line":99},[1819,1823,1828],{"type":606,"tag":636,"props":1820,"children":1821},{"style":657},[1822],{"type":612,"value":1707},{"type":606,"tag":636,"props":1824,"children":1825},{"style":1710},[1826],{"type":612,"value":1827}," is_valid_image",{"type":606,"tag":636,"props":1829,"children":1830},{"style":651},[1831],{"type":612,"value":1832},"(filename):\n",{"type":606,"tag":636,"props":1834,"children":1835},{"class":638,"line":108},[1836,1840,1845,1850,1854,1859,1863,1868,1872,1877],{"type":606,"tag":636,"props":1837,"children":1838},{"style":657},[1839],{"type":612,"value":1795},{"type":606,"tag":636,"props":1841,"children":1842},{"style":651},[1843],{"type":612,"value":1844}," filename.lower().endswith((",{"type":606,"tag":636,"props":1846,"children":1847},{"style":663},[1848],{"type":612,"value":1849},"'.png'",{"type":606,"tag":636,"props":1851,"children":1852},{"style":651},[1853],{"type":612,"value":981},{"type":606,"tag":636,"props":1855,"children":1856},{"style":663},[1857],{"type":612,"value":1858},"'.jpg'",{"type":606,"tag":636,"props":1860,"children":1861},{"style":651},[1862],{"type":612,"value":981},{"type":606,"tag":636,"props":1864,"children":1865},{"style":663},[1866],{"type":612,"value":1867},"'.jpeg'",{"type":606,"tag":636,"props":1869,"children":1870},{"style":651},[1871],{"type":612,"value":981},{"type":606,"tag":636,"props":1873,"children":1874},{"style":663},[1875],{"type":612,"value":1876},"'.gif'",{"type":606,"tag":636,"props":1878,"children":1879},{"style":651},[1880],{"type":612,"value":1881},"))\n",{"type":606,"tag":636,"props":1883,"children":1884},{"class":638,"line":117},[1885],{"type":606,"tag":636,"props":1886,"children":1887},{"emptyLinePlaceholder":13},[1888],{"type":612,"value":1026},{"type":606,"tag":636,"props":1890,"children":1891},{"class":638,"line":126},[1892],{"type":606,"tag":636,"props":1893,"children":1894},{"style":642},[1895],{"type":612,"value":1896},"# 3. Validating email format\n",{"type":606,"tag":636,"props":1898,"children":1899},{"class":638,"line":135},[1900,1904,1909],{"type":606,"tag":636,"props":1901,"children":1902},{"style":657},[1903],{"type":612,"value":1707},{"type":606,"tag":636,"props":1905,"children":1906},{"style":1710},[1907],{"type":612,"value":1908}," is_valid_email",{"type":606,"tag":636,"props":1910,"children":1911},{"style":651},[1912],{"type":612,"value":1913},"(email):\n",{"type":606,"tag":636,"props":1915,"children":1916},{"class":638,"line":144},[1917,1921,1926,1930,1935,1940,1945,1949,1954,1958,1963,1968],{"type":606,"tag":636,"props":1918,"children":1919},{"style":657},[1920],{"type":612,"value":1795},{"type":606,"tag":636,"props":1922,"children":1923},{"style":663},[1924],{"type":612,"value":1925}," '@'",{"type":606,"tag":636,"props":1927,"children":1928},{"style":657},[1929],{"type":612,"value":1390},{"type":606,"tag":636,"props":1931,"children":1932},{"style":651},[1933],{"type":612,"value":1934}," email ",{"type":606,"tag":636,"props":1936,"children":1937},{"style":657},[1938],{"type":612,"value":1939},"and",{"type":606,"tag":636,"props":1941,"children":1942},{"style":663},[1943],{"type":612,"value":1944}," '.'",{"type":606,"tag":636,"props":1946,"children":1947},{"style":657},[1948],{"type":612,"value":1390},{"type":606,"tag":636,"props":1950,"children":1951},{"style":651},[1952],{"type":612,"value":1953}," email.split(",{"type":606,"tag":636,"props":1955,"children":1956},{"style":663},[1957],{"type":612,"value":1436},{"type":606,"tag":636,"props":1959,"children":1960},{"style":651},[1961],{"type":612,"value":1962},")[",{"type":606,"tag":636,"props":1964,"children":1965},{"style":672},[1966],{"type":612,"value":1967},"1",{"type":606,"tag":636,"props":1969,"children":1970},{"style":651},[1971],{"type":612,"value":1018},{"type":606,"tag":636,"props":1973,"children":1974},{"class":638,"line":153},[1975],{"type":606,"tag":636,"props":1976,"children":1977},{"emptyLinePlaceholder":13},[1978],{"type":612,"value":1026},{"type":606,"tag":636,"props":1980,"children":1981},{"class":638,"line":163},[1982],{"type":606,"tag":636,"props":1983,"children":1984},{"style":642},[1985],{"type":612,"value":1986},"# Test the functions\n",{"type":606,"tag":636,"props":1988,"children":1989},{"class":638,"line":172},[1990,1994,1999,2004],{"type":606,"tag":636,"props":1991,"children":1992},{"style":672},[1993],{"type":612,"value":675},{"type":606,"tag":636,"props":1995,"children":1996},{"style":651},[1997],{"type":612,"value":1998},"(validate_username(",{"type":606,"tag":636,"props":2000,"children":2001},{"style":663},[2002],{"type":612,"value":2003},"\"user123\"",{"type":606,"tag":636,"props":2005,"children":2006},{"style":651},[2007],{"type":612,"value":1881},{"type":606,"tag":636,"props":2009,"children":2010},{"class":638,"line":181},[2011,2015,2020,2025],{"type":606,"tag":636,"props":2012,"children":2013},{"style":672},[2014],{"type":612,"value":675},{"type":606,"tag":636,"props":2016,"children":2017},{"style":651},[2018],{"type":612,"value":2019},"(is_valid_image(",{"type":606,"tag":636,"props":2021,"children":2022},{"style":663},[2023],{"type":612,"value":2024},"\"photo.jpg\"",{"type":606,"tag":636,"props":2026,"children":2027},{"style":651},[2028],{"type":612,"value":1881},{"type":606,"tag":636,"props":2030,"children":2031},{"class":638,"line":190},[2032,2036,2041,2046],{"type":606,"tag":636,"props":2033,"children":2034},{"style":672},[2035],{"type":612,"value":675},{"type":606,"tag":636,"props":2037,"children":2038},{"style":651},[2039],{"type":612,"value":2040},"(is_valid_email(",{"type":606,"tag":636,"props":2042,"children":2043},{"style":663},[2044],{"type":612,"value":2045},"\"user@example.com\"",{"type":606,"tag":636,"props":2047,"children":2048},{"style":651},[2049],{"type":612,"value":1881},{"type":606,"tag":799,"props":2051,"children":2053},{"id":2052},"quick-practice",[2054],{"type":612,"value":2055},"📝 Quick Practice",{"type":606,"tag":615,"props":2057,"children":2058},{},[2059],{"type":612,"value":2060},"Let's practice checking string content with a real-world scenario!",{"type":606,"tag":2062,"props":2063,"children":2066},"exercise",{"hint":2064,"prompt":2065},"Try using multiple string methods to check different criteria!","Create a function to validate a password.",[2067],{"type":606,"tag":625,"props":2068,"children":2070},{"className":627,"code":2069,"language":629,"meta":8,"style":8},"# Password Validation Practice\ndef validate_password(password):\n    # TODO: Implement password validation\n    # 1. Check if password is at least 8 characters\n    # 2. Check if it contains at least one uppercase letter\n    # 3. Check if it contains at least one digit\n    # 4. Check if it contains at least one special character\n    \n    # Return True if valid, False if invalid\n    return False\n\n# Test the function\ntest_passwords = [\"abc123\", \"Password123\", \"Pass123!\", \"P@ssw0rd\"]\nfor pwd in test_passwords:\n    print(f\"Password '{pwd}': {validate_password(pwd)}\")\n",[2071],{"type":606,"tag":632,"props":2072,"children":2073},{"__ignoreMap":8},[2074,2082,2099,2117,2125,2133,2141,2149,2157,2165,2177,2184,2192,2244,2265],{"type":606,"tag":636,"props":2075,"children":2076},{"class":638,"line":12},[2077],{"type":606,"tag":636,"props":2078,"children":2079},{"style":642},[2080],{"type":612,"value":2081},"# Password Validation Practice\n",{"type":606,"tag":636,"props":2083,"children":2084},{"class":638,"line":27},[2085,2089,2094],{"type":606,"tag":636,"props":2086,"children":2087},{"style":657},[2088],{"type":612,"value":1707},{"type":606,"tag":636,"props":2090,"children":2091},{"style":1710},[2092],{"type":612,"value":2093}," validate_password",{"type":606,"tag":636,"props":2095,"children":2096},{"style":651},[2097],{"type":612,"value":2098},"(password):\n",{"type":606,"tag":636,"props":2100,"children":2101},{"class":638,"line":36},[2102,2107,2112],{"type":606,"tag":636,"props":2103,"children":2104},{"style":642},[2105],{"type":612,"value":2106},"    # ",{"type":606,"tag":636,"props":2108,"children":2109},{"style":657},[2110],{"type":612,"value":2111},"TODO",{"type":606,"tag":636,"props":2113,"children":2114},{"style":642},[2115],{"type":612,"value":2116},": Implement password validation\n",{"type":606,"tag":636,"props":2118,"children":2119},{"class":638,"line":45},[2120],{"type":606,"tag":636,"props":2121,"children":2122},{"style":642},[2123],{"type":612,"value":2124},"    # 1. Check if password is at least 8 characters\n",{"type":606,"tag":636,"props":2126,"children":2127},{"class":638,"line":54},[2128],{"type":606,"tag":636,"props":2129,"children":2130},{"style":642},[2131],{"type":612,"value":2132},"    # 2. Check if it contains at least one uppercase letter\n",{"type":606,"tag":636,"props":2134,"children":2135},{"class":638,"line":63},[2136],{"type":606,"tag":636,"props":2137,"children":2138},{"style":642},[2139],{"type":612,"value":2140},"    # 3. Check if it contains at least one digit\n",{"type":606,"tag":636,"props":2142,"children":2143},{"class":638,"line":72},[2144],{"type":606,"tag":636,"props":2145,"children":2146},{"style":642},[2147],{"type":612,"value":2148},"    # 4. Check if it contains at least one special character\n",{"type":606,"tag":636,"props":2150,"children":2151},{"class":638,"line":81},[2152],{"type":606,"tag":636,"props":2153,"children":2154},{"style":651},[2155],{"type":612,"value":2156},"    \n",{"type":606,"tag":636,"props":2158,"children":2159},{"class":638,"line":1223},[2160],{"type":606,"tag":636,"props":2161,"children":2162},{"style":642},[2163],{"type":612,"value":2164},"    # Return True if valid, False if invalid\n",{"type":606,"tag":636,"props":2166,"children":2167},{"class":638,"line":99},[2168,2172],{"type":606,"tag":636,"props":2169,"children":2170},{"style":657},[2171],{"type":612,"value":1795},{"type":606,"tag":636,"props":2173,"children":2174},{"style":672},[2175],{"type":612,"value":2176}," False\n",{"type":606,"tag":636,"props":2178,"children":2179},{"class":638,"line":108},[2180],{"type":606,"tag":636,"props":2181,"children":2182},{"emptyLinePlaceholder":13},[2183],{"type":612,"value":1026},{"type":606,"tag":636,"props":2185,"children":2186},{"class":638,"line":117},[2187],{"type":606,"tag":636,"props":2188,"children":2189},{"style":642},[2190],{"type":612,"value":2191},"# Test the function\n",{"type":606,"tag":636,"props":2193,"children":2194},{"class":638,"line":126},[2195,2200,2204,2208,2213,2217,2222,2226,2231,2235,2240],{"type":606,"tag":636,"props":2196,"children":2197},{"style":651},[2198],{"type":612,"value":2199},"test_passwords ",{"type":606,"tag":636,"props":2201,"children":2202},{"style":657},[2203],{"type":612,"value":660},{"type":606,"tag":636,"props":2205,"children":2206},{"style":651},[2207],{"type":612,"value":971},{"type":606,"tag":636,"props":2209,"children":2210},{"style":663},[2211],{"type":612,"value":2212},"\"abc123\"",{"type":606,"tag":636,"props":2214,"children":2215},{"style":651},[2216],{"type":612,"value":981},{"type":606,"tag":636,"props":2218,"children":2219},{"style":663},[2220],{"type":612,"value":2221},"\"Password123\"",{"type":606,"tag":636,"props":2223,"children":2224},{"style":651},[2225],{"type":612,"value":981},{"type":606,"tag":636,"props":2227,"children":2228},{"style":663},[2229],{"type":612,"value":2230},"\"Pass123!\"",{"type":606,"tag":636,"props":2232,"children":2233},{"style":651},[2234],{"type":612,"value":981},{"type":606,"tag":636,"props":2236,"children":2237},{"style":663},[2238],{"type":612,"value":2239},"\"P@ssw0rd\"",{"type":606,"tag":636,"props":2241,"children":2242},{"style":651},[2243],{"type":612,"value":1018},{"type":606,"tag":636,"props":2245,"children":2246},{"class":638,"line":135},[2247,2251,2256,2260],{"type":606,"tag":636,"props":2248,"children":2249},{"style":657},[2250],{"type":612,"value":1034},{"type":606,"tag":636,"props":2252,"children":2253},{"style":651},[2254],{"type":612,"value":2255}," pwd ",{"type":606,"tag":636,"props":2257,"children":2258},{"style":657},[2259],{"type":612,"value":1044},{"type":606,"tag":636,"props":2261,"children":2262},{"style":651},[2263],{"type":612,"value":2264}," test_passwords:\n",{"type":606,"tag":636,"props":2266,"children":2267},{"class":638,"line":144},[2268,2272,2276,2280,2285,2289,2294,2298,2303,2307,2312,2316,2320],{"type":606,"tag":636,"props":2269,"children":2270},{"style":672},[2271],{"type":612,"value":1057},{"type":606,"tag":636,"props":2273,"children":2274},{"style":651},[2275],{"type":612,"value":680},{"type":606,"tag":636,"props":2277,"children":2278},{"style":657},[2279],{"type":612,"value":685},{"type":606,"tag":636,"props":2281,"children":2282},{"style":663},[2283],{"type":612,"value":2284},"\"Password '",{"type":606,"tag":636,"props":2286,"children":2287},{"style":672},[2288],{"type":612,"value":695},{"type":606,"tag":636,"props":2290,"children":2291},{"style":651},[2292],{"type":612,"value":2293},"pwd",{"type":606,"tag":636,"props":2295,"children":2296},{"style":672},[2297],{"type":612,"value":705},{"type":606,"tag":636,"props":2299,"children":2300},{"style":663},[2301],{"type":612,"value":2302},"': ",{"type":606,"tag":636,"props":2304,"children":2305},{"style":672},[2306],{"type":612,"value":695},{"type":606,"tag":636,"props":2308,"children":2309},{"style":651},[2310],{"type":612,"value":2311},"validate_password(pwd)",{"type":606,"tag":636,"props":2313,"children":2314},{"style":672},[2315],{"type":612,"value":705},{"type":606,"tag":636,"props":2317,"children":2318},{"style":663},[2319],{"type":612,"value":710},{"type":606,"tag":636,"props":2321,"children":2322},{"style":651},[2323],{"type":612,"value":715},{"type":606,"tag":931,"props":2325,"children":2327},{"id":2326},"solution-and-explanation",[2328],{"type":612,"value":2329},"Solution and Explanation 💡",{"type":606,"tag":2331,"props":2332,"children":2333},"details",{},[2334,2342,2745,2753],{"type":606,"tag":2335,"props":2336,"children":2339},"summary",{"className":2337},[2338],"cursor-pointer",[2340],{"type":612,"value":2341},"Click to see the solution",{"type":606,"tag":621,"props":2343,"children":2344},{},[2345],{"type":606,"tag":625,"props":2346,"children":2348},{"className":627,"code":2347,"language":629,"meta":8,"style":8},"# Password Validation Solution\ndef validate_password(password):\n    # Check length\n    if len(password) \u003C 8:\n        return False\n    \n    # Check for uppercase\n    if not any(c.isupper() for c in password):\n        return False\n    \n    # Check for digit\n    if not any(c.isdigit() for c in password):\n        return False\n    \n    # Check for special character\n    if password.isalnum():\n        return False\n    \n    return True\n\n# Test the function\ntest_passwords = [\"abc123\", \"Password123\", \"Pass123!\", \"P@ssw0rd\"]\nfor pwd in test_passwords:\n    print(f\"Password '{pwd}': {validate_password(pwd)}\")\n",[2349],{"type":606,"tag":632,"props":2350,"children":2351},{"__ignoreMap":8},[2352,2360,2375,2383,2415,2426,2433,2441,2480,2491,2498,2506,2542,2553,2560,2568,2580,2591,2598,2610,2617,2624,2671,2690],{"type":606,"tag":636,"props":2353,"children":2354},{"class":638,"line":12},[2355],{"type":606,"tag":636,"props":2356,"children":2357},{"style":642},[2358],{"type":612,"value":2359},"# Password Validation Solution\n",{"type":606,"tag":636,"props":2361,"children":2362},{"class":638,"line":27},[2363,2367,2371],{"type":606,"tag":636,"props":2364,"children":2365},{"style":657},[2366],{"type":612,"value":1707},{"type":606,"tag":636,"props":2368,"children":2369},{"style":1710},[2370],{"type":612,"value":2093},{"type":606,"tag":636,"props":2372,"children":2373},{"style":651},[2374],{"type":612,"value":2098},{"type":606,"tag":636,"props":2376,"children":2377},{"class":638,"line":36},[2378],{"type":606,"tag":636,"props":2379,"children":2380},{"style":642},[2381],{"type":612,"value":2382},"    # Check length\n",{"type":606,"tag":636,"props":2384,"children":2385},{"class":638,"line":45},[2386,2390,2395,2400,2405,2410],{"type":606,"tag":636,"props":2387,"children":2388},{"style":657},[2389],{"type":612,"value":1726},{"type":606,"tag":636,"props":2391,"children":2392},{"style":672},[2393],{"type":612,"value":2394}," len",{"type":606,"tag":636,"props":2396,"children":2397},{"style":651},[2398],{"type":612,"value":2399},"(password) ",{"type":606,"tag":636,"props":2401,"children":2402},{"style":657},[2403],{"type":612,"value":2404},"\u003C",{"type":606,"tag":636,"props":2406,"children":2407},{"style":672},[2408],{"type":612,"value":2409}," 8",{"type":606,"tag":636,"props":2411,"children":2412},{"style":651},[2413],{"type":612,"value":2414},":\n",{"type":606,"tag":636,"props":2416,"children":2417},{"class":638,"line":54},[2418,2422],{"type":606,"tag":636,"props":2419,"children":2420},{"style":657},[2421],{"type":612,"value":1744},{"type":606,"tag":636,"props":2423,"children":2424},{"style":672},[2425],{"type":612,"value":2176},{"type":606,"tag":636,"props":2427,"children":2428},{"class":638,"line":63},[2429],{"type":606,"tag":636,"props":2430,"children":2431},{"style":651},[2432],{"type":612,"value":2156},{"type":606,"tag":636,"props":2434,"children":2435},{"class":638,"line":72},[2436],{"type":606,"tag":636,"props":2437,"children":2438},{"style":642},[2439],{"type":612,"value":2440},"    # Check for uppercase\n",{"type":606,"tag":636,"props":2442,"children":2443},{"class":638,"line":81},[2444,2448,2452,2457,2462,2466,2471,2475],{"type":606,"tag":636,"props":2445,"children":2446},{"style":657},[2447],{"type":612,"value":1726},{"type":606,"tag":636,"props":2449,"children":2450},{"style":657},[2451],{"type":612,"value":1731},{"type":606,"tag":636,"props":2453,"children":2454},{"style":672},[2455],{"type":612,"value":2456}," any",{"type":606,"tag":636,"props":2458,"children":2459},{"style":651},[2460],{"type":612,"value":2461},"(c.isupper() ",{"type":606,"tag":636,"props":2463,"children":2464},{"style":657},[2465],{"type":612,"value":1034},{"type":606,"tag":636,"props":2467,"children":2468},{"style":651},[2469],{"type":612,"value":2470}," c ",{"type":606,"tag":636,"props":2472,"children":2473},{"style":657},[2474],{"type":612,"value":1044},{"type":606,"tag":636,"props":2476,"children":2477},{"style":651},[2478],{"type":612,"value":2479}," password):\n",{"type":606,"tag":636,"props":2481,"children":2482},{"class":638,"line":1223},[2483,2487],{"type":606,"tag":636,"props":2484,"children":2485},{"style":657},[2486],{"type":612,"value":1744},{"type":606,"tag":636,"props":2488,"children":2489},{"style":672},[2490],{"type":612,"value":2176},{"type":606,"tag":636,"props":2492,"children":2493},{"class":638,"line":99},[2494],{"type":606,"tag":636,"props":2495,"children":2496},{"style":651},[2497],{"type":612,"value":2156},{"type":606,"tag":636,"props":2499,"children":2500},{"class":638,"line":108},[2501],{"type":606,"tag":636,"props":2502,"children":2503},{"style":642},[2504],{"type":612,"value":2505},"    # Check for digit\n",{"type":606,"tag":636,"props":2507,"children":2508},{"class":638,"line":117},[2509,2513,2517,2521,2526,2530,2534,2538],{"type":606,"tag":636,"props":2510,"children":2511},{"style":657},[2512],{"type":612,"value":1726},{"type":606,"tag":636,"props":2514,"children":2515},{"style":657},[2516],{"type":612,"value":1731},{"type":606,"tag":636,"props":2518,"children":2519},{"style":672},[2520],{"type":612,"value":2456},{"type":606,"tag":636,"props":2522,"children":2523},{"style":651},[2524],{"type":612,"value":2525},"(c.isdigit() ",{"type":606,"tag":636,"props":2527,"children":2528},{"style":657},[2529],{"type":612,"value":1034},{"type":606,"tag":636,"props":2531,"children":2532},{"style":651},[2533],{"type":612,"value":2470},{"type":606,"tag":636,"props":2535,"children":2536},{"style":657},[2537],{"type":612,"value":1044},{"type":606,"tag":636,"props":2539,"children":2540},{"style":651},[2541],{"type":612,"value":2479},{"type":606,"tag":636,"props":2543,"children":2544},{"class":638,"line":126},[2545,2549],{"type":606,"tag":636,"props":2546,"children":2547},{"style":657},[2548],{"type":612,"value":1744},{"type":606,"tag":636,"props":2550,"children":2551},{"style":672},[2552],{"type":612,"value":2176},{"type":606,"tag":636,"props":2554,"children":2555},{"class":638,"line":135},[2556],{"type":606,"tag":636,"props":2557,"children":2558},{"style":651},[2559],{"type":612,"value":2156},{"type":606,"tag":636,"props":2561,"children":2562},{"class":638,"line":144},[2563],{"type":606,"tag":636,"props":2564,"children":2565},{"style":642},[2566],{"type":612,"value":2567},"    # Check for special character\n",{"type":606,"tag":636,"props":2569,"children":2570},{"class":638,"line":153},[2571,2575],{"type":606,"tag":636,"props":2572,"children":2573},{"style":657},[2574],{"type":612,"value":1726},{"type":606,"tag":636,"props":2576,"children":2577},{"style":651},[2578],{"type":612,"value":2579}," password.isalnum():\n",{"type":606,"tag":636,"props":2581,"children":2582},{"class":638,"line":163},[2583,2587],{"type":606,"tag":636,"props":2584,"children":2585},{"style":657},[2586],{"type":612,"value":1744},{"type":606,"tag":636,"props":2588,"children":2589},{"style":672},[2590],{"type":612,"value":2176},{"type":606,"tag":636,"props":2592,"children":2593},{"class":638,"line":172},[2594],{"type":606,"tag":636,"props":2595,"children":2596},{"style":651},[2597],{"type":612,"value":2156},{"type":606,"tag":636,"props":2599,"children":2600},{"class":638,"line":181},[2601,2605],{"type":606,"tag":636,"props":2602,"children":2603},{"style":657},[2604],{"type":612,"value":1795},{"type":606,"tag":636,"props":2606,"children":2607},{"style":672},[2608],{"type":612,"value":2609}," True\n",{"type":606,"tag":636,"props":2611,"children":2612},{"class":638,"line":190},[2613],{"type":606,"tag":636,"props":2614,"children":2615},{"emptyLinePlaceholder":13},[2616],{"type":612,"value":1026},{"type":606,"tag":636,"props":2618,"children":2619},{"class":638,"line":199},[2620],{"type":606,"tag":636,"props":2621,"children":2622},{"style":642},[2623],{"type":612,"value":2191},{"type":606,"tag":636,"props":2625,"children":2626},{"class":638,"line":208},[2627,2631,2635,2639,2643,2647,2651,2655,2659,2663,2667],{"type":606,"tag":636,"props":2628,"children":2629},{"style":651},[2630],{"type":612,"value":2199},{"type":606,"tag":636,"props":2632,"children":2633},{"style":657},[2634],{"type":612,"value":660},{"type":606,"tag":636,"props":2636,"children":2637},{"style":651},[2638],{"type":612,"value":971},{"type":606,"tag":636,"props":2640,"children":2641},{"style":663},[2642],{"type":612,"value":2212},{"type":606,"tag":636,"props":2644,"children":2645},{"style":651},[2646],{"type":612,"value":981},{"type":606,"tag":636,"props":2648,"children":2649},{"style":663},[2650],{"type":612,"value":2221},{"type":606,"tag":636,"props":2652,"children":2653},{"style":651},[2654],{"type":612,"value":981},{"type":606,"tag":636,"props":2656,"children":2657},{"style":663},[2658],{"type":612,"value":2230},{"type":606,"tag":636,"props":2660,"children":2661},{"style":651},[2662],{"type":612,"value":981},{"type":606,"tag":636,"props":2664,"children":2665},{"style":663},[2666],{"type":612,"value":2239},{"type":606,"tag":636,"props":2668,"children":2669},{"style":651},[2670],{"type":612,"value":1018},{"type":606,"tag":636,"props":2672,"children":2673},{"class":638,"line":217},[2674,2678,2682,2686],{"type":606,"tag":636,"props":2675,"children":2676},{"style":657},[2677],{"type":612,"value":1034},{"type":606,"tag":636,"props":2679,"children":2680},{"style":651},[2681],{"type":612,"value":2255},{"type":606,"tag":636,"props":2683,"children":2684},{"style":657},[2685],{"type":612,"value":1044},{"type":606,"tag":636,"props":2687,"children":2688},{"style":651},[2689],{"type":612,"value":2264},{"type":606,"tag":636,"props":2691,"children":2692},{"class":638,"line":227},[2693,2697,2701,2705,2709,2713,2717,2721,2725,2729,2733,2737,2741],{"type":606,"tag":636,"props":2694,"children":2695},{"style":672},[2696],{"type":612,"value":1057},{"type":606,"tag":636,"props":2698,"children":2699},{"style":651},[2700],{"type":612,"value":680},{"type":606,"tag":636,"props":2702,"children":2703},{"style":657},[2704],{"type":612,"value":685},{"type":606,"tag":636,"props":2706,"children":2707},{"style":663},[2708],{"type":612,"value":2284},{"type":606,"tag":636,"props":2710,"children":2711},{"style":672},[2712],{"type":612,"value":695},{"type":606,"tag":636,"props":2714,"children":2715},{"style":651},[2716],{"type":612,"value":2293},{"type":606,"tag":636,"props":2718,"children":2719},{"style":672},[2720],{"type":612,"value":705},{"type":606,"tag":636,"props":2722,"children":2723},{"style":663},[2724],{"type":612,"value":2302},{"type":606,"tag":636,"props":2726,"children":2727},{"style":672},[2728],{"type":612,"value":695},{"type":606,"tag":636,"props":2730,"children":2731},{"style":651},[2732],{"type":612,"value":2311},{"type":606,"tag":636,"props":2734,"children":2735},{"style":672},[2736],{"type":612,"value":705},{"type":606,"tag":636,"props":2738,"children":2739},{"style":663},[2740],{"type":612,"value":710},{"type":606,"tag":636,"props":2742,"children":2743},{"style":651},[2744],{"type":612,"value":715},{"type":606,"tag":615,"props":2746,"children":2747},{},[2748],{"type":606,"tag":821,"props":2749,"children":2750},{},[2751],{"type":612,"value":2752},"Key Learning Points:",{"type":606,"tag":827,"props":2754,"children":2755},{},[2756,2769,2781,2799],{"type":606,"tag":831,"props":2757,"children":2758},{},[2759,2761,2767],{"type":612,"value":2760},"📌 Used ",{"type":606,"tag":632,"props":2762,"children":2764},{"className":2763},[],[2765],{"type":612,"value":2766},"len()",{"type":612,"value":2768}," to check length",{"type":606,"tag":831,"props":2770,"children":2771},{},[2772,2773,2779],{"type":612,"value":2760},{"type":606,"tag":632,"props":2774,"children":2776},{"className":2775},[],[2777],{"type":612,"value":2778},"any()",{"type":612,"value":2780}," with generator expressions",{"type":606,"tag":831,"props":2782,"children":2783},{},[2784,2785,2790,2792,2797],{"type":612,"value":2760},{"type":606,"tag":632,"props":2786,"children":2788},{"className":2787},[],[2789],{"type":612,"value":916},{"type":612,"value":2791}," and ",{"type":606,"tag":632,"props":2793,"children":2795},{"className":2794},[],[2796],{"type":612,"value":861},{"type":612,"value":2798}," for character checks",{"type":606,"tag":831,"props":2800,"children":2801},{},[2802,2803,2808],{"type":612,"value":2760},{"type":606,"tag":632,"props":2804,"children":2806},{"className":2805},[],[2807],{"type":612,"value":839},{"type":612,"value":2809}," to check for special characters",{"type":606,"tag":799,"props":2811,"children":2813},{"id":2812},"key-takeaways",[2814],{"type":612,"value":2815},"🎯 Key Takeaways",{"type":606,"tag":811,"props":2817,"children":2821},{"emoji":2818,"title":2819,"type":2820},"📚","String Content Checking Essentials","success",[2822,2830,2873,2881,2933,2941,2978],{"type":606,"tag":615,"props":2823,"children":2824},{},[2825],{"type":606,"tag":821,"props":2826,"children":2827},{},[2828],{"type":612,"value":2829},"Basic Checks:",{"type":606,"tag":827,"props":2831,"children":2832},{},[2833,2843,2853,2863],{"type":606,"tag":831,"props":2834,"children":2835},{},[2836,2841],{"type":606,"tag":632,"props":2837,"children":2839},{"className":2838},[],[2840],{"type":612,"value":850},{"type":612,"value":2842}," for letters",{"type":606,"tag":831,"props":2844,"children":2845},{},[2846,2851],{"type":606,"tag":632,"props":2847,"children":2849},{"className":2848},[],[2850],{"type":612,"value":861},{"type":612,"value":2852}," for numbers",{"type":606,"tag":831,"props":2854,"children":2855},{},[2856,2861],{"type":606,"tag":632,"props":2857,"children":2859},{"className":2858},[],[2860],{"type":612,"value":839},{"type":612,"value":2862}," for letters and numbers",{"type":606,"tag":831,"props":2864,"children":2865},{},[2866,2871],{"type":606,"tag":632,"props":2867,"children":2869},{"className":2868},[],[2870],{"type":612,"value":894},{"type":612,"value":2872}," for whitespace",{"type":606,"tag":615,"props":2874,"children":2875},{},[2876],{"type":606,"tag":821,"props":2877,"children":2878},{},[2879],{"type":612,"value":2880},"Pattern Checks:",{"type":606,"tag":827,"props":2882,"children":2883},{},[2884,2894,2905,2916],{"type":606,"tag":831,"props":2885,"children":2886},{},[2887,2892],{"type":606,"tag":632,"props":2888,"children":2890},{"className":2889},[],[2891],{"type":612,"value":1044},{"type":612,"value":2893}," operator for containment",{"type":606,"tag":831,"props":2895,"children":2896},{},[2897,2903],{"type":606,"tag":632,"props":2898,"children":2900},{"className":2899},[],[2901],{"type":612,"value":2902},".startswith()",{"type":612,"value":2904}," for prefix",{"type":606,"tag":831,"props":2906,"children":2907},{},[2908,2914],{"type":606,"tag":632,"props":2909,"children":2911},{"className":2910},[],[2912],{"type":612,"value":2913},".endswith()",{"type":612,"value":2915}," for suffix",{"type":606,"tag":831,"props":2917,"children":2918},{},[2919,2924,2926,2931],{"type":606,"tag":632,"props":2920,"children":2922},{"className":2921},[],[2923],{"type":612,"value":905},{"type":612,"value":2925},"/",{"type":606,"tag":632,"props":2927,"children":2929},{"className":2928},[],[2930],{"type":612,"value":916},{"type":612,"value":2932}," for case",{"type":606,"tag":615,"props":2934,"children":2935},{},[2936],{"type":606,"tag":821,"props":2937,"children":2938},{},[2939],{"type":612,"value":2940},"Best Practices:",{"type":606,"tag":827,"props":2942,"children":2943},{},[2944,2949,2968,2973],{"type":606,"tag":831,"props":2945,"children":2946},{},[2947],{"type":612,"value":2948},"Combine multiple checks for validation",{"type":606,"tag":831,"props":2950,"children":2951},{},[2952,2954,2959,2960,2966],{"type":612,"value":2953},"Use ",{"type":606,"tag":632,"props":2955,"children":2957},{"className":2956},[],[2958],{"type":612,"value":2778},{"type":612,"value":2925},{"type":606,"tag":632,"props":2961,"children":2963},{"className":2962},[],[2964],{"type":612,"value":2965},"all()",{"type":612,"value":2967}," for complex conditions",{"type":606,"tag":831,"props":2969,"children":2970},{},[2971],{"type":612,"value":2972},"Consider using regex for advanced patterns",{"type":606,"tag":831,"props":2974,"children":2975},{},[2976],{"type":612,"value":2977},"Handle edge cases (empty strings, etc.)",{"type":606,"tag":615,"props":2979,"children":2980},{},[2981,2986],{"type":606,"tag":821,"props":2982,"children":2983},{},[2984],{"type":612,"value":2985},"Remember:",{"type":612,"value":2987}," String validation is crucial for data quality and security!",{"type":606,"tag":2989,"props":2990,"children":2991},"style",{},[2992],{"type":612,"value":2993},"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":2995},[2996,2999,3000,3001,3004],{"id":801,"depth":27,"text":804,"children":2997},[2998],{"id":933,"depth":36,"text":936},{"id":1265,"depth":27,"text":1268},{"id":1673,"depth":27,"text":1676},{"id":2052,"depth":27,"text":2055,"children":3002},[3003],{"id":2326,"depth":36,"text":2329},{"id":2812,"depth":27,"text":2815},1782373762425]