Can you create a Python program to return true if a given string is a valid IP address and false otherwise?
import re
def is_valid_ip(ip):
    regex_pattern = r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$"
    if re.match(regex_pattern, ip):
        return True
    else:
        return False