🚀 Learning Something New Every Day! Today I learned an important Python concept — *args and **kwargs. 🔹 *args allows a function to take multiple positional arguments (stored as a tuple) 🔹 **kwargs allows a function to take multiple keyword arguments (stored as a dictionary) 💡 This makes functions more flexible and reusable in real-world scenarios. Here’s a simple example: def demo(*args, **kwargs): print(args) print(kwargs) Step by step, I’m strengthening my Python fundamentals and building a strong base for data analytics. #Python #LearningJourney #Coding #DataAnalytics
Python Fundamentals: Understanding *args and **kwargs
More Relevant Posts
-
🚀 Python Practice – Function Examples Taking my Python learning a step further by practicing real-world function-based problems 🐍 In this session, I worked on: ✔️ Temperature Conversion (Celsius ↔ Fahrenheit) ✔️ Password Strength Checker ✔️ Shopping Cart Total Cost Calculator ✔️ Palindrome Checker ✔️ Factorial using Recursion These examples helped me understand how functions can be used to solve practical problems and write reusable, structured code. A big thanks to Krish Naik Sir for his amazing teaching and clear explanations 🙌 Documented all my practice in a Jupyter Notebook and shared it as a PDF to track my progress. Learning by building real logic step by step 📊 #Python #Functions #Practice #LearningJourney #DataAnalytics #Coding
To view or add a comment, sign in
-
Python Basics Cheat Sheet – From Me print("Hello") -> Display output len(data) -> Get data length type(x) -> Check data type int(), str(), float() -> Type conversion for i in range(5): -> Loop iteration if x > 10: -> Conditional statement def function(): -> Define a function list.append(x) -> Add item to list list.remove(x) -> Remove item from list dict["key"] -> Access dictionary value import math -> Import library Currently learning Python fundamentals and creating simple cheat sheets to stay consistent. Still learning, but enjoying the process. #Python #Programming #LearningJourney #DataAnalytics #CareerGrowth
To view or add a comment, sign in
-
Day 18: Today i explored how Python handles memory efficiently using Generators 🔹 What I learned and practiced: ✔️ Generators Functions that return an iterator and produce values one at a time. Great for saving memory when working with large datasets. ✔️ yield Keyword Used to produce a value and pause the function execution. It resumes from the same point when called again, unlike a normal return. ✔️ next() Function Used to retrieve the next value from the generator. Automatically stops when no more values are left to produce. ✔️ Created a square_gen() function to generate squares of numbers one by one. Key takeaway: Generators and yield are powerful tools for writing smarter, more efficient code by only processing what we need, when we need it.and also push in github #Python #codegnan #LearningPython
To view or add a comment, sign in
-
-
I used to think errors were just problems… now I’m learning they’re part of the design. Today’s Python MahaRevision ⚙️ Chapter 12: Advanced Python (Part 1) This chapter felt like moving from basics to writing more robust code: → Exception handling (try-except) → Raising exceptions → try with else & finally → global keyword → __name__ == __"main"__ → enumerate function → List comprehensions A lot of small concepts—but each one adds more control and clarity to how code behaves. Practice set done: Handled errors in programs, experimented with custom exceptions, used enumerate for cleaner loops, and practiced writing compact code using list comprehensions. Some parts were new, some a bit tricky… but overall it felt like leveling up from just writing code to writing better code. Still learning, still improving. #Python #LearningInPublic #CodingJourney #Programming #AdvancedPython
To view or add a comment, sign in
-
Recursion confused me. So I built a visualizer for it. 🐍 Most beginners (including me) struggle with one thing: "What actually happens when a function calls itself?" So I wrote a Python program that shows you — step by step, with a delay so you can actually follow it. Watch it go DOWN the stack, hit the base case, then come back UP — adding numbers on the way. 👇 What I used: → Recursion — function calling itself → time.sleep() — to slow execution down visually → Print statements — to trace every step This isn't from a tutorial. I built this because I was confused. That's the best reason to build anything. 💡 Important: Dry run your code, It helps alot. #Python #Recursion #LearningInPublic #DataAnalytics #BBA #BuildInPublic
To view or add a comment, sign in
-
🚀 Day 4: Strengthening the Fundamentals Today wasn’t about learning something new — it was about making what I’ve learned stronger 👇 📘 Day 4: Practice + Revision Here’s what I focused on today: 📝 Practice ✅ Solved Python practice set questions ✅ Worked on OOP-based problems (Classes, Inheritance) 🔁 Revision ✅ Revised all previously learned concepts ✅ Strengthened understanding of core Python fundamentals 💡 Key Learning: Learning new things is important, but revising and practicing is what actually builds confidence. 🎯 Next Step: Start applying these concepts in small real-world projects and continue improving problem-solving skills. Consistency over everything 🚀 #Day4 #Python #CodingPractice #OOP #AIDeveloper #LearningInPublic #CodingJourney #Consistency
To view or add a comment, sign in
-
-
Day 9 of my Python Learning Journey! Today's focus was all about mastering Dictionaries in Python. I worked through several practical exercises to get hands-on experience with how they handle data. Here is what I covered: ✅ Updating Dictionaries: Adding new key-value pairs dynamically. ✅ Accessing Data: Fetching specific values using their corresponding keys. ✅ Removing Items: Deleting key-value pairs using the del keyword. ✅ Extracting Keys & Values: Utilizing the .keys() and .values() methods to pull out specific data sets. It is amazing to see how powerful and flexible dictionaries are for organizing and manipulating structured data! A big thanks to VASU KUMAR PALANI and PythonLife for the great resources and guidance. 🙌 #Python #PythonProgramming #CodingJourney #Day9 #LearnToCode #PythonLife #DeveloperCommunity
To view or add a comment, sign in
-
-
#Day12 of learning Python 🐍 Today I learned about file handling in Python and how to work with files using different modes like read (r), write (w), and append (a). Also explored using the with statement (context manager) to handle files more safely and efficiently. Practiced tasks like counting words in a file, checking whether a specific word exists, and building a small function to verify if a password exists inside a file. Also revised how try–except–finally helps handle file-related errors like missing files. Working with files made me realize how Python programs can store and retrieve real data, which is an important step toward building practical applications. Day 12 complete — 88 days to go! 🚀 #Day12 #PythonLearning #FileHandling #PythonFiles #100DaysOfLearning #CodingJourney #SkillShikshya
To view or add a comment, sign in
-
📘 Python Learning – Day 8 Highlights 🐍 Today’s class was about writing smarter and more flexible functions 👇 🔹 Variable Scope & LEGB Rule: Learned how Python searches variables → Local → Enclosing → Global → Built-in 🔹 Local vs Global Variables: Understanding where variables can be accessed and used 🔹 Advanced Arguments: ✔ *args → handles multiple positional arguments (as tuple) ✔ **kwargs → handles keyword arguments (as dictionary) 🔹 Flexible Functions: Created functions that can take unlimited inputs and return dynamic results 💡 Example: def add(*args): return sum(args) Step by step, moving towards writing more professional Python code 🚀 #Python #Programming #Coding #LearningJourney #Beginner #TechSkills
To view or add a comment, sign in
-
-
Day 5 of #30DaysOfPython ✅ Today I met two of Python's most powerful data structures. One of them already feels like home. The other? Slightly chaotic. Lists and dictionaries. Day 5. Lists made sense quickly — they're just ordered collections. I can store things, loop through them, sort them, slice them. Intuitive. Dictionaries? At first, the key-value pair concept felt abstract. The bug that got me today? I threw both strings and integers into the same list and tried to sort it. Python did not appreciate that. TypeError showed up like an old enemy. Day 5 done. 25 more to go! 👇 Lists vs dictionaries — when do you reach for one over the other? #Python #30DaysOfPython #DataStructures #StudentLife #AIML
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