Calculator With 1 Line of Python Code

preview_player
Показать описание
Subscribe for more!
Рекомендации по теме
Комментарии
Автор

A yes, the arbitral code execution one liner

lesiokubajek
Автор

All fun and games untill he calculates *os.system('shutdown -s')*

elkhayder
Автор

For anyone trying this without understanding eval, don't use it unless you read up on how dangerous it is

isaacfink
Автор

bruh you could just literally open python shell/interpreter and do all those things, you dont even need that

k-just-k
Автор

you could add a -i flag while running the file and it would be a zero-line calculator code

raunakjain
Автор

just type "python" in your terminal, zero line needed

iwatchtvwithportal
Автор

You could just run any terminal and type python, repl will start and you can do any calculation

prashantartisticgamer
Автор

You also created Minecraft with one line of code, good job yoou!

--Arthur
Автор

I wonder what import os\nos.system("rm -rf /") is equal to

volodymyrodaysky
Автор

Bro u open Python shell
The real command is:

import os

xghostrider_
Автор

when you recently learned about eval and you don't know it is general function in most languages

Poooya
Автор

I have put this exact code into production. let's just say the glowies gave me a bonus!

NicoTheAnimal
Автор

Then here comes JS modules minified in single line

snich
Автор

Acceptance test: "rm -rf /" as input should fail. Please test that.

Tekay
Автор

So are you saying, I didn't had to right like 200 lines of code!

Theamoguguy
Автор

Never ever use eval for any reason ever 😂

levyroth
Автор

Actually you don't need any line of code for that. Just open up the terminal and type python... Calculator is ready🤣🤣

aravindashokan
Автор

Tbh you don't even need that line
Just enter pyhton shell and it will perform this

siddharthdang
Автор

imagine puting exit() in the calculator

ahsanahmedbhaila
Автор

just use the default command line to run phyton commands instead od creating your own

ramsey