Question: hello, i am new tho python and having a problem as follow. it is asking to strcon b and a and i did as follows:
hello,
i am new tho python and having a problem as follow. it is asking to strcon b and a and i did as follows:
def strcat_ba(a, b):
assert type(a) is str, f"Input argument `a` has `type(a)` is {type(a)} rather than `str`"
assert type(b) is str, f"Input argument `b` has `type(b)` is {type(b)} rather than `str`"
return ('b'+'a')
having the following problem
TypeError Traceback (most recent call last)input-90-6618c8ad9c30> in <module> 11 a = random_string(5) 12 b = random_string(3) ---> 13 c = strcat_ba(a, b) 14 print('strcat_ba("{}", "{}") == "{}"'.format(a, b, c)) 15 assert len(c) == len(a) + len(b), "`c` has the wrong length: {len(c)} rather than {len(a)+len(b)}" TypeError: 'str' object is not callable
any thought?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
