Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.008 X-Spam-Evidence: '*H*': 0.98; '*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; 'yeah,': 0.09; 'cc:addr :python-list': 0.11; '"python"': 0.16; "'foobar'": 0.16; 'idle.': 0.16; 'integers,': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'received:10.0.1': 0.19; 'command': 0.22; 'feb': 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; 'chris': 0.29; 'url:mailman': 0.30; 'getting': 0.31; '>>>>': 0.31; 'talked': 0.31; 'though.': 0.31; 'you\x92re': 0.31; 'this.': 0.32; 'stuff': 0.32; 'url:python': 0.33; 'fri,': 0.33; "i'd": 0.34; 'subject:with': 0.35; 'something': 0.35; 'add': 0.35; 'really': 0.36; 'idle': 0.36; 'right?': 0.36; 'done': 0.36; 'url:listinfo': 0.36; 'subject:?': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'behind': 0.37; 'changing': 0.37; 'error.': 0.37; 'seconds': 0.37; 'turn': 0.37; 'received:10': 0.37; 'clear': 0.37; 'awesome': 0.38; 'whatever': 0.38; 'pm,': 0.38; 'anything': 0.39; 'sure': 0.39; 'either': 0.39; 'called': 0.40; 'url:mail': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'new': 0.61; "you'll": 0.62; 'header:Message-Id:1': 0.63; 'talking': 0.65; 'to:addr:gmail.com': 0.65; 'charset:windows-1252': 0.65; 'minutes': 0.67; 'line,': 0.68; "'foo'": 0.84; '2014,': 0.84; '9:45': 0.84; 'about?': 0.84; 'do:': 0.91; 'reasoning': 0.91; 'scott': 0.93 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020207.52F468A5.010C,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=H/cFNZki c=1 sm=1 a=MB85R812cvcrhCHz/P2OVA==:17 a=EcIEWpwOQlAA:10 a=G8Uczd0VNMoA:10 a=N659UExz7-8A:10 a=kviXuzpPAAAA:8 a=ONB2eeuiHFIA:10 a=pGLkceISAAAA:8 a=8AHkEIZyAAAA:8 a=F0BMCSncSiNryBONhwQA:9 a=pILNOxqGKmIA:10 a=MSl-tDqOz04A:10 a=4vB-4DCPJfMA:10 a=MB85R812cvcrhCHz/P2OVA==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (PLAIN) smtp.auth=swdunning@cox.net Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Python 2.7.6 help with white spaces? From: Scott W Dunning In-Reply-To: Date: Thu, 6 Feb 2014 22:01:23 -0700 Content-Transfer-Encoding: quoted-printable References: <504A0CAE-42E4-495E-96AA-C8A45559E139@cox.net> To: Chris Angelico X-Mailer: Apple Mail (2.1827) Cc: "python-list@python.org" 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: 54 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391749294 news.xs4all.nl 2839 [2001:888:2000:d::a6]:48851 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65593 Oops, thought you said turning a str into an int. Yeah, I=92m actually = using Idle on a mac. I keep trying differnt things but, I=92m just very = new to this. =20 Is this what you=92re talking about? minutes=3D3 seconds=3D11 print str(minutes) + =91:=92 + str(seconds) Unfortunately I keep getting an error. Also, not really clear on the = reasoning behind changing the int to a string? =20 On Feb 6, 2014, at 9:45 PM, Chris Angelico wrote: > On Fri, Feb 7, 2014 at 3:09 PM, Scott W Dunning = wrote: >> Is this what you=92re talking about? >>=20 >> minutes =3D =933=94 >> seconds =3D =9311=94 >>=20 >> print int(minutes), =94:" int(seconds) >>=20 >> That=92s what you mean by turning a string into an int right? Not = sure how to add strings together though. >>=20 >=20 > 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. >=20 > Adding strings together is done in the same way as adding integers, > lists, or anything else: >=20 >>>> 'foo' + 'bar' > 'foobar' >=20 > 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. >=20 > ChrisA > --=20 > https://mail.python.org/mailman/listinfo/python-list