human
Write me a Python code for encoding a string as binary.
assistant
Here is a Python code for encoding a string as binary

import sys

def encode_string_as_binary(string):
    """
    Encodes a string as binary.
    """
    return "".join([str(ord(c)) for c in string])

# Enter the string
string = "hello"

# Calling the function
print((encode_string_as_binary(string)))

#Example Output
# 104101108108111

#Remember to inspect code for bugs.