loading...

re: Daily Challenge #50 - Number Neighbor VIEW POST

FULL DISCUSSION
 

python

def number(n):
    if len(n.replace('-','')) >= 1 and len(n.replace('-','')) <= 10:
        print(*[n[:len(n)-1]+str(int(n[-1])+1), n[:len(n)-1]+str(int(n[-1])-1)])
    else:
        print('Error')
code of conduct - report abuse