My Functional Programming Learning Journey
I recently completed a comprehensive workbook with 45 exercises to learn about lambda functions and functional programming in Python. I want to share my experience with fellow beginners who are on the same learning path.
What I Worked Through
This wasn't just about lambda functions - it was a deep dive into functional programming concepts in pure Python. The workbook covered:
📚 The 7 Main Topics:
- Lambda Functions - Anonymous functions with map, filter, and sorted
- Closures and Freezing Variables - The tricky late-binding trap and how to fix it
- Conditional/Ternary Expressions - Writing concise if-else logic in one line
- List Comprehensions - Single, nested, and filtered comprehensions
- Higher-Order Functions (HOF) - Functions as first-class citizens
- Mixed Advanced Exercises - Combining multiple concepts
- Scenario-Based Problems - Real-world application challenges
🎯 Difficulty Progression:
The exercises were organized into difficulty levels:
- Simple (S) - 16 exercises to build foundation
- Medium (M) - 15 exercises for intermediate practice
- Hard (H) - 14 challenging problems
- Paragraphic (P) - 10 scenario-based real-world applications
Total: 45 exercises with complete solutions and explanations!
New Concepts I Discovered
While working through these exercises, I discovered so much more than I expected! I won't list everything because part of the joy is discovering things yourself through curiosity.
What I will say is this: my curiosity led me to learn far beyond just the exercises. For example, I stumbled upon the walrus operator (:=) which was introduced in Python 3.8. It wasn't essential for the exercises, but because I was curious and kept asking "what else?" and "why does this work?", I ended up exploring it too!
If you approach these exercises with curiosity - constantly asking questions, experimenting with the code, and wondering "what if I try this?" - you'll discover so many concepts, operators, and patterns. The more curious you are, the more you'll learn beyond what's explicitly taught.
Each exercise taught me something new, but my curiosity taught me even more!
The Reality Check ⚠️
Here's the honest truth: After completing all 45 exercises, I'm still a beginner.
And you know what? That's completely okay!
Learning programming isn't about racing to become an expert overnight. These exercises gave me some understanding of functional programming and lambda syntax. I got something from working through them, but I'm not claiming it's anything big.
I learned about lambda functions and closures. I got exposure to some Python patterns. But I'm still a beginner learning the basics.
Why These Exercises Helped
What I gained from this workbook has high influence based on my curiosity, interest, and how I approached learning. The more engaged I was, the more I learned.
The workbook helped because:
- Progressive difficulty - Started simple and gradually increased complexity
- Complete solutions - Every exercise had detailed explanations
- Practical examples - Real-world scenarios, not just toy problems
- Concept combination - Later exercises mixed multiple concepts
- Tricky parts highlighted - Solutions pointed out common pitfalls
- Hands-on practice - 45 opportunities to write actual code
But honestly, how much it helped depended entirely on how curious I was and how much I engaged with the material beyond just completing exercises.
For Other Beginners
If you're just starting with Python and want to level up and learn more about functional programming skills, I've uploaded the complete workbook I used to this repository.
Repository Link: hejhdiss/lambda-pdf
This repository contains:
- lambda.pdf - Full workbook with all 45 exercises
- Complete solutions with detailed explanations
- Progressive difficulty from Simple to Hard
- Scenario-based real-world problems
- Coverage of advanced Python concepts
What to Expect
Structure:
- 45 total exercises organized by topic
- 3 difficulty levels (Simple, Medium, Hard) plus scenarios
- Solutions included with explanations of tricky parts
- New operators and patterns you probably haven't seen
Time Investment:
Note: This is estimated time for a beginner from scratch doing exercises with basics and also learning through the concepts.
- Each simple exercise: 5-15 minutes
- Medium exercises: 15-30 minutes
- Hard exercises: 30-60 minutes
- Scenario problems: 30-90 minutes
- Total estimated time: 20-30 hours of focused practice
For me personally, I completed it in approximately 6-10 hours total (I'm not great at tracking time accurately, so this is an approximate estimate). This wasn't continuous work - I spread it across 3-4 days, working during free time or when I felt motivated and focused, since I have many other commitments.
This total time includes preliminary preparation before starting the exercises. I spent time learning lambda theory using ChatGPT to understand the basics and other necessary concepts. I also learned additional concepts while working through the exercises themselves.
Important: Before jumping into this PDF, I recommend learning some basic lambda theory first. If you only know regular functions (def functions), you'll need to understand lambda syntax and how to write lambda functions, as this workbook assumes that foundational knowledge.
Your time will vary based on your pace and curiosity.
What You'll Learn:
- Learn about lambda functions
- Learn functional programming patterns
- Learn list and dictionary comprehensions
- Learn about closures
- Learn function composition
- Discover Python operators and techniques
How much you learn depends on your curiosity, interest, and how you approach the exercises.
My Advice After Completing It
- Start with Simple exercises - Don't jump to Hard ones
- Try before looking - Attempt each problem before checking solutions
- Type the code yourself - Don't just read the solutions
- Understand the "why" - Not just the "how"
- Experiment freely - Modify examples and see what breaks
- Take breaks - Some concepts need time to sink in
- Revisit difficult ones - Come back to exercises you struggled with
- Stay humble - Remember you're learning, not competing
- Keep a notebook - Write down patterns and tricks you discover
- Move sequentially - Exercises build on previous concepts
The Learning Curve
Here's how my progress felt:
- Exercises 1-10 (Simple): "This is making sense!"
- Exercises 11-20 (Medium starts): "Wait, this is getting complex..."
- Exercises 21-30 (Hard begins): "I need to slow down and think..."
- Exercises 31-40 (Mixed/Advanced): "Okay, this is challenging but doable!"
- Exercises 41-45 (Scenarios): "I can actually solve real problems now!"
The difficulty ramp is real, but it's manageable if you take your time.
The Bottom Line
Completing these 45 exercises doesn't make you an expert. It doesn't even make you intermediate. You'll still be a beginner, and that's the reality of learning programming.
What you gain from these exercises has high influence based on your curiosity, interest, and how you work through them. The more you engage and explore, the more you'll learn. How much you benefit depends entirely on how you approach learning.
Conclusion
If you're a beginner looking to understand lambda functions and functional programming in Python, I highly recommend checking out this workbook. Work through the 45 exercises at your own pace. Don't rush. Don't compare yourself to others.
This workbook will give you solid foundations in functional programming. And remember - after completing them, you'll still be a beginner, but you'll get so much from learning and completing these exercises. The knowledge and patterns you gain are valuable and will serve you well in your Python journey.
🤖 About This PDF & Getting Help
This PDF was generated using Gemini AI. If you get doubts or don't understand something while working through the exercises:
- Ask Gemini or ChatGPT with specific examples from the exercises
- Be curious! Ask "why does this work?" or "what happens if I change this?"
- Ask in different ways - if you don't get the answer you need, rephrase your question
- Request examples - ask for more examples to understand the concept deeper
- Don't stop at one answer - if something isn't clear, keep asking until it clicks
Important: I used the free versions of these AI services - I don't have paid versions. So you can learn using free resources too!
The more curious you are and the more questions you ask, the deeper your understanding will become. AI assistants like Gemini and ChatGPT are there to help you learn - use them! If you don't get what you want the first time, ask the same thing in different ways until the concept becomes clear.
Keep learning, keep coding, and embrace being a beginner. We all start somewhere, and every expert was once where you are now.
Repository: https://github.com/hejhdiss/lambda-pdf
PDF Link (Google Drive): https://drive.google.com/file/d/1Xo4S7Bk_7anM8jcvy5kEsaArhJ6zRhpg/view?usp=sharing
Content: 45 exercises | 7 topics | 3 difficulty levels | Complete solutions
Topics: Lambda Functions, Closures, Ternary Expressions, Comprehensions, HOF, Mixed Exercises, Scenarios
Status: Beginner-friendly | Pure Python | Detailed explanations included
Happy Learning! 🐍
P.S. - Don't skip the "tricky parts" in the solutions. Those explanations will help reduce confusion!
Note: This article was written with the help of Claude AI.
Top comments (0)