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.
I never understand why people are obsessed with one liners or short answers. Beginners should strive to write understanble code, that makes sense in your mind. I'll leave link here List Comprehensions but a solution with a for loop is only two lines:
foriinrange(1,n+1):print(i,end="")
Cookie support is required to access HackerRank
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 →
I never understand why people are obsessed with one liners or short answers. Beginners should strive to write understanble code, that makes sense in your mind. I'll leave link here List Comprehensions but a solution with a for loop is only two lines: