A collection of Python solutions for Codewars kata, organized by difficulty rank.
Each kata file usually includes:
- the task description
- the solution function
- small test data or a pytest test
- in some cases, a random data generator for broader testing
CodeWars-python/
+-- 7kyu/
| +-- disemvowel_trolls.py
| +-- sum_two_lowest.py
| +-- youre_a_square.py
+-- 8kyu/
| +-- even_or_odd.py
| +-- reversed_string.py
| +-- ...
+-- templates/
+-- random_list_of_lists_generator.py
+-- sentence_generator.py
+-- string_generator.py
Open any kata file and run it directly with Python, or run the test functions with pytest where tests are included.
python 8kyu/even_or_odd.py
pytestThe templates/ folder contains reusable helpers for generating random lists, strings, sentences, and similar test data while practicing kata.