user
Utilizing the given input, write a program that counts the number of characters in a string.
String = "This is a test string."

assistant
string_length = 0

for char in string:
    string_length += 1

print(string_length)