For some reason most people here just troll. I created a more compact version of the original code.
hello_world = lambda _: ["Goodbye, World","Hello, World"][_]
0- hello_world = lambda _: ["Goodbye, World","Hello, World"][_]
import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) @test.describe("Example") def test_group(): @test.it("test case") def test_case(): test.assert_equals(hello_world(True), "Hello, World") test.assert_equals(hello_world(False), "Goodbye, World")
- import codewars_test as test
- # TODO Write tests
- import solution # or from solution import example
- # test.assert_equals(actual, expected, [optional] message)
- @test.describe("Example")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(1 + 1, 2)- test.assert_equals(hello_world(True), "Hello, World")
- test.assert_equals(hello_world(False), "Goodbye, World")