Category Archives: Python

Write the command in multiple lines in Python

Assign a large value to a variable in Python

Example to show the assigned large value to a variable which comes in different lines in Python program.

Use “”” quote for assign value as it is in the same format:

v_query = """CREATE TABLE testtable ( 
             Id int(11) NOT NULL,
             Name varchar(250) NOT NULL,
             PRIMARY KEY (Id)) """

print(v_query)

Output:

CREATE TABLE testtable ( 
             Id int(11) NOT NULL,
             Name varchar(250) NOT NULL,
             PRIMARY KEY (Id))