<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>PS: sorry for my silly example, i know that example could also be written f'cancel_{name}', which is awesome, thank you for that ! But for more complex strings I'm trying to avoid:</div><div><br></div><div>def foo():</div><div>    return textwrap.dedent(f'''</div><div>    some</div><div>    {more(complex)}</div><div>    {st.ri("ng")}<br></div><div>    ''').strip()</div><div><br></div><div>For some reason, I prefer:<div><br></div><div>def foo():</div><div>    return '\n'.join(['some', more(complex), st.ri('ng')])<div><br></div><div>But that would be even more readable (less nesting of statements):</div><div><br></div><div>def foo():</div><div>    return ['some', more(complex), st.ri('ng')].join('\n')</div><div><br></div><div>Hope this makes sense</div><div><br></div><div>Have a great day<br></div></div></div></div></div></div>