(_ := open("\\", "w")).write("hellohell\n");_.close();__import__("sys").stdin = open("\\", "r")
class HelloWorld:def __init__(self, param=''):self.param = paramdef message(self):return f'Hello, {self.param.title()}!' if self.param else 'Hello, World!'- (_ := open("\\", "w")).write("hellohell\n");_.close();__import__("sys").stdin = open("\\", "r")
import codewars_test as test __import__("solution") @test.describe("Example") def test_group(): @test.it("test case") def test_case(): test.assert_equals(input(), 'hellohell')
- import codewars_test as test
from solution import HelloWorld- __import__("solution")
- @test.describe("Example")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(HelloWorld('seraph').message(), 'Hello, Seraph!' )test.assert_equals(HelloWorld().message(), 'Hello, World!' )- test.assert_equals(input(), 'hellohell')
def Disemvowel(_): l = (lambda: "".join(filter(lambda _: not (_.lower() in "aoeiu"), _))) l.scalpel = l return l
import reclass Disemvowel:def __init__(self, s):self.s = sdef scalpel(self):return re.sub(r'[AEIOU]', '', self.s, flags=re.IGNORECASE)- def Disemvowel(_):
- l = (lambda: "".join(filter(lambda _: not (_.lower() in "aoeiu"), _)))
- l.scalpel = l
- return l