human
Can you show me a Python program to cut string by length.
assistant
Here is a Python program to cut string by length

import re

def cut_string(string, length):
    """Cut a string by length."""
    return string[:length]

# Enter the string
string = "hello world"

# Calling the function
print((cut_string(string, 5)))

#Example Output
# hello

#Remember to inspect code for bugs.