[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: newbie question
From:       Steven D'Aprano <steve () pearwood ! info>
Date:       2016-03-24 13:53:50
Message-ID: 56f3f16f$0$1595$c3e8da3$5496439d () news ! astraweb ! com
[Download RAW message or body]

On Thu, 24 Mar 2016 09:49 pm, David Palao wrote:

> Hi,
> Use "eval":
> s = "(1, 2, 3, 4)"
> t = eval(s)

Don't use eval unless you absolutely, categorically, 100% trust the source
of the string.

Otherwise, you are letting the person who provided the string run any code
they like on your computer. You want malware? That's how you get malware.




-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic