Human: What is a good Python function to compare a string and integer. Assistant: 
Here is a Python function to compare a string and integer

import random

def compare_string_integer(string, integer):
    """Compare a string and integer."""
    if string == integer:
        return 0
    if string < integer:
        return -1
    return 1

# Enter the string
string = '123'

# Enter the integer
integer = '123'

# Calling the function
print((compare_string_integer(string, integer)))

#Example Output
# 0

#Remember to inspect code for bugs.