adada.py
@pythoncodestar
Followers
208
Following
428
Media
67
Statuses
285
I tweet about my learning experience in coding and programming. I share useful resources to help python coding newbies improve their coding skills.
Joined January 2022
In the code below is a Python function that take a list of numbers as an input and then filters out the prime numbers in the list.
0
1
1
As a beginner in Python programming, I am sure you have heard a lot about *args and **kwargs. So what exactly are they? A thread🧵
1
1
1
Hi all! Just recovered my account after it was hacked. Back to posting Python stuff. See you soon
0
0
0
Do you know that you can actually live a debt-free life? Yes, you really can!
0
1
1
Self-discipline isn't about depriving yourself; it's about empowering yourself. It's the fuel that drives you towards your goals, keeps you focused amidst distractions, and ultimately leads to personal growth and success. Cultivate it!
0
5
5
Lists become one string Joining, mapping, and uniting Python transformation https://t.co/3XsOv0J2pJ
Here, I tried to generate a single string from two lists. Is there a better way of doing this? #Python #100DaysOfCode #pythonprogramming #coding
0
1
1
Python is the sweetheart of the programming world. Prove me wrong!
0
0
3
Overall, *args and **kwargs can be incredibly useful when working with functions that take a variable number of arguments. Happy coding! 🚀
0
0
0
Similarly, the keyworded **kwargs arguments allows the user to pass a variable number of keyworded arguments to a function. For instance, you can pass a dictionary of arguments to a function and unpack them using **kwargs. Check the example below:
1
0
0
Yes, *args and **kwargs allow for passing an unlimited number of arguments to a function in Python. The special syntax *args in function definitions in Python allows us pass a variable number of non-keyworded arguments to a function. Find an example below.
1
0
0
As a beginner in Python programming, I am sure you have heard a lot about *args and **kwargs. So what exactly are they? A thread🧵
1
1
1
Do you know there is dictionary comprehension in Python, which works just like list comprehension? It helps create a dictionary with one line of code. Take a look at these two code snippets. One uses traditional for loop and the other uses comprehension. Which one is easier?
0
0
2
List comprehension is a game-changer in Python! With just one line of code, you can create, filter, and transform lists. Check these two examples; the first one the traditional way, the second one using list comprehension.
0
0
3
Python programming has become the most in-demand skill in the tech industry. Its versatility, readability, and ease of use make it a top choice for developers. If you're looking to learn a new language, start with Python! You won't regret it. #python #programming #techskills
0
0
4
By understanding the basics of decorators, we can leverage this powerful pattern to make our code more efficient and effective.9
0
0
1
Decorators are incredibly versatile and powerful tools in Python. They enable us to separate cross-cutting concerns such as logging, caching, and security from core business logic, leading to cleaner, more modular, and maintainable code.
1
0
1
When we call the add function, it will now log its inputs and outputs:
1
0
2
Syntax-wise, decorators are denoted by an @ sign followed by the decorator function name and placed before the function to be decorated. Here's a simple example decorator that adds logging to a function:
1
0
1