👩💻 “That’s not very Pythonic…” We’ve all heard that phrase before. But what does it actually mean? This week I took a small, messy Python script and refactored it step by step, each time applying a principle that makes the code more Pythonic: 🔁 Replacing classes with functions 🧼 Using @dataclass for structure 📎 Adding type annotations 🧘 Embracing the Zen of Python ... and more! 👉 Watch here: https://lnkd.in/gaCp34fC #python #cleancode #refactoring #zenofpython #pythonic #arjancodes
ArjanCodes’ Post
More Relevant Posts
-
👩💻 “That’s not very Pythonic…” We’ve all heard that phrase before. But what does it actually mean? This week I took a small, messy Python script and refactored it step by step, each time applying a principle that makes the code more Pythonic: 🔁 Replacing classes with functions 🧼 Using @dataclass for structure 📎 Adding type annotations 🧘 Embracing the Zen of Python ... and more! 👉 Watch here: https://lnkd.in/g5fhyarh #python #cleancode #refactoring #zenofpython #pythonic #arjancodes
To view or add a comment, sign in
-
-
🐍 Practiced 500 Python Questions. Here's What Shifted. 500 questions later, Python feels less like a language—and more like a mindset. From loops to list comprehensions, exceptions to decorators, every challenge sharpened my logic and deepened my intuition. This wasn’t just practice. It was pattern recognition, debugging resilience, and the joy of elegant code. 📌 Key takeaways: - 🧠 Thinking in Python is thinking in clarity. - 🔁 Repetition builds fluency. - 🧩 Every error is a hint, not a hurdle. If you're learning Python, start with one question. Then do 499 more. PythonPractice #500QuestionsChallenge #CodeBetter #LearningJourney #DebuggingSkills #LinkedInLearning
To view or add a comment, sign in
-
Day 70 of #100DaysOfCode 🐍 Today, I learnt about Dictionaries in Python — one of the most powerful data structures for storing and managing key–value pairs. 💡 Key takeaways: ✅ How to create, access, and modify dictionaries ✅ How to loop through keys and values ✅ Using methods like .items(), .keys(), and .values() ✅ Why dictionaries are great for organizing real-world data Understanding dictionaries really deepened my confidence in handling structured data efficiently. Python just keeps getting more interesting! 🧠✨ #100DaysOfCode #Python #CodingJourney #LearningInPublic #DataStructures
To view or add a comment, sign in
-
-
Python feels easy… until it doesn’t. You fly through the basics. And then suddenly: dunder methods, decorators, functools, typy annotations, protocols... boom 💥. Sound familiar? It took me a while before I actually started feeling comfortable writing Python code. Though I still have no love for "Callable[[arg1, arg2], return_value]" annotations 😬. In this week's video, I break down the exact steps I’d take if I had to learn Python fast from scratch, covering everything I wish I knew earlier. 👉 Watch here: https://lnkd.in/eQUHiyyy #Python #SoftwareEngineering #LearningPython #CleanCode #ArjanCodes
To view or add a comment, sign in
-
-
Escape Characters in Python Strings Mastering \n, \t, and Quotes Today I revisited one of the most underrated yet powerful features in Python escape characters. Whether you're formatting output, handling multi-line strings, or embedding quotes, escape sequences like \n, \t, and \" make your strings clean and expressive. 🔹 \n → Inserts a newline 🔹 \t → Adds a tab space 🔹 \' or \" → Escapes quotes inside strings 🔹 Triple quotes (""") → Handle multi-line strings and embedded quotes effortlessly #Python #CodingTips #EscapeCharacters #DevJourney #LinkedInLearning #CodeNewbie #100DaysOfCode #JehosaphatCodes #datascience #graduateschool
To view or add a comment, sign in
-
-
Python feels easy… until it doesn’t. You fly through the basics. And then suddenly: dunder methods, decorators, functools, typy annotations, protocols... boom 💥. Sound familiar? It took me a while before I actually started feeling comfortable writing Python code. Though I still have no love for "Callable[[arg1, arg2], return_value]" annotations 😬. In this week's video, I break down the exact steps I’d take if I had to learn Python fast from scratch, covering everything I wish I knew earlier. 👉 Watch here: https://lnkd.in/evzGVC_A #Python #SoftwareEngineering #LearningPython #CleanCode #ArjanCodes
To view or add a comment, sign in
-
-
Ever felt your Python code runs slow or gets messy? Chances are — you’re using the wrong data structure. This 10-second cheat sheet shows when to use Lists, Tuples, Sets, and Dictionaries 👇 Master this, and you’ll instantly write faster, cleaner, smarter code. #Python #DataScience #LearningEveryday #CodingTips #DataAnalytics #WomenInTech
To view or add a comment, sign in
-
-
Ever felt your Python code runs slow or gets messy? Chances are — you’re using the wrong data structure. This 10-second cheat sheet shows when to use Lists, Tuples, Sets, and Dictionaries 👇 Master this, and you’ll instantly write faster, cleaner, smarter code. #Python #DataScience #LearningEveryday #CodingTips #DataAnalytics #WomenInTech
To view or add a comment, sign in
-
-
Week 8 – List Comprehensions in Python 🐍 Clean, efficient, and readable — that’s the Pythonic way. List comprehensions turn lengthy loops into elegant one-liners. 💡 Before: squares = [] for i in range(5): squares.append(i**2) ⚡ After: squares = [i**2 for i in range(5)] ✅ Benefits: More readable and concise Faster execution Fewer lines, less clutter When you can think in list comprehensions, you’re no longer just writing Python — you’re thinking Python. #PythonHacks #CleanCode #DataStructures #LearnPython #CodingTips #PythonProgramming #Efficiency
To view or add a comment, sign in
-
Bad data doesn’t just break code, it breaks trust. Get "Practical Pydantic" to learn how to turn messy inputs into validated, production-ready data models. Because hoping your JSON is clean isn’t a strategy. 🔗 https://lnkd.in/eaASBPzP #Python #Pydantic #PracticalPydantic
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