-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb4.py
More file actions
75 lines (45 loc) · 1006 Bytes
/
b4.py
File metadata and controls
75 lines (45 loc) · 1006 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# boolean valuez always gives true or false
# print(10 > 9)
# print(10 == 9)
# print(10 < 9)
# bool(_) function can evaluate any value
# print(bool("hello"))
# print(bool(7))
# print(bool(0))
# these are mostly true until they are nil , empty , or 0 .
# class myclass:
# def __len__(self):
# return 0
# obj = myclass
# print(bool(obj))
# def fun():
# return True
# print(fun())
# x = 20
# print(isinstance(x,int))
# print(5> 3)
# print(bool("abc"))
# print(bool(0))
# operators are uaed to perform operations on values and variables.
# print(2**3) #exponention operator
# print(3//2)
# x = 5
# x &= 3
# print( x)
# print(x:=3)
# x |= 4
# print(x)
# x += 3
# print(x)
# list is used to store multiple items in a single variables
# list are changeable , ordered , allow duplicate value .
# l = ["rahul" , 49 , " yadav"]
# print(l)
# print(len(l))
# print(type(l))
# x = ["rao"]
# l.extend(x)
# print(l)
# def multiply(a,b=2):
# return a*b
# print(multiply(5))