Print Function | Hacker Rank Solution in Python
Problem:
The included code stub will read an integer, , from STDIN.
Without using any string methods, try to print the following:
Note that "" represents the consecutive values in between.
Example
Print the string .
Solution:
from __future__ import print_function
if __name__ == '__main__':
n = int(raw_input())
i=1
print(*range(1,n+1),sep="")
Comments
Post a Comment