The most complicated "hello world" program in a single line
MarcusWeinberger (178)

How it was made

First, I went through all the characters in "hello world" and used ord to find their numerical values. Using the argcount of a bunch of lambdas, I got a list of numbers 1 through 7. Using that list, I simply did some maths to get the numbers and printed them as ascii using chr.

I wrapped this in a couple lambdas using globals().update to set variables inline (repl.it recently updated to python 3.8 so I could have used the := operator however it appears not to work in list comprehension) and bam.

(ignore the syntax errors, it still runs)

You are viewing a single comment. View All
sugarfi (243)

1810 bytes just to print "hello":

x=list(str(sum([*map(lambda x:sum([*map(int,(bin(ord(x))[2:]))]),'hello world!')])*(1<<1|1)));y=x[9//2//(9//2)];x[654**0<<1]=x[3>>1];x[(10^1)&1]=eval(chr(ord('Y')+(2<<4)),locals());x=__import__('htam'[::~0]).sqrt(int('abc'[:8*(2>>3)].join(x)));x=int(x//4*(2<<2>>1))+[~~(1&1&1&1&1&1&1)][0];x*=len(hex(3735928559)[[*[2<<1>>1]][0]:]);print(chr(x),file=getattr(__import__(chr(ord('S')+(2<<4))+'y'+chr(ord('t')-1)),'stdout'),end='');x=str(6+(2&3^2&3))+[*map(str,[*[int(str(6))+(6//2)]])][0];y=int((int(x)|[*[4*((34^34)|1<<3)]][0]));i=sum([*[*[*[y if ~((int(x)*c)>y) else 0 for c in range(5^5,int(str(10)*2,base=2<<1>>1),5%2)]]]]);i=int(str(i)[:~0]);z=getattr(__import__(chr(int('12'[:5&abs(~0)]*(1<<1|1)))+chr(i+(1<<2|1<<1|1)+int(hex(7)[2:],base=16))),'sys');getattr(z,'stdo'+chr(10**(1<<1)+(8*9-(7*9)+8))+chr(10**(1<<1)+(8*9-(7*9)+7))).write.__call__(chr(i));d={'ba'+[*[chr(ord('S')+(2<<4))]][0]+chr(int(bin(5)[2:])):2};x=ord(getattr(__builtins__,'ch'+chr(ord('R')+[*[2<<4]][0])).__call__(ord('0')+(2<<(int(str(ord('e')),**d))-(2<<1))));x=eval(compile('x','','eval'),globals())*(eval(type(5).__name__)(chr(eval(compile('x','','eval'),globals()))));x=int(x-(round.__call__(x//((7>>1)&2),-1)));a={'end':'end'[:2-(~~2)]};print(chr(x)*2,**{**a,**{'file':getattr(__import__(chr(ord('S')+((2<<5)//2))+chr(ord('n')+int(str(10)*2,base=2)+5%2)+chr(ord('S')+((2<<5)//2))),'_'*2+'stdo'+'u'+chr(ord('n')-ord('n')+ord('t'))+'_'*2)}});x=str(ord.__call__(chr(ord('0')+(2<<(int(str(ord('e')),base=2)%2+eval('~'*5+chr(48))))))*(1<<(5&(1<<0))));x=eval('__builtins__.__dict__')['chr'].__call__(int(x)+int(x[:[*[(5&1&1&1)+1]][0]])+int(x[:[*[1]][0]]));d={};print(x,file=getattr(eval('s',d) if not exec('import '+ord('y').__getattribute__('__repr__').__call__().replace('1','s').replace('2','y')+';s=sys',d) else None,'stdout'),end='');

Try it online!