def plat(ch,n):return''if ~n else ' '*(n-1)+ ch+ch[::-1][1:]+'\n'+plat(ch+chr(ord(ch[-1])+1),n-1)
def plat(ch,n): '' if ~n else (print(' '*(n-1)+ ch+ch[::-1][1:]),plat(ch+chr(ord(ch[-1])+1),n-1))
def ck(a,r,k,now = 0,cur = 0): (now==k and print(r[:k])==None) or [ck(a,r[:now]+[a[i]]+r[now+1:],k,now+1,i+1) for i in range(cur,len(a)-k+now+1)]
print ('\n'.join([''.join(['pybbyp'[(x-y)%6] if (x*0.04)**2+((y*0.1) - ((x*0.04)**2)**(1/3))**2 < 1 else ' ' for x in range(-30,30,1) ]) for y in range(15,-15,-1)]))
f = lambda:defaultdict(f)
tree = defaultdict(tree)
为什么不对.
def fizz(n=1):n== 101 or (print([n,'fizz','buzz','fizzbuzz'][(n%5 == 0)*2+(n%3 == 0)]),fizz(n+1))
for x in range(1, 101): print("fizz"[x % 3 * 4:]+"buzz"[x % 5 * 4:] or x)
#method 1
def f(n):[ ([print('{}*{}={}'.format(x,y,x*y),end = ' ')for x in range(1,y+1)])for y in range(1,n+1)]
#method 2
def f1(n,k=1): k==n+1 or (print(' '.join('{}*{}={}'.format(x,k,x*k) for x in range(1,k+1))),f1(n,k+1))
for i in range(10**3):print(random.choice('|| __'), end='')
def rec_plot(x,y,width,height,n):
dx = width>>1
dy = height>>1
if n>1:
rec_plot(x,y,dx,dy,n-1)
rec_plot(x-(dx>>1),y+dy,dx,dy,n-1)
rec_plot(x+(dx>>1),y+dy,dx,dy,n-1)
else:
for _x,_y in zip(range(x,x-dx-1,-1),range(y,y+height+1,1)):
points[(_x,_y)] = '*'
for _x,_y in zip(range(x,x+dx+1),range(y,y+height+1,1)):
points[(_x,_y)] = '*'
for _x in range(x-dx,x+dx):
points[(_x,y+height)] = '*'
rec_plot(40,0,32,16,3)
for y in range(0,80):
for x in range(0,80):
print(points[(x,y)],end='')
print('')