Generate a Python program to search for a substring within a string.
text = "This is a sample string." 
substring = "sample"
def search_substring(text, substring):
    if substring in text:
        return True
    else:
        return False

result = search_substring(text, substring)
print(result)