20 May
2023
20 May
'23
7:02 p.m.
# this one is more complex # it might be easier to make it than to read it piece_1 = "elzzup eht devlos uoy" piece_2 = lambda str: str[::-1] def piece_3(*pieces): # go through each piece, and try calling it as a function, with the others # as its parameters for idx, piece in enumerate(pieces): try: return piece(*pieces[:idx], *pieces[idx+1:]) except: continue print(piece_3(piece_1, piece_2))