defsum_(first:int,second:int)->int:first_mapped=str(first)second_mapped=str(second)# Fill the smallest list with '0' on left
iflen(first_mapped)>len(second_mapped):second_mapped=second_mapped.zfill(len(first_mapped))eliflen(second_mapped)>len(first_mapped):first_mapped=first_mapped.zfill(len(second_mapped))result=''forx,yinzip(first_mapped,second_mapped):result+=str(int(x)+int(y))returnint(result)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Python 🐍
Not the solution i like but it does the job.