Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Operator overloading
banovski
Apr 20th, 2022
(
edited
)
944
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
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🎁
GetText | 2 min ago | 0.36 KB
xxxx
Perl | 3 min ago | 0.11 KB
daxrw
HTML | 3 min ago | 0.11 KB
s
Basic4GL | 4 min ago | 0.06 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 40 min ago | 0.39 KB
Installing Process Nederlands
JSON | 54 min ago | 0.25 KB
ДЗ Работа с классами
C# | 60 min ago | 0.35 KB
💸G2A.com Free Gift Card Guide May 2024🔥
GetText | 1 hour ago | 0.35 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!