0% found this document useful (0 votes)
2 views2 pages

Escape Multiline Programs

The document contains Python code snippets demonstrating string manipulation, escape sequences, variable swapping, and tuple assignment. It includes examples of printing strings with newline and tab characters, as well as the use of multi-line strings. Additionally, it shows how to unpack values from a tuple and print formatted output.

Uploaded by

finetech2014
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Escape Multiline Programs

The document contains Python code snippets demonstrating string manipulation, escape sequences, variable swapping, and tuple assignment. It includes examples of printing strings with newline and tab characters, as well as the use of multi-line strings. Additionally, it shows how to unpack values from a tuple and print formatted output.

Uploaded by

finetech2014
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

a="hello\nnethu"
b="hello\nethu"
print(len(a))
print(len(b))

2.

data="hihello"
data1="hi\hello"
data2="""hi\
hello"””
data3="""hi
hello"""

print(data)
print(data1)
print(data2)
print(data3)

3.
print("sample\nescapesequence")
print(len("hello\\thamizh"))

4.
a=3
b=4
a,b=b,a+4
print(a,b)

5.
b=1,2
a=4
print("the values of a and b\n",a,"\t",b)

You might also like