Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Sven R. Kunze" Newsgroups: comp.lang.python Subject: Re: newbie question Date: Thu, 24 Mar 2016 12:10:22 +0100 Lines: 8 Message-ID: References: <56f3c3eb$0$4546$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de dqSAhwqbt73gsJF6I3nBRAq+TM6DsGK3JtKiP+d1X9Lw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:question': 0.08; '(1,': 0.09; 'ast': 0.09; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'suppose': 0.22; 'import': 0.24; 'header:In- Reply-To:1': 0.24; 'received:10.0': 0.34; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; 'safety.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1458817823; bh=yLSg/K/JUePGwOkt8t0dMsaYyQpzabDZM55BiZnV5YA=; h=Subject:To:References:From:Date:In-Reply-To:From; b=oadQpZYgY8mSE3k/f4xcrmug3+JrosjF5etfLSDniFCY1o+lqMKmq1KI0Tw7jOD+w Bt7FlhDzTuoQ8wtMNuWdhRdQe0uaAwniFIHG5Mu8J/ZXO6KUpv1pZZB90y1++PYCVy uqoOPAJzdqqbLyWmxr7Gs+bJKF6Nop6zakYd2Jvc= In-Reply-To: X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 198 X-purgate-ID: 154282::1458817823-000009F3-06293B05/0/0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105601 On 24.03.2016 11:57, Matt Wheeler wrote: >>>> import ast >>>> s = "(1, 2, 3, 4)" >>>> t = ast.literal_eval(s) >>>> t > (1, 2, 3, 4) I suppose that's the better solution in terms of safety.