<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def literals(choices, prefix="", suffix=""):
 """Create a regex from a space-separated list of literal `choices`. If provided, `prefix` and `suffix` will be attached to each choice individually. """

    return "|".join(prefix + re.escape(c) + suffix for c in choices.split())