xxxxxxxxxx
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>
"""
xxxxxxxxxx
a = """This is python progrmming
python is simple and easy to use"""
print(a)
xxxxxxxxxx
#you can start a multiline string with either ''' or """
'''This is a
multiline
string.'''
"""It can be used as a
multiline comment
too."""
xxxxxxxxxx
#you can use """ or '''
multi_line_string = '''
This is a
multiline string'''
print(multi_line_string)
#or you can use "\n"
multi_line_string = "This is a\nmultiline string"
print(multi_line_string)
#or u can use package "textwrap" module
import textwrap
long_string = "This is a very long string that needs to be wrapped to fit a specific width"
wrapped_string = textwrap.fill(long_string, width=30)
print(wrapped_string)
#just choose one dont run this code all at once
xxxxxxxxxx
"""You can
use both
double quotes
"""
'''And
singel
quotes
'''
# in a normal string this will be displayed as
# And\nsingel\nquotes\n