Task using boolean types | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Task using boolean types

Let's say I have a string str that contains a logical formula. If i know the formula I just do print((True or False) and True) But if I have only a string that contains the formula like str = "(True or False) and True)" How to convert a string to a command, a boolean variable? bool() wont work, it is sth different.

22nd Sep 2017, 8:43 PM
Alex Snaidars
Alex Snaidars - avatar
1 Answer