I am trying to convert a range to list.
nums = [] for x in range (9000, 9004): nums.append(x) print nums
output
[90
Since you are taking the print statement under the for loop, so just placed the print statement out of the loop.
nums = [] for x in range (9000, 9004): nums.append(x) print (nums)