forked from easyawslearn/Python-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathString-example1.py
More file actions
43 lines (32 loc) · 783 Bytes
/
String-example1.py
File metadata and controls
43 lines (32 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Python String Variable Demostration
# Declaration
#String Declaration with single quote for single line display
x= ''
print (x)
#String Declaration with double quote for single line display
x= " "
print (x)
#String Declaration with multi line print with single quote
x = '''Hello
This is Python Multiline
demo
'''
print (x)
#String Declaration with multi line print with double quote
x = """Hello
This is Python Multiline
demo
"""
print (x)
#How print works
x= 'hello'
#variable will br printed
print (x)
#x as a string will be printted
print ('x')
#x as a string will be printted
print ("x")
#variable x will be printed in string conversation
print (str(x))
#repr() representation that has all information
print (repr(x))