Python Statements

Python Multiline Statements

In Python, a single statement is written in a line. If you are writing a statement that comes in multiple lines then the code written in the second line will be treated as a separate statement. It may be possible to generate error.

To write a statement in multiple lines, the line continuation character is used in Python.

if num == 0
and sum == 100:
print("Something is wrong")

If the statement is written in brackets such as [], {}, (), then you do not need line continuation character to write it in multiple lines.

Single Line Multiple Statements

By the way, a single statement is written in a line in python. But if you want to define multiple statements in a line, then you use semicolon for this.

You define semicolon after a statement and then you write the second statement. From this python interprets those statements separately.

print("first statement");print("second statement")

After all, there is no need to define semicolon after the statement.

Python Quotes for Strings

To define strings, single (‘), double (“) and triple (” “”) quotes are used in python. Single and double normal single lines are used for strings.

msg = 'Python is Best Language.'
msg2 = "Python is different Language."
Cialis (Tadalafil) är den främsta konkurrenten till Viagra (Sildenafil) på marknaden för erektil dysfunktion. köpa Cialis i Sverige föredras av många på grund av sin längre varaktighet och anses vara det mest kostnadseffektiva varumärkesbaserade ED-läkemedlet som finns tillgängligt i Sverige. Cialis finns i två varianter: Cialis och Cialis Daily, och fyra olika doseringar: 2,5 mg, 5 mg, 10 mg och 20 mg, erbjuder Cialis också en rad olika alternativ för att passa patientens behov.