Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Operator overloading
banovski
Apr 20th, 2022
(
edited
)
1,035
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
Binance account CW
JavaScript | 8 min ago | 0.05 KB
Order.js
JavaScript | 12 min ago | 1.18 KB
Random Gmail Acc 1A
JavaScript | 24 min ago | 0.05 KB
Market.js
JavaScript | 28 min ago | 1.18 KB
Untitled
C | 37 min ago | 0.54 KB
Make $1000 15-MINUTES (BEGINNER) WM
JavaScript | 40 min ago | 0.05 KB
Untitled
JavaScript | 44 min ago | 1.18 KB
Untitled
C# | 46 min ago | 14.89 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!