Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'explicitly': 0.05; 'interpreter': 0.05; 'subject:Python': 0.06; 'friend.': 0.07; 'linux,': 0.07; 'result,': 0.07; 'subject:help': 0.08; 'string': 0.09; 'windows,': 0.09; 'cc:addr:python-list': 0.11; '"python"': 0.16; "'foobar'": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'idle.': 0.16; 'integers,': 0.16; 'wrote:': 0.18; 'command': 0.22; 'feb': 0.22; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'install': 0.23; 'lets': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'talked': 0.31; 'though.': 0.31; 'stuff': 0.32; 'fri,': 0.33; "i'd": 0.34; 'subject:with': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'idle': 0.36; 'right?': 0.36; 'done': 0.36; 'subject:?': 0.36; 'seconds': 0.37; 'turn': 0.37; 'awesome': 0.38; 'whatever': 0.38; 'pm,': 0.38; 'anything': 0.39; 'sure': 0.39; 'either': 0.39; 'called': 0.40; 'how': 0.40; "you'll": 0.62; 'talking': 0.65; 'minutes': 0.67; 'line,': 0.68; "'foo'": 0.84; 'about?': 0.84; 'do:': 0.91; 'you\xe2\x80\x99re': 0.91; 'to:none': 0.92; 'scott': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=Ajt1SQ+bcbmU4zPypvK3TismeIMvH6quPfGzk2GFPl0=; b=VoRRsPI9i2axPrxJGCaIGnqyqEKbVwG4dZXq31e1imcHrLL8HN39RjniG+Rz4UOPPp E4IPAgzgFK/udFl7Kytzj4VmSHXMW92vl81eoktlFv75O4C8JYotirPGT9yHS827bT7G etWXpTvkTr0/9rI1+/D6QU7xrqnuUy5t5emZLXFl89wPviKlKA5ArYcyTZhhoAlim6ci R/TU4Nbf1g10WEacgxDnQKHOGk5Zldoukc97o6MLbPGllGqq3R8aYwtUxx96dJNxDktj VjWolg2OurOdYAgl5LaKi515F0kKDcwxkNvaOKrEEMqSjWEb9MRUVz9UqGZL25CuAd7H HEmw== MIME-Version: 1.0 X-Received: by 10.66.129.133 with SMTP id nw5mr5213661pab.98.1391748355378; Thu, 06 Feb 2014 20:45:55 -0800 (PST) In-Reply-To: <504A0CAE-42E4-495E-96AA-C8A45559E139@cox.net> References: <504A0CAE-42E4-495E-96AA-C8A45559E139@cox.net> Date: Fri, 7 Feb 2014 15:45:55 +1100 Subject: Re: Python 2.7.6 help with white spaces? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391748358 news.xs4all.nl 2838 [2001:888:2000:d::a6]:42758 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65591 On Fri, Feb 7, 2014 at 3:09 PM, Scott W Dunning wrote: > Is this what you=E2=80=99re talking about? > > minutes =3D =E2=80=9C3=E2=80=9D > seconds =3D =E2=80=9C11=E2=80=9D > > print int(minutes), =E2=80=9D:" int(seconds) > > That=E2=80=99s what you mean by turning a string into an int right? Not = sure how to add strings together though. > Well, that's what I would have meant, if I'd talked about turning a string into an int :) Now, can you do the opposite? Turn an int into a string? It's done in very much the same way. Adding strings together is done in the same way as adding integers, lists, or anything else: >>> 'foo' + 'bar' 'foobar' And remember this, whatever else you do: The interactive interpreter is your friend. Keep it handy. On Windows, you'll find IDLE in your Start menu - it's awesome for this sort of thing. On Linux, you might need to explicitly install IDLE. Either way, you can also just type "python" at the command line, and you'll get something that lets you type stuff in and see the result, like I showed above; it's called a Read-Evaluate-Print Loop, or REPL. ChrisA