cleanUpAnswers.py is a Python script designed to facilitate coding during programming tests in a single file. Once a coding task is completed (marked with the # done comment), the script automatically transfers the code to a new file.
To use cleanUpAnswers.py, follow these steps:
- Ensure Python is installed on your system.
- Clone the repository:
git clone https://github.com/deankiwi/CodeWars - Navigate to the script directory:
cd CodeWars - Install dependencies:
pip install -r requirements.txt - Run the script:
python cleanUpAnswers.py - Code in
liveCodingFile.py, add# doneto the last line, and save to move the code to a new file.
Example content of liveCodingFile.py:
# leetcode <--Website question is from, will play into folder
# square num <--This will be turned into file name
def solution(a):
return a**2
# my comment on answer - took me 5mins to solve
# doneAfter saving, liveCodingFile.py updates to:
# leetcode
# Name of questionA new file is created at /leetcode/square num.py:
def solution(a):
return a**2
# my comment on answer - took me 5mins to solve[ ] - work with other languages
