This repository was archived by the owner on Aug 12, 2019. It is now read-only.
Repository files navigation
description
name of method
usage
example
negation
(__neg__)
-self
-a , -1
description
name of method
usage
example
not
(__not__)
not self
not True
description
name of method
usage
example
add
(__add__)
self + other
1 + 21 , "hello" + "world"
sub
(__sub__)
self - other
1 - 21 , {1, 2, 3, 4} - {1, 2}
div
(__div__)
self / other
1 / 21 , 102.1 / 2
mul
(__mul__)
self * other
1 * 21 , "ATCGC" * 10
mod
(__mod__)
self % other
100 % 2 , "Hello %s" % ("Jack")
floordiv
(__floordiv__)
self // other
1 // 21
pow
(__pow__)
self ** other
2 ** 10
description
name of method
usage
example
eq
(__eq__)
self == other
1 == 21, (1, 2) == (1, 2)
ne
(__ne__)
self != other
1 != 21
gt
(__gt__)
self > other
1 > 21
ge
(__ge__)
self >= other
1 >= 21
lt
(__lt__)
self < other
100 < 2
le
(__le__)
self <= other
1 <= 21
description
name of method
usage
example
and
(__and__)
self and other
True and True
or
(__or__)
self or other
True or False
is
self is other
a is b
is not
self is not other
a is not b
in
(__in__)
self in other
1 in [1, 2, 3, 4]
builtin types (cast type):
int(), float(), complex(), str(), bool(), NoneType()
list(), tuple(), dict(), set()
range()
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.