assign multiline string to variable in python

Do you want to know the information regarding “assign multiline string to variable in python”. If yes, you’re in the correct post.

assign multiline string to variable in python

a = """This is python progrmming
python is simple and easy to use"""
print(a)
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>
"""

Conclusion

I hope this post helps you to know about “assign multiline string to variable in python”. If you have any queries regarding this tutorial please let us know via the comment section. Share this article with your friends and family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment