For Python,
def fun1(name, ext):
if ext == '' :
fname = name + '$'
else:
fname = name + ext
return fname
I have to make fun2 as short as possible with less than 25 characters that work exactly the same as fun1.
So far, I made
def fun2(name, ext):
if ext == '':
ext = '$'
return name + ext
but it still exceeds 25 characters. Is there any possible way to accomplish this without any external tools or extensions?