Answer:
Is the num.append supposed to be indented along with the print(num)?
If the code is supposed to be indented
then we will get an infinite output of:
1
2
3
4
1
2
3
4
...
The reason why we will get a infinite output in this case is because we a re repeatedly appending the elements that are in the array at the end mean while we are iterating which will cause the size of the array to grow which means it will constantly repeat 1 2 3 4 line by line.
If the code is not indented then we will get an error: IndentationError