Python Basics: String Methods and Control Flow

🐍 Python Basics – Learning Notes (Day Update) Here are some key Python concepts I’ve been practicing 👇 🔹 split() - Breaks a string into parts and returns them as a list. 🔹 len() - A built-in function used to count the number of items in an object. 🔹 rsplit() - “Right split” — splits a string starting from the right side. 🔹 strip() - Removes spaces from both left and right sides. 🔹 lstrip() / rstrip() - Removes spaces from left / right side respectively. ✔️ startswith() → Verifies if a string starts with a specific value ✔️ endswith() → Checks if a string ends with a given value 🔹 String Validation Methods (True / False) ✔️ isdigit() → Checks if string contains only digits (0–9) ✔️ isalnum() → Checks if string contains letters + numbers ✔️ isalpha() → Checks if string contains only alphabets 🔹 Control & Flow Concepts ✔️ if / else → Decision Making Executes code based on conditions. ✔️ for loop → Repeat Execution Iterates over sequences like list, string, or range. #Python #Programming #Coding #PythonBasics #DeveloperJourney

To view or add a comment, sign in

Explore content categories