human
remove non alphanumeric characters from string.
assistant
Here is a Python code to remove non-alphanumeric characters from string strings

import re

def _remove_non_alphanumeric(string):
    """
    Remove non alphanumeric characters from string.
    """
    return re.sub(r'[^a-zA-Z0-9]', '', string)

# Enter the string
string = "submarine"

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

#Example Output
# submarine

#Remember to inspect code for bugs.