🐍 Python Term of the Day: divmod() (Python’s Built-in Functions) Returns a tuple containing the quotient and remainder from an integer division. https://lnkd.in/dnnytujw
Real Python’s Post
More Relevant Posts
-
Midiscript.org | The core repo is a small Python DSL that turns files into… The core repo is a small Python DSL that turns `.ms` files into MIDI. Under the hood it’s a CLI + lexer + parser + MIDI generator.
To view or add a comment, sign in
-
Using too much metaprogramming in a dynamically typed language like Python can confuse your IDE and your type checker. On the other side, typing everything by hand can create mistakes. One idea you can try is to write scripts that generate code. That way you won't have to type everything by hand, and still get the benefits of your type checker/IDE.
To view or add a comment, sign in
-
Still making iterables like this? 🤦 Learn how to make a Python class iterable using the __iter__ dunder method. A simple Python tip to loop through objects directly instead of accessing their internal data. Are you using Python dunder methods in your projects?
To view or add a comment, sign in
-
🚀 Levelling up Python with match! One of the most exciting additions in Python 3.10 is the match statement — a cleaner, more powerful alternative to long if...elif...else chains. ✨ Why it matters: Simplifies code readability Supports complex patterns (tuples, types, conditions) Uses _ as a wildcard for default cases Brings Python closer to the elegance of switch-case constructs in other languages For anyone working on decision-heavy logic, this is a game-changer. Cleaner code → fewer bugs → faster collaboration. 💡 Curious: Have you started using match in your projects yet? How does it compare to your old conditional workflows? #Python #CodingTips #SoftwareDevelopment #Python310 #CleanCode
To view or add a comment, sign in
-
-
Friday brings #Python Today I have something special for you. If you’ve ever used generators in Python, you’re probably familiar with the `yield` keyword. But what about `yield from`? Take a look at the image: it lets the current generator delegate control to another generator until it’s finished.
To view or add a comment, sign in
-
-
Recently I released v2 of immobilus — my small Python library for deterministic time control in tests. The project was completely redesigned and now includes: • thread-safe time freezing • a pytest plugin • flexible time control (tick, jumps, shifts) Feel free to check it out: https://lnkd.in/dTN_ksie #python #testing #pytest #opensource
To view or add a comment, sign in
-
Quiz: Duck Typing in Python: Writing Flexible and Decoupled Code Article from realpython.com link https://lnkd.in/ex4VkMKV Check your grasp of Python's duck typing. Recognize behavior-based interfaces, use protocols and special methods, and know alternatives. Try the quiz.
To view or add a comment, sign in
-
Python 🐍: HowTos: Uninstall Multiple Packages 📦 at One Time via pip Here’s a quick beginner-friendly example. pip uninstall package1 package2 … packageX #python #pip #pythonhowtos #pythonexample
To view or add a comment, sign in
-
-
Python 🐍: pip: HowTos: Get Package Versions Available and Installed Version Here’s a quick way to get all versions available of a particular package as well as, the latest and installed versions. pip index versions package-name #python #pip #pythonhowtos #pipindex
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