We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Introduction
- Print Function
- Discussions
Print Function
Print Function
Sort by
recency
|
3564 Discussions
|
Please Login in order to post a comment
for i in range(1,n+1): print(i,end="")
if name == 'main': n = int(input()) for n in range (1,n+1): print (n,end="")
if name == 'main': n = int(input()) for i in range(1,n+1): print(i,end="")
****Simple version
if name == 'main':
wrap a list aroun range and print using the join function to ensure the string outputs as one