user
Task: Given this snippet of code, identify and fix the bug.
Input: ```python
nums = [4, 8, 9, 15]
for num in range(1, nums):
    print(num)
```
Output:
assistant
```python
nums = [4, 8, 9, 15]
for num in nums:
    print(num)
```