This problem reinforces important concepts: The * operator unpacks sequences. print(*[1,2,3]) is like print(1, 2, 3). This works with range, lists, and other iterables.
The sep parameter controls spacing. Default is space, but empty string removes all gaps.
range(1, n+1) gives to n inclusive. You add to the stop because range excludes its endpoint.
int(input()) is a common pattern. Input returns a string, int() converts it to a number. These patterns appear constantly in Python programming.