DEV Community

Discussion on: Daily Challenge #194 - Spread Number

Collapse
 
kzivic profile image
Kosta Zivic

Python, shortest approach

lambda  x: [i+1 for i in range(x)]
Collapse
 
rafaacioly profile image
Rafael Acioly

you could've use just range like this:

lambda x: range(1, x+1)