Answers for "pass variables in multiline string python"

1

assign multiline string to variable in python

a = """This is python progrmming
python is simple and easy to use"""
print(a)
Posted by: Guest on June-28-2021
0

python variables in multiline string

toname = "Peter"
toemail = "p@tr"
subject = "Hi"
content = f"""From: Fromname <fromemail>
    To: {toname} <{toemail}>
    MIME-Version: 1.0
    Content-type: text/html
    Subject: {subject}

    This is an e-mail message to be sent in HTML format

    <b>This is HTML message.</b>
    <h1>This is headline.</h1>
"""
Posted by: Guest on March-17-2021

Code answers related to "pass variables in multiline string python"

Python Answers by Framework

Browse Popular Code Answers by Language