Simplest Calculator on Python in ONE Line | Python Tips and Tricks

preview_player
Показать описание
How to make the simplest calculator with the eval function on Python. Python Tips and Tricks.
#python #shorts #programming #coding
Рекомендации по теме
Комментарии
Автор

Hey! I had to make this video, sry if you expect more advanced videos, i'll post it in the future. Pls follow me. Thanks for watching

Python
Автор

I really hate how EVAL is shown to beginners all the time when it is one of the worst options security wise. Honestly it should never be used in any code and is 99.99% of the time the wrong thing to do if used.

MakinBacon
Автор

You reminded me of my first "decently long functioning code" lol, i was a calculator, but get this, i can do *more* than just two numbers! (with the reduce function), i was so proud of it at that time lol

Goose____
Автор

Ah yes let show a evil function that expose mutilple thread to system to beginner and let see them suffer

hailuong
Автор

while is by default always True, no need to add it

curioSEOty
Автор

Simplest calculator?
Yes

Recommend?
Absolutely Not

Eval() evaluates any statement
Should have do a check before using eval

thepoorsultan