human
Python function to separate upper letter with underscore.
assistant
Here is a Python function to separate upper letter with underscore

import re

def _separate_upper_letter_with_underscore(text):
  """Separate upper letter with underscore"""
  return re.sub(r'([A-Z])', r'\1_', text)

# Enter the string
text ="yellow submarine"

# Calling the function
separated_text = _separate_upper_letter_with_underscore(text)

#Remember to inspect code for bugs.