The included code stub will read an integer,n , from STDIN.
Without using any string methods, try to print the following123..n:
Note that “…” represents the consecutive values in between.
Print the string 12345.
The first line contains an integer n.
Print the list of integers from 1 through n as a string, without spaces.
Sample Input 0
Sample Output 0
Print Function in Python – Hacker Rank Solution
from __future__ import print_function if __name__ == '__main__': n = int(raw_input()) # Print Function in Python - Hacker Rank Solution START for i in range(1,n+1): print(i,end=''); # Print Function in Python - Hacker Rank Solution END
Disclaimer: The above Problem (Print Function in Python ) is generated by Hackerrank but the Solution is Provided by Chase2Learn. This tutorial is only for Educational and Learning purposes. Authority if any of the queries regarding this post or website fill the following contact form thank you.