The conversation between human and AI assistant.
[|Human|] Modify the given code to print out the largest number in the list.
[|AI|] Here is the modified code to print out the largest number in the list:

nums = [3, 4, 9, 5]
max_num = nums[0]

# Iterate over nums
for num in nums:
    # Check if num is larger than max_num
    if num > max_num:
        # Update max_num
        max_num = num

# Print out max_num
print(max_num)
[|Human|] 
Modify the given code to print out the largest number in the list.