We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Built-Ins
- Python Evaluation
- Discussions
Python Evaluation
Python Evaluation
Sort by
recency
|
226 Discussions
|
Please Login in order to post a comment
string=list(input().split('print')) print(eval(string[1]))
how to setup an exploit 101...
**The input is a python code to print the result of the expression. Pass it to the eval() method it will convert it into a code and print it. So, the answer is eval(var) where the sample var is equal to print(2+3). The eval is so powerful that it took the print word as keyword not the string. CODE: eval(var)
c = eval(input()) if c is not None: print(c)