Move History

Rooted by: Strings in Lists
Fork Selected
  • Code
    print_String=lambda l: str(l)[::-1]
    Test Cases
    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(print_String('abc'),'cba')
            test.assert_equals(print_String('-1'),'1-')
            test.assert_equals(print_String('abc'),'cba')
            test.assert_equals(print_String(-45),'54-')
  • Code
    • print_String=lambda:lst[::-1]
    • print_String=lambda l: str(l)[::-1]
    Test Cases
    • 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(print_String('abc'),'cba')
    • test.assert_equals(print_String('-1'),'1-')
    • test.assert_equals(print_String('abc'),'cba')
    • test.assert_equals(print_String(-45),'54-')