25 lines
555 B
Markdown
25 lines
555 B
Markdown
## under construction
|
|
|
|
### Like LeetCode
|
|
|
|
but more lightweight
|
|
|
|
if you want to contribute write tests like this:
|
|
|
|
```python
|
|
import unittest
|
|
|
|
#<!-- The Function the User needs to write -->
|
|
def revstring(x):
|
|
return x[::-1]
|
|
|
|
#<!-- This Test, test if the function works -->
|
|
class TestSolution(unittest.TestCase):
|
|
def test_simple(self):
|
|
# !! This needs to be dynamic ; if the user enters some shit then it is supposed to work too
|
|
x="";
|
|
self.assertEqual(revstring(x), x[::-1])
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|
|
``` |