I'm coding a simple for loop to print out all the numbers of a user inputted n using this code:
if __name__ == '__main__':
    n = int(input())
    for i in range (1,n):
        print(i, end=" ") 
I expected a result like:
Input:
5
Output:
1 2 3 4 5 
but instead, I am getting this output:
1 2 3 4
 
    