List of possible birth years of living humans
Pyke, 6 bytes
wC7m-
Try it here!
w - 121
m- - for i in range(^):
C7 - current_year-i
(After w
, the codepoint for 153 is present but it isn't printable)
Pyth, 11 9 8 bytes
-L.d3C\y
Works by mapping over the range [0...120]
and subtracting every number from the current year. The range is built implicitly by using 121
as the map argument. To avoid a separating whitespace between .d3
and 121
we get this number by converting y
to it's codepoint.
Thanks to @FryAmTheEggman for coming up with this approach!
Try it here!
Old 9-byte solution:
_>121S.d3
Try it here!
Builds the range [1...<current year>]
and only takes the last 121 elements of it.
R, 34 bytes
(format(Sys.Date(),"%Y"):0)[1:121]
See here on an online interpreter.
Edit Could be reduced to 33 bytes by using substr
.
(substr(Sys.Date(),1,4):0)[1:121]
but technically this solution will only work until the 9999-12-31.