Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed1.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.039 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject:Python': 0.06; 'subject:help': 0.08; 'python:': 0.09; 'yeah,': 0.09; 'cc:addr :python-list': 0.11; "':'": 0.16; 'apostrophes': 0.16; 'fine.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'i\xe2\x80\x99m': 0.16; 'normally,': 0.16; 'skipping': 0.16; 'traceback.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'feb': 0.22; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'error': 0.23; 'cc:2**0': 0.24; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'getting': 0.31; 'ordinary': 0.31; 'this.': 0.32; 'figure': 0.32; 'know.': 0.32; 'another': 0.32; 'fri,': 0.33; 'problem': 0.35; 'subject:with': 0.35; 'problem.': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'idle': 0.36; 'subject:?': 0.36; 'behind': 0.37; 'changing': 0.37; 'error.': 0.37; 'seconds': 0.37; 'clear': 0.37; 'pm,': 0.38; 'skip:u 10': 0.60; 'new': 0.61; "you're": 0.61; "you'll": 0.62; 'talking': 0.65; 'here': 0.66; 'minutes': 0.67; 'it!': 0.67; 'useful.': 0.68; '"smart': 0.84; 'about?': 0.84; 'reasoning': 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=IBSZyU12lu0denERaGpp2ZImXq5OF1NkBcS1KNmpr68=; b=PW21GtpMzFy4yb743pXEpL88vuQHBjOp2PTMbqwJ05NH91zdKPF33JuNGsp8Lgwf4k +FurPUen2YEZxtEVJTpAu8JDchMyZWU4G2Fmxv4R3KKNBu1x0KCVpo21Ba82E7MIpUId 6vUcXFvhZLm12KyudbDG2rYHLAYwvrdDX0v45+CG78viof8tcq9sevek3LsSvnUUXQPh 3hNFfh/vnH4W/0xtt4g4Pv48bxji3Qh3AXDFkgM3pMpJJxTlQ7DXqWJyKF3CClayceTm LA8cD2/rPm9B1ASTsXLousb4ZfEcQcGWK+FFFf48Ump/FeWskqlTdTP5wJbUHf36OSss HJwA== MIME-Version: 1.0 X-Received: by 10.66.129.133 with SMTP id nw5mr5306721pab.98.1391749609069; Thu, 06 Feb 2014 21:06:49 -0800 (PST) In-Reply-To: References: <504A0CAE-42E4-495E-96AA-C8A45559E139@cox.net> Date: Fri, 7 Feb 2014 16:06:49 +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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391749612 news.xs4all.nl 2852 [2001:888:2000:d::a6]:51484 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65594 On Fri, Feb 7, 2014 at 4:01 PM, Scott W Dunning wrote: > Oops, thought you said turning a str into an int. Yeah, I=E2=80=99m actu= ally using Idle on a mac. I keep trying differnt things but, I=E2=80=99m j= ust very new to this. > > Is this what you=E2=80=99re talking about? > > minutes=3D3 > seconds=3D11 > > print str(minutes) + =E2=80=98:=E2=80=99 + str(seconds) > > Unfortunately I keep getting an error. Also, not really clear on the rea= soning behind changing the int to a string? Here's another fundamental of Python: Error messages are really REALLY useful. In this case, I can figure out what's going on without seeing it, but normally, post the whole traceback. The problem here is because you're using "smart quotes" of some sort. Use ordinary apostrophes and double quotes, and it'll work fine. As to the reason for changing the int to a string... try skipping it! Then you'll know. You'll get a nice tidy error, pointing you to the exact cause of the problem. >>> print minutes + ':' + seconds See what happens! ChrisA