Add a one-line docstring to any Python solution (5 min)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Open the solutions/python directory and pick a file whose main function has no docstring; the issue's two_sum example shows the placement. Read the function body only enough to write one accurate sentence, and do not touch the logic. Done means each file you changed gains exactly one docstring line directly under the def, with no other edits, followed by a pull request.
Written by the indexing model from the issue text.
Description
Most solution files have a function but no docstring. That makes it harder for others to understand what the function does at a glance. This issue is about adding exactly one line to help the next learner.
Time: ~5 minutes | Level: Complete beginner
What to do
- Pick any file in Python solutions where the main function has no docstring.
- Read the function and understand what it does.
- Add one short docstring immediately below the function definition describing its purpose.
- That's the whole change. No algorithm modifications needed.
Example:
Before:
def two_sum(nums, target):
...
After:
def two_sum(nums, target):
"""Return indices of two numbers that add up to target."""
...
Rules
- Add exactly one docstring to the function.
- Do not change the solution's code or logic.
- If you're unsure what the function does, don't guess.
- Open a Pull Request with your change.
You can claim as many files as you want, either in one PR or separate PRs.
Open for everyone
This issue is open for everyone: beginners, students, and experienced developers. You don't need to know how to solve algorithm problems. If you can read a function and describe what it does in one sentence, you can contribute.
How to contribute
- Fork this repo
- Clone your fork and create a new branch
- Make your change
- Commit, push, and open a Pull Request
New to open source? Start here before anything else:
Prefer video? Watch this: How to contribute on GitHub (YouTube)
If this repo helps you or you like where it is going, a star is a nice way to say thanks and helps other people find it. Entirely optional, and you do not need it to contribute.
- Dominant language
- Python
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Huerte/algo-solutions-python
-
5-minutes algorithm all-levels any-language beginner-friendly community documentation easy first-timers-only good first issue help wanted learning no-code-needed open-source python students
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Huerte/algo-solutions-python#399 ·
-
15-minutes 5-minutes algorithm any-language beginner-friendly c cpp csharp easy go good first issue hacktoberfest help wanted java javascript kotlin python rust swift typescript
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Huerte/algo-solutions-python#397 ·
-
15-minutes algorithm all-levels any-language beginner-friendly codewars good first issue hackerrank help wanted interview-prep leetcode open-source students
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Huerte/algo-solutions-python#379 ·
-
15-minutes 5-minutes algorithm any-language beginner-friendly c cpp csharp easy go good first issue hacktoberfest help wanted java javascript kotlin python rust swift typescript
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Huerte/algo-solutions-python#378 ·
-
30-minutes algorithm all-levels any-language codewars hackerrank help wanted interview-prep leetcode medium open-source refactor students
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Huerte/algo-solutions-python#377 ·
All issues in Huerte/algo-solutions-python
Similar issues
-
pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pydantic/pydantic-ai#14472 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
patrickballard/wheelgap#728 ·
-
bug good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
choras-org/simulation-backend#58 ·
Maintainers usually reply within 1 day
-
backend part-1-modeling testing
Difficulty 2/5 1-3 hours Newbie friendliness 62/100