-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprint_diff_ways.py
More file actions
45 lines (34 loc) · 774 Bytes
/
Copy pathprint_diff_ways.py
File metadata and controls
45 lines (34 loc) · 774 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
44
45
colors = ['red','blue']
print (colors)
a = (145, 678, 'Christy Rachel Philip', 456)
print (a)
a = 5; b=6; c=7;
print (a,b,c)
print ("This is a way to print directly")
def function_name():
"This is a way to print from function by calling function"
return
print(function_name.__doc__)
strings = "This is Python"
char = "C"
multiline_string = """This a
multiline string
with
more than one line code."""
unicode = u"\u00dcnic\u00f6de"
raw_str = r"raw \n string"
print(strings)
print(char)
print(multiline_string)
print(unicode)
print(raw_str)
x = 3 + 3.14j
print(x, x.imag, x.real)
binary = 0b101
print (binary)
octal = 0o101
print (octal)
hexadecimal = 0x101
print (hexadecimal)
a,b = 5,6
print ("this is another way of printing {} and {}".format (a,b))