Print a List of Integers From 1 Through N as a String Without Spaces

Python

Prints a list of integers from 1 through n inclusive as a string without spaces.

 1|  n = 5
 2|  print(*range(1,n+1),sep="")
Did you find this snippet useful?

Sign up for free to to add this to your code library