You are viewing a single comment's thread. Return to all comments →
You can check my one-line code:
print ("".join([str(num) for num in range(1,n+1)]))
-iterating each number in the range(1,n+1), turning it into a string object and connected using "".join string method.
Seems like cookies are disabled on this browser, please enable them to open this website
Print Function
You are viewing a single comment's thread. Return to all comments →
You can check my one-line code:
print ("".join([str(num) for num in range(1,n+1)]))
-iterating each number in the range(1,n+1), turning it into a string object and connected using "".join string method.