SNIPPET
1 Upvote

Printing a List of Integers as a String Without Spaces

Python
General Python

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

n = 5
print(*range(1,n+1),sep="")

By detro - Last Updated Oct. 25, 2021, 10:22 p.m.

COMMENTS
RELATED SNIPPETS
Python For Else Loop
Python
General Python

Loop

2
1
Search Snippets by Tag: