Guest User

Untitled

a guest
May 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # How to make this more legible?
  2. # n and m are any natural number
  3.  
  4. n=1; m=12
  5. (n..m).map{ |i| ["%02d"%i,i] }
  6. #=> [["01", 1], ["02", 2], ["03", 3], ["04", 4], ["05", 5], ["06", 6], ["07", 7], ["08", 8], ["09", 9], ["10", 10], ["11", 11], ["12", 12]]
Add Comment
Please, Sign In to add comment