• JavaScriptPHPHTMLCssPythonWordPressWeb developmentLinuxMySQLAndroid
    WindowsJavaC++ / C#LayoutReactUbuntuYiiDjangoProgramming1C-Bitrix
    LaravelSystem administrationTelegramJSONDebianPostgreSQLIOSGoogleHtaccessWindows Server
    GitMacOSGoogle ChromeCMSWooСommerceBootstrapNginxSQLUnityAPI
  • Ask
  • Leaders

Categories

JavaScriptPHPHTMLCssPythonWordPressWeb developmentLinuxMySQLAndroidWindowsJavaC++ / C#LayoutReactUbuntuYiiDjangoProgramming1C-BitrixLaravelSystem administrationTelegramJSONDebianPostgreSQLIOSGoogleHtaccessWindows ServerGitMacOSGoogle ChromeCMSWooСommerceBootstrapNginxSQLUnityAPI
Programming
JavaScript PHP HTML Css Python WordPress Web development Linux MySQL Android Windows Java C++ / C# Layout React Ubuntu Yii Django Programming 1C-Bitrix Laravel System administration Telegram JSON Debian PostgreSQL IOS Google Htaccess Windows Server
Make a leaderReport
W
W
weranda2016-05-23 10:48:56
Python
weranda, 2016-05-23 10:48:56

How to calculate an expression in a string?

Greetings
Line:
a = '1+2-3*4/5+(10//3)'
How to calculate the result in the simplest way?

Reply
Answer the question

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Report
A
Alexander, 2016-05-23
@weranda

a = '1+2-3*4/5'
eval(a)

Similar questions
I
IronGun2020-04-22 19:40:52
Site parsing after js loading? 2Reply
A
Alexander2021-06-18 13:08:45
Everything is fine in Qt Designer, you start the shell through pycharm everything is crooked, why? 0Reply
D
DontQuantum2021-06-18 16:31:55
Telethon how to determine if it is a channel or a group and can I write in it? 1Reply
E
Ernest Vardanyan2020-04-23 00:50:39
Why does it give an error when parsing? 2Reply
J
Junior932021-06-18 18:56:53
Are there any differences between asynchronous and multi-threaded code in the context of Python? 3Reply

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question

banners