Check logical value inside a string in python : <p>I mean I have this string var:</p>

<pre><code>mystr1 = "1==1 or 1==2"
mystr2 = "1==1 and 1==2"
if_logical_string(mystr1) must be True
if_logical_string(mystr2) must be False
</code></pre>

<p>How can I achieve this? Is there any lib to do so ?
Thanks.</p>
