Given a list of integers as input, write a Python code snippet to find the largest number.
[9, 2, 6, 3, -5, 5, 7]
max_num = -float('inf')
for num in [9, 2, 6, 3, -5, 5, 7]:
    if num > max_num:
        max_num = num
print(max_num)