loading...

re: Daily Challenge #50 - Number Neighbor VIEW POST

FULL DISCUSSION
 

Python one-liner to the rescue again. (Horribly formatted this time tho)

f = lambda x: print(*[x[:len(x)-1]+str(int(x[len(x)-1])+1), x[:len(x)-1]+str(int(x[len(x)-1])-1)])

>>> f('555-555-5555')
555-555-5556 555-555-5554
code of conduct - report abuse