🐍 Day 11 of my Python Full-Stack Journey — Tuples! Today I explored one of Python's most underrated data structures: Tuples 📦 At first glance, they look just like lists — but the key difference? They're immutable. Once created, you can't change them. Here's what I learned: ✅ Creating a tuple → my_tuple = (1, 2, 3) or even just 1, 2, 3 ✅ Accessing elements → Same indexing as lists: my_tuple[0] ✅ Tuple unpacking → a, b, c = (10, 20, 30) — super clean! ✅ Single element tuple → Don't forget the trailing comma: (5,) not (5) ✅ Tuples as dictionary keys → Unlike lists, tuples are hashable! Why use tuples over lists? → Faster performance → Protects data from accidental modification → Great for returning multiple values from a function python def get_user(): return ("Alice", 25, "Developer") name, age, role = get_user() Simple, clean, and Pythonic. 💡 Still going strong on this journey — Day 12 coming tomorrow! 🚀 #Python #FullStackDevelopment #100DaysOfCode #PythonLearning #CodingJourney #Day11 #Tuples #LearnToCode
Python Tuples: Immutable Data Structure
More Relevant Posts
-
Day 18 of my Python Full-Stack Journey — The for Loop 🔁 Today I dove deep into one of Python's most powerful and elegant features — the for loop. What made it click for me: Unlike other languages where for loops are mostly about counting, Python's for loop is about iterating over anything — lists, strings, dictionaries, ranges, even custom objects. Here's what I explored today: ✅ Looping over lists, strings, and ranges ✅ Using enumerate() to get index + value together ✅ Looping through dictionaries with .items() ✅ Nested for loops ✅ List comprehensions — a cleaner, Pythonic way to loop ✅ break and continue to control loop flow ✅ The else clause in a for loop (yes, that's a thing!) My biggest takeaway? Python's for loop isn't just a loop — it's a mindset. It pushes you to think in terms of collections and iteration rather than indexes and counters. That shift alone makes your code cleaner and more readable. One line that blew my mind today: pythonsquares = [x**2 for x in range(1, 11)] That's a full loop compressed into one beautiful line. 🤯 Still 82 days to go, and every day feels like unlocking a new superpower. If you're also learning Python or on your own coding journey, drop a comment — let's grow together! 🚀 #Python #100DaysOfCode #FullStackDevelopment #Coding #LearningInPublic #Day18 #PythonForBeginners #WebDevelopment
To view or add a comment, sign in
-
-
🐍 Day 12 of my Python Full-Stack Journey — Mastering Lists! Today I went deep into one of Python's most powerful built-in data structures: Lists. Here's what I covered: ✅ Creating and indexing lists ✅ Slicing (list[1:4], negative indexing) ✅ List methods — append(), extend(), insert(), remove(), pop(), sort(), reverse() ✅ List comprehensions (honestly a game-changer 🤯) ✅ Nested lists and iterating with loops The "aha moment" today? List comprehensions. Instead of writing 4 lines to filter a list, you can do it in ONE: squares = [x**2 for x in range(10) if x % 2 == 0] Clean. Pythonic. Beautiful. 🧠 Lists feel simple at first — but understanding how they work under the hood (mutability, references, shallow vs. deep copy) is where real Python thinking begins. 12 days in. The foundation is getting solid. Drop a 💬 if you're also learning Python — would love to connect and grow together! #Python #100DaysOfCode #FullStackDeveloper #LearningInPublic #PythonJourney #CodeNewbie #SoftwareDevelopment
To view or add a comment, sign in
-
-
Day 13 of my Python Full-Stack Journey 🐍 Today, Python taught me how to make decisions. 🤔 Conditional statements — if, elif, and else — are the brain of any program. Before today, my code just ran in a straight line. Now it can think. Here's something I built today: python score = 85 if score >= 90: print("Grade: A 🏆") elif score >= 75: print("Grade: B ✅") elif score >= 60: print("Grade: C 📘") else: print("Grade: F — Keep going! 💪") Simple? Yes. But this tiny block of logic is the foundation of every login system, recommendation engine, and decision-making app you've ever used. Key things I learned today: → if checks the first condition → elif handles multiple possibilities → else catches everything else → Indentation in Python isn't just style — it's syntax → You can even nest conditions inside conditions (carefully!) The biggest mindset shift? Realizing that writing code is really just teaching a computer how to think in scenarios — just like we do every day. 13 days in. Still showing up. 🔥 What was the concept that clicked for you when you were learning to code? Drop it below 👇 #Python #100DaysOfCode #FullStackDeveloper #LearningInPublic #CodingJourney #PythonProgramming #TechCommunity #Day13
To view or add a comment, sign in
-
-
🚀 Day 13/100: Mastering Python String Methods! Today marks Day 13 of my #100DaysOfCode journey, and I’m diving deep into the world of Python String Methods. 🐍 Strings are everywhere in programming—from data cleaning to building web apps. Understanding these built-in methods is a total game-changer for writing clean, efficient code. 🛠️ Key Takeaways from Today: Case Transformations: Using .upper(), .lower(), and .capitalize() to standardize text data. Searching & Counting: Using .count() to find frequencies and .find() to locate substrings. Data Cleaning: The power of .replace() for formatting (like changing dates from / to -) and .split() for turning strings into lists. Validation: Checking inputs with .isalnum() and .isnumeric(). 💡 Quick Correction & Tip: While learning from cheatsheets, I noticed a tiny detail! In Python, the method is actually .isnumeric() (not just .numeric()). Always double-check your documentation while coding! 💻 I'm feeling more confident with Python every day. Looking forward to what Day 14 brings! #Python #CodingChallenge #100DaysOfCode #SoftwareDevelopment #ProgrammingTips #DataScience #WebDev #LearnToCode #PythonStrings
To view or add a comment, sign in
-
-
Day 27 of My Python Full-Stack Journey 🐍 Today's challenge: Reverse the words in a sentence — without using .reverse() or .join() Sounds simple? It made me think differently about strings and loops. Here's the logic I built from scratch: python def reverse_words(sentence): words = [] word = "" for char in sentence: if char == " ": if word: words.append(word) word = "" else: word += char if word: words.append(word) # Rebuild sentence manually result = "" for i in range(len(words) - 1, -1, -1): result += words[i] if i != 0: result += " " return result print(reverse_words("Hello World from Python")) # Output: Python from World Hello Key takeaways from today: → Manual string parsing builds real intuition → Constraints force creativity — no shortcuts = deeper understanding → Every loop you write by hand teaches you what built-ins do under the hood 27 days in. Still going strong. 💪 What would YOU add to make this more efficient? #Python #100DaysOfCode #FullStack #PythonProgramming #CodingJourney #LearningInPublic #Day27
To view or add a comment, sign in
-
-
Day 14 – Exploring Built-in Functions & Python Standard Libraries Day 14 was focused on understanding how Python makes our work easier through built-in functions and standard libraries. Instead of writing everything from scratch, I explored how to use ready-made tools effectively and correctly. What I learned and practiced today: Built-in Functions: Used pow(), sum(), max(), and min() for basic computations Practiced rounding values using round() with positive and negative precision Understood how these functions accept parameters and return results Math Module (math): Calculated factorials and square roots Worked with constants like pi and e Used trigonometric functions such as sin() (with radians) Explored mathematical helpers: ceil(), floor(), trunc() fabs() for absolute values log() and log10() for logarithmic calculations Random Module (random): Generated random numbers using: random() for floats randint() for integers uniform() for float ranges Selected random elements using choice() and sample() Shuffled lists using shuffle() and observed in-place modification behavior Collections Module (Counter): Used Counter to count occurrences of elements in a list Learned how it efficiently tracks frequency of unique values Key Takeaways: Python’s standard libraries save time and reduce code complexity Understanding return values and in-place operations is important Libraries are powerful only when used with proper understanding Every day, I’m getting more comfortable with Python’s ecosystem and learning how to write cleaner and smarter code. Hashtags #Python #PythonLibraries #BuiltInFunctions #MathModule #RandomModule #Collections #Counter #DailyLearning #ProgrammingBasics #CodingJourney
To view or add a comment, sign in
-
𝘿𝙖𝙮 8/50𝘿𝙖𝙮𝙨𝘾𝙝𝙖𝙡𝙡𝙚𝙣𝙜𝙚 𝙁𝙪𝙣𝙘𝙩𝙞𝙤𝙣𝙨 𝙄𝙣 𝙋𝙮𝙩𝙝𝙤𝙣: A function is a block of code that performs a specific task. 👉 We can use functions as: ✅ reduce code repetition ✅ make code clean ✅ reuse code again and again 👉𝙎𝙮𝙣𝙩𝙖𝙭: def function_name(): #code : def greet(): print("Hello, Welcome to Python!") 𝙏𝙮𝙥𝙚𝙨 𝙤𝙛 𝙁𝙪𝙣𝗰𝙩𝙞𝙤𝙣𝙨 𝙞𝙣 𝙋𝙮𝙩𝙝𝙤𝙣: 🎯 𝘉𝘶𝘭𝘪𝘵 𝘐𝘯 𝘍𝘶𝘯𝘤𝘵𝘪𝘰𝘯𝘴: These are functions that are already provided by Python. 𝐂𝐨𝐝𝐞: print("Hello") len("Python") type(10) 🎯 𝘜𝘴𝘦𝘳-𝘥𝘦𝘧𝘪𝘯𝘦𝘥 𝘍𝘶𝘯𝘤𝘵𝘪𝘰𝘯𝘴: These are functions created by the user. 𝐂𝐨𝐝𝐞: def greet(): print("Hello") greet() 🎯 𝘍𝘶𝘯𝘤𝘵𝘪𝘰𝘯𝘴 𝘞𝘪𝘵𝘩𝘖𝘶𝘵 𝘗𝘢𝘳𝘢𝘮𝘦𝘵𝘦𝘳𝘴: A function that does not take any input. 𝐂𝐨𝐝𝐞: greet() 𝐨𝐮𝐭𝐩𝐮𝐭: Hello, Welcome to Python! 🎯 𝘍𝘶𝘯𝘤𝘵𝘪𝘰𝘯 𝘸𝘪𝘵𝘩 𝘗𝘢𝘳𝘢𝘮𝘦𝘵𝘦𝘳: A function that takes input values. 𝐂𝐨𝐝𝐞: def greet(name): print("Hello", name) greet("Durga") greet("Python") 𝐨𝐮𝐭𝐩𝐮𝐭: Hello Durga Hello Python 🎯 𝘍𝘶𝘯𝘤𝘵𝘪𝘰𝘯 𝘞𝘪𝘵𝘩 𝘙𝘦𝘵𝘶𝘳𝘯 𝘝𝘢𝘭𝘶𝘦: A function that returns a value. 𝐂𝐨𝐝𝐞: def add(a, b): return a + b result = add(10, 20) print("Sum =", result) 𝐨𝐮𝐭𝐩𝐮𝐭: Sum = 30 🎯 𝘍𝘶𝘯𝘤𝘵𝘪𝘰𝘯 𝘞𝘪𝘵𝘩𝘰𝘶𝘵 𝘙𝘦𝘵𝘶𝘳𝘯 𝘝𝘢𝘭𝘶𝘦: A function that does not return anything. 𝐂𝐨𝐝𝐞: def show(): print("Python") show() #coding #pythonbasics #50dayschallenge #motivation #bvcec #ece
To view or add a comment, sign in
-
🚀 Day 12/30 – Python OOPs Challenge 💡 Types of Inheritance in Python Yesterday we learned what Inheritance is. Today let’s see the different types of inheritance in Python. 🔹 1️⃣ Single Inheritance One child class inherits from one parent class. ``` class Parent: def show(self): print("Parent class") class Child(Parent): pass c = Child() c.show() ``` 🔹 2️⃣ Multiple Inheritance One child class inherits from more than one parent class. ``` class Father: def skill1(self): print("Gardening") class Mother: def skill2(self): print("Cooking") class Child(Father, Mother): pass c = Child() c.skill1() c.skill2() ``` 🔹 3️⃣ Multilevel Inheritance Inheritance chain (Grandparent → Parent → Child) ``` class Grandparent: def home(self): print("Owns a house") class Parent(Grandparent): pass class Child(Parent): pass c = Child() c.home() ``` 🔹 Other Types (Conceptually) - Hierarchical Inheritance - Hybrid Inheritance 📌 Key takeaway: Inheritance helps reuse code in different structures. 👉 Day 13: Method Overriding (coming tomorrow) 👍 Like | 💬 Comment | 🔁 Share 📍 Follow me to learn Python OOP step by step #Python #OOP #LearningInPublic #30DaysOfPython #CodingJourney
To view or add a comment, sign in
-
Day 15/100: My code finally talked back! 🎙️✨ For two weeks, I’ve been talking at my computer. Today, it started listening. I mastered the input() function! The Catch: Python is a bit of a literalist. If you tell it you’re 25, it thinks you’re the word "25," not the number. Without Type Casting (int()), your math becomes a mess. It's the difference between "25 + 1 = 26" and "25 + 1 = 251." 🤦♂️ The Code: Python name = input("Enter your name: ") age = int(input("Enter your age: ")) # Casting to int so Python doesn't get confused print(f"Hi {name}! {age} is a great age to master Python. 🚀") Moving from static scripts to interactive tools feels like a massive level-up. ⬆️ #100DaysOfCode #Python #InteractiveCode #CodingLife #LearnToCode
To view or add a comment, sign in
-
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