One line of code What can be done ?
Don't think that one line of code is too little , Nothing can be done , The world is never short of wisdom , What is missing is the ability to do things .
print('\n'.join([''.join([('autofelix520'[(x-y)%10]if((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3<=0 else' ')for x in range(-30,30)])for y in range(15,-15,-1)]))
felix5aut felix5aut utofelix5autofeli utofelix5autofeli autofelix5autofelix5autofelix5autofelix5a autofelix5autofelix5autofelix5autofelix5aut autofelix5autofelix5autofelix5autofelix5autof utofelix5autofelix5autofelix5autofelix5autofe tofelix5autofelix5autofelix5autofelix5autofel ofelix5autofelix5autofelix5autofelix5autofeli felix5autofelix5autofelix5autofelix5autofelix elix5autofelix5autofelix5autofelix5autofelix5 ix5autofelix5autofelix5autofelix5autofelix5 5autofelix5autofelix5autofelix5autofelix5 autofelix5autofelix5autofelix5autofelix5a ofelix5autofelix5autofelix5autofelix5 elix5autofelix5autofelix5autofelix5 ix5autofelix5autofelix5autofelix5 autofelix5autofelix5autofelix ofelix5autofelix5autofeli lix5autofelix5autofel autofelix5autof felix5aut x5a a
print('\n'.join([''.join(['*'if abs((lambda a:lambda z,c,n:a(a,z,c,n))(lambda s,z,c,n:z if n==0else s(s,z*z+c,c,n-1))(0,0.02*x+0.05j*y,40))<2 else' 'for x in range(-80,20)])for y in range(-20,20)]))
** *********** ************ ********* * * ************ * * ****** * *************************** * *************************************** ***** ******************************************* *** ******************************************** * ************************************************** ******************************************************* * * ***************************************************** **** ******* * ******************************************************* ***************** ******************************************************* *********************** ********************************************************* *********************** ******************************************************** **** ******************************************************************************** ********************************************************************************************* **** ******************************************************************************** *********************** ******************************************************** *********************** ********************************************************* ***************** ******************************************************* **** ******* * ******************************************************* * * ***************************************************** ******************************************************* ************************************************** *** ******************************************** * ******************************************* *************************************** ***** ****** * *************************** * * * ************ * * ********* ************ *********** **
print('\n'.join([' '.join(['%s*%s=%-2s' % (y, x, x*y) for y in range(1, x+1)]) for x in range(1, 10)]))
1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 2*5=10 3*5=15 4*5=20 5*5=25 1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 6*6=36 1*7=7 2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49 1*8=8 2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=64 1*9=9 2*9=18 3*9=27 4*9=36 5*9=45 6*9=54 7*9=63 8*9=72 9*9=81
qs = lambda xs : ( (len(xs) <= 1 and [xs]) or [ qs( [x for x in xs[1:] if x < xs[0]] ) + [xs[0]] + qs( [x for x in xs[1:] if x >= xs[0]] ) ] )[0] print(qs([1, 3, 2, 10, 8, 6]))
[1, 2, 3, 6, 8, 10]
import antigravity
print(''.join(__import__('random').choice('/\\') for i in range(50*24)))
/\\/\\\\/\/\//////\///\\\\\\\\/\/////\\\\\\\/\/\// \/\\/////\/\\//\\/\\\\\\///\//\\\/\//\/\/////\\/// \\/\\\/\///\\///\\\\/\\//\\\\//\\\/\//\\/\/\\//\\/ /\\\/\\\/\/\///\\/\////////\\\/\/\\\\\/\\//\\\\/// \\//\/\/\\///\\\\\\//////\\///\//\//\//\//\\\/\\\\ /\\//\/\//\////\\/\/\\/\\//\//\/////\////\/\/////// \//\\/\\//\\/\\/\//\/\/\\\\/\/\///\//////////////// /\/\///\//\//\/\\\////\\\/\////\/\/\//\\\/\\\\\\/// /////\//\\//\\\\\\/\//\\///\///\\\/\\\\/////\////\\ /\///\/////\/\/\/\///\//////\\\\/\///\\\\///\\\/\// \\\////\\\////\///\/\///\\/\\\//\/\/\\/\\/\//\//\\\ /\\/\///\\\\//\/////\\/\\\\/\/\\\\///\\//\//\/\///\ ///\\\/\\\\\//\//\\/\/////\\/\/\\//\\\//\\//\/\//\/ \\//\/\/\\/\////\\\//\\\\////\\//\/\\\/\\\/\\//\\\\ ///\/\\/\/\\//\//\\\/////////\\\/\///\///\\\/\\//// //\\///\\\///////\\\\/\\\\\//\/\////\\/\\//\\//\\/\ \\\\/\/\////////\\//\/\//////\/\/\\\\\\/\//\///\/\/ /\\\///\\\//\//////\\\\\//\\/\////\\\/\/\\\\/\/\//\ ///\//\\\\\//\//\/\\/\\\/\\\\\/\/////\\\\/\\/\\///\ \/\//\/\\\/\//\\//\//\\/\/\\/\/\//\//\\\\/\\\/\//\/ //\\////\///\/\\\\///\/\\\/\\/\\///\//\\/\///\////\
import this
The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!