🚀 Day 13 – Python Learning..... 🐍 📌 Formatting Numbers. 🔢 📌 Format Specification .⚙️ 📌 Working with Strings. 🧵 📌 Getting a Character from a String. 🔍 📌 Slicing a String .✂️ 📌 Triple Quotes for Multiline Strings. 📄 📌 "in" Keyword to Check Substring .🔎 📌 Looping Through Characters in a String. 🔁 📌 String Methods 🛠️ → isalpha(), islower(), isupper(), isdigit(), startswith(), endswith(), lower(), upper(), title(). #Python #LearningPython #CodingJourney #100DaysOfCode
Python Day 13: Formatting Numbers and Strings
More Relevant Posts
-
Spent some time today revisiting something I used to completely overlook in Python — how objects actually behave behind the scenes. Earlier I used to memorize outputs. Now I’m trying to understand why they happen. A few things finally clicked for me: Variables don’t hold values, they point to objects. Lists and dictionaries change in place, integers and strings don’t. += behaves differently depending on the type — with lists it usually modifies the same object, but with strings it creates a completely new object. Most “tricky” interview questions are really about mutation vs reassignment. Shallow copy and deep copy make sense once you think in terms of references instead of values. Many Python surprises aren’t magic — they come from not understanding how references and objects work internally. Still learning, still fixing gaps, but this kind of clarity feels very different from just finishing tutorials. If you’re preparing for Python interviews, try predicting outputs instead of running code immediately. That exercise alone teaches a lot. #Python #LearningInPublic #BackendDevelopment #InterviewPreparation #
To view or add a comment, sign in
-
Python Clarity Series – Episode 18 Topic: sort() vs sorted() 📌 Sorting confusion: sort() vs sorted() Students think they behave the same. They don’t. Example: nums = [4, 2, 1, 3] nums.sort() print(nums) Output: [1, 2, 3, 4] 👉 sort() changes the original list Now: nums = [4, 2, 1, 3] new_list = sorted(nums) print(new_list) Output: [1, 2, 3, 4] 👉 sorted() creates a new list Original list remains unchanged. 💡 Clarity Rule: sort() → modifies original sorted() → returns new list This is a classic Python interview question too. #PythonTips #ProgrammingConcepts #DeveloperThinking
To view or add a comment, sign in
-
-
Python Functions Cheat Sheet | Everything You Need at One Place Python functions are the backbone of clean, reusable, and scalable code. This Python Functions Cheat Sheet covers all the essentials—from basics to interview-ready concepts. What you’ll find inside: • Function definition & calling • Parameters vs arguments • Default & keyword arguments • *args and **kwargs • Lambda (anonymous) functions • Return statements • Scope (local vs global) • Docstrings & best practices Perfect for beginners, revision before interviews, and daily coding reference for your next AI project. Save it, revise it, and code smarter. #Python #PythonProgramming #PythonFunctions #CodingCheatSheet
To view or add a comment, sign in
-
Python Clarity Series – Episode 15 Topic: List Comprehension vs Loop 🔥 Cleaner Python: List Comprehension Normal way: squares = [] for i in range(5): squares.append(i*i) Pythonic way: squares = [i*i for i in range(5)] 👉 Same result. 👉 Cleaner. 👉 Faster. 👉 Preferred in interviews. 💡 Clarity Thought: Python rewards readability. Exams may not demand it. But real coding values it. Are you still writing long loops? #Pythonic #CodingEfficiency #FutureReady
To view or add a comment, sign in
-
-
In Python, if we write: a = b = [ ] Are we creating two lists or just one? Actually, Python creates only one list in memory, and both variables "a" and "b" reference the same object. This happens because assignment in Python doesn’t copy objects. Instead, it simply makes the variables point to the same object in memory. Let’s look at a simple example: a = b = [ ] a.append(1) print(a) print(b) Output: [1] [1] Even though we only modified "a", "b" changed as well. That’s because both variables are referencing the same list. If you want two independent lists, you should create them separately: a = [ ] b = [ ] 📌 Key takeaway: In Python, variables store references to objects, not the objects themselves. #Python #Programming #DataScience #AI #Instant
To view or add a comment, sign in
-
Discovered why Python lists kill performance (200ms vs 2ms for 1M elements!) while NumPy delivers 100x speedup + 8x less memory. Explained with a chef analogy: cache misses = running to the store, GIL = one chef rule. Read full blog on medium: https://lnkd.in/dWDGWtuw #NumPy hashtag #Python hashtag #DataScience hashtag #Performance hashtag #GenAi hashtag #DataScience
To view or add a comment, sign in
-
-
Python Tip — Dictionaries Dictionaries are More Powerful Than You Think Most people use dictionaries just to store key–value pairs. Pros use them to design smarter systems. Dictionaries give you: - Instant lookups (O(1)) - Clean data modeling - Flexible, dynamic structures - Readable and expressive logic Need fast mapping? Use a dictionary. Replacing long `if-elif` chains? Use a dictionary. Modeling structured data? Use a dictionary. In Python, dictionaries aren’t just containers. They’re decision engines. FOLLOW FOR MORE PYTHON TIPS & INSIGHTS. #Python #DataStructures #CleanCode #SoftwareEngineering #ProgrammingTips
To view or add a comment, sign in
-
-
Python’s core data structures is essential for writing efficient code. Here’s a quick refresher: 🔹 Set – Unordered and unindexed collection that stores unique values. 🔹 List – Ordered, changeable collection that allows duplicates. 🔹 Tuple – Ordered but unchangeable collection for fixed data. 🔹 Dictionary – Key–value pair collection that is ordered and mutable. Mastering these fundamentals builds a strong Python foundation. 💡 🔗 Stay connected for more such content. w3schools.com GeeksforGeeks Codewars HackerRank LeetCode #python #methods #code #pythonmethods #list #tuple #set #dictionary
To view or add a comment, sign in
-
Solved the classic Two Sum problem today using Python. Instead of using the brute-force approach (O(n²)), I optimized it using a HashMap and reduced the time complexity to O(n). 🧠 Key Learnings: • Think beyond brute force * Use HashMaps for constant-time lookup * Strong fundamentals come from consistent practice Sharing my implementation on GitHub. #Python #DSA #ProblemSolving #AI #MachineLearning #Coding https://lnkd.in/gWGSyu9V
To view or add a comment, sign in
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development