human
Can you show me a Python code to compare string is similar to another one.
assistant
Here is a Python code to compare string is similar to another one

import sys

def compare_string(s1, s2):
    """Compare two strings.

    Returns -1 if s1 < s2, 0 if s1 == s2, 1 if s1 > s2.
    """
    if len(s1)!= len(s2):
        return -1
    for i in range(len(s1)):
        if s1[i] < s2[i]:
            return -1
        elif s1[i] > s2[i]:
            return 1
    return 0

# Enter the string
s1 ="purple skateboard"
s2 ="red airplane"

# Calling the function
print((compare_string(s1, s2)))

#Example Output
# -1

#Remember to inspect code for bugs.