your task is return a word where word have the most lenght, len word without numbers and another digit, only isalph() :-)
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(lenght_line(line='marry, ksnfgjji233jc, harry!@#'), 'ksnfgjji233jc,')
- 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(lenght_line(), 'ksnfgjji233jc,')- test.assert_equals(lenght_line(line='marry, ksnfgjji233jc, harry!@#'), 'ksnfgjji233jc,')
your task:
return a max lenght word in line, but return len word without another symbols
example:
- 'marry, ksnfgjji233jc, harry!@#':
ksnfgjji233jc, - len this word is 14, len word without another symbols = 10 (ksnfgjjijc)
should return: ksnfgjji233jc,
def lenght_line(line='marry, ksnfgjji233jc, harry!@#'):
return 'ksnfgjji233jc,'
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(lenght_line(), 'ksnfgjji233jc,')
return:
w - h - y
def why():
return 'w - h - y'
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(why(), 'w - h - y')