Welcome to my journey of solving 3000 Python problems!
Currently: 200+ problems solved 🎉 and counting daily.
This repo is organized to help anyone learning Python, preparing for coding interviews, or practicing problem-solving skills.
- 📂 Structure
- 📌 Progress Tracker
- 🎯 Goal
- 🔥 Features
- 📊 Goals Updates
- 💻 Sample Problem
- 🤝 Contributing
- ⭐ Support
- Simple → Basic syntax, logic, loops, functions, OOP
- Topic-specific → Strings, Lists, Control Flow, etc.
Each folder contains:
Questions.md→ problem listSolutions.md→ Python solutions with explanations
Here’s my current progress (click links to view):
To build a public learning resource for programmers to practice Python and prepare for:
- 💡 Coding interviews
- 📘 Problem-solving skill building
- 🏆 Competitive programming
- 200+ Python problems (growing daily)
- Well-structured by topics
- Detailed explanations for each solution
- Beginner → Advanced difficulty
Here’s a taste of what you’ll find inside 👇
Problem: Reverse a string in Python.
# Solution: Reverse a string
def reverse_string(s: str) -> str:
return s[::-1]
print(reverse_string("Python")) # Output: nohtyPProblem: Find all prime numbers up to n using the Sieve of Eratosthenes.
def sieve_of_eratosthenes(n: int) -> list[int]:
"""Return a list of prime numbers up to n."""
if n < 2:
return []
primes = [True] * (n + 1)
primes[0] = primes[1] = False
for i in range(2, int(n**0.5) + 1):
if primes[i]:
for j in range(i*i, n + 1, i):
primes[j] = False
return [i for i, prime in enumerate(primes) if prime]
# Example usage
print(sieve_of_eratosthenes(50))
# Output: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]