PYTHON CODING
- waclaw_koscielniak

- Jul 8
- 1 min read
def string_only(f):
def wrap(x): return f(x) if isinstance(x, str) else "Invalid"
return wrap
@string_only
def echo(s): return s + s
print(echo(5))
[Running] python3 -u "/Users/name/test/test47.py"
Invalid
[Done] exited with code=0 in 0.051 seconds



Try to solve the Python coding problem.