ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] Evaluating a string expression
by Tim Golden other posts by this author
Nov 5 2009 5:25AM messages near this date
Re: [Tutor] Evaluating a string expression | Re: [Tutor] Evaluating a string expression
Mkhanyisi Madlavana wrote:
>  Hi Everyone,
>  
>  I would like to know how would I evaluate a string expression in python.
>  For example, if i say:
> >>> a = "3*2"
>  I want to do something to evaluate the variable 'a' to give me 6. How
>  can I do this?

I'm afraid that your question doesn't pass the basic "Have I Googled it?"
test. I stuck "evaluate a string expression in python" into Google and got:

http://www.google.co.uk/#q=evaluate+a+string+expression+in+python

Does any of that help?

TJG
_______________________________________________
Tutor maillist  -  Tutor@[...].org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Thread:
Mkhanyisi Madlavana
Modulok
Alan Gauld
Kent Johnson
Modulok
Tim Golden
Serdar Tumgoren
Serdar Tumgoren
Mkhanyisi Madlavana

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved