Maybe I'm missing something obvious but what about this:
def f():
s = """123456"""
return s
or simply this:
def f():
s = "123456"
return s
or even simpler:
def f():
return "123456"
If that doesn't answer your question, then please clarify what the question is about.