Language:
Source:
Result:
py3
Source:
class Face():
def __init__(self, pimples):
self.pimples = pimples
@property
def remove_pimples(self):
del self.pimples
return 'pimples removed.'
face = Face("pimples")
print(face.remove_pimples)
Result:
pimples removed.
Language:
Source:
Result:
py3
Source:
class Nice:
"""Nice.
Attribute:
nice (str, optional): Input. Default: "nice".
"""
def __init__(self, nice: str = "nice") -> None:
self.nice = nice
@property
def get(self) -> str:
"""str: Input or default."""
return self.nice
print(Nice().get)
Result:
nice
Language:
Source:
Result:
py3
Source:
a,x,y,z,j,k,b,m=1,5.5,0,2,3,5,4,0
while y<((a*a)/z+(a*z))*(x*z)*j+k:y+=a;
while m<(b*((a+a)*j*j-a)):m+=b;
print(''.join(map(chr,[y]+[m]*k*z)))
Result:
XDDDDDDDDDD
Language:
Source:
Result:
py3
Source:
class LonamiPity:
def __init__(s,b):s.b=b;
def withdraw(s,a):return'no w/d!';
def deposit(s,a):a=abs(a);s.b+=a;return 'deposited: '+str(a);
def balance(s):return'bal: '+str(s.b);
p=LonamiPity(20)
print('\n'.join([
p.withdraw(10),
p.deposit(25),
p.balance()]))
Result:
no w/d!
deposited: 25
bal: 45
Language:
Source:
Result:
py3
Source:
pizza = ['π']*8
eat=pizza.remove
while pizza:
for slice in pizza:
pizza_left=len(pizza)
print('{} {} left:\n{}\n'.format(pizza_left, 'slices' if pizza_left>1 else 'slice', ''.join(pizza)))
eat(slice)
Result:
8 slices left:
ππππππππ
7 slices left:
πππππππ
6 slices left:
ππππππ
5 slices left:
πππππ
4 slices left:
ππππ
3 slices left:
πππ
2 slices left:
ππ
1 slice left:
π
Language:
Source:
Result:
py3
Source:
from datetime import datetime as dt
print('go to bed' if dt.now().hour+1>22 else 'keep programmimg')
Result:
keep programmimg
Language:
Source:
Result:
py3
Source:
print('lonami'[bool(not 'This sentence is False')+bool(not 'This sentence is False'):((bool('This sentence is False')+bool('This sentence is False'))*(bool('This sentence is False')+bool('This sentence is False')))*(bool(not '')+bool(not ''))])
Result:
lonami
rang=range(129350,129380)
rang2=range(129400,129430)
join = chr(8205)
arr=[]
for i in rang:
for j in rang2:
arr.append('{}{}{}'.format(chr(i), join, chr(j)))
print(''.join(arr))
Language:
Source:
Result:
py3
Source:
X, Y, Z, V = 'ot groups', 'ot group', None, 'offtopic'
print('yo dawg, I herd you like {}, so I put an {} in your {} so you can {} while you {}'.format(X, X if not Y else Y, (X if not Y else Y) if not Z else Z, X if not V else V, X if not V else V))
Result:
yo dawg, I herd you like ot groups, so I put an ot group in your ot group so you can offtopic while you offtopic
Language:
Source:
Result:
py3
Source:
print(*(chr(i) for i in (103,111,32,116,111,32,98,101,100)),sep='')
Result:
go to bed
Language:
Source:
Result:
py3
Source:
import random as r
o=[['chair','lawnmower'],['balcony','bridge'],['lava','antimatter']]
print('you need a slap in the face, with a {}, off of a high {}, into a pool of {}'.format(*map(r.choice, o)))
Result:
you need a slap in the face, with a chair, off of a high balcony, into a pool of lava
Language:
Source:
Result:
py3
Source:
print('Flipping coin...', '*fwoop fwoop*', '*ding ching ching ing*', "it's {}".format(__import__('random').choice(['heads.','tails.'])), sep='\n')
Result:
Flipping coin...
*fwoop fwoop*
*ding ching ching ing*
it's heads.
Language:
Source:
Result:
py3
Source:
[print(i,'sheep π\n') for i in range(1,6)]
Result:
1 sheep π
2 sheep π
3 sheep π
4 sheep π
5 sheep π
Language:
Source:
Result:
py3
Source:
X, Y, Z, V = 'burgers', 'burger', None, 'burger'
print('yo dawg, I herd you like {}, so I put a {} in your {} so you can {} while you {}'.format(X, X if not Y else Y, (X if not Y else Y) if not Z else Z, X if not V else V, X if not V else V))
Result:
yo dawg, I herd you like burgers, so I put a burger in your burger so you can burger while you burger
Language:
Source:
Result:
py3
Source:
q,r,L=abs,print,' β'
class LonamiPity:
def __init__(s,b):s.b=b;
def withdraw(s,a):return'No withdrawals!';
def deposit(s,a):a=q(a);s.b+=a;return'Deposited:'+L,a;
def bal(s):return'Balance:'+L,s.b;
p=LonamiPity(20);r(p.withdraw(10));r(*p.deposit(25));r(*p.bal());
Result:
No withdrawals!
Deposited: β 25
Balance: β 45
Language:
Source:
Result:
py3
Source:
q,r,L,N=abs,print,' β','\n'
class LonPity:
def __init__(s,b):s.b=b
def w(s,a):return'Cant withdraw',L,a,'!',N
def d(s,a):a=q(a);s.b+=a;return'Deposited:'+L,a,N
def c(s):return'Balance:'+L,s.b,N
p=LonPity(100);r(*(*p.c(),*p.w(40),*p.d(25),*p.c()),sep='')
Result:
Balance: β100
Cant withdraw β40!
Deposited: β25
Balance: β125