Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Operator overloading
banovski
Apr 20th, 2022
(
edited
)
1,008
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.24 KB
| None
|
0
0
raw
download
clone
embed
print
report
class
MyList:
def
__init__
(
self
,
list
)
:
self
.
list
=
list
def
__sub__
(
self
,
arg
)
:
self
.
list
.
remove
(
arg
)
return
self
.
list
myList
=
MyList
(
[
1
,
2
,
3
]
)
print
(
myList -
2
)
# результат -- [1, 3]
Add Comment
Please,
Sign In
to add comment
Public Pastes
Minecraft ComputerCraft Room Mining Program3
Lua | 5 min ago | 23.02 KB
Auth
C++ | 15 min ago | 0.02 KB
Untitled
Python | 27 min ago | 0.13 KB
⭐ get any gift card for FREE
JavaScript | 34 min ago | 0.05 KB
Untitled
C# | 34 min ago | 17.85 KB
Thing (Test)
Lua | 1 hour ago | 3.79 KB
GrueMitaine
Lua | 1 hour ago | 0.94 KB
⭐ giftcards for free
JavaScript | 1 hour ago | 0.05 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!