We have given an integer in this problem and we need to print the consecutive values in between zero and that integer without using the string methods.

HackerRank Print Function in python problem solution

HackerRank Print Function in python problem solution

# Enter your code here. Read input from STDIN. Print output to STDOUT
n = raw_input()
n = int(n.strip())
if n < 0:
    print ''
else:
    str1 = ''
    for i in range(n):
        str1 += str(i + 1)
    print str1

Problem solution in Python 3 programming.

n = int(input())
for i in range(n):
    print(i + 1, end="")