Given a list of strings, write a Python program to calculate the maximum length of a string.
list_of_strings = ["dog", "cat", "elephant", "bird"]
max_length = 0

for string in list_of_strings:
    max_length = max(max_length, len(string))

print(max_length)