Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Output format Date: Sun, 20 Mar 2016 19:56:48 -0400 Organization: IISS Elusive Unicorn Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de jAJOuDoTF98nqO02mv20+wy4HEmW8aEatAezMOt6zvwg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'essentially': 0.04; 'formatting': 0.07; 'type,': 0.07; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'specifying': 0.09; 'width.': 0.09; 'python': 0.10; '"format': 0.16; '2016': 0.16; 'columns': 0.16; 'data)': 0.16; 'hint:': 0.16; 'printf()': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'string': 0.17; 'url:home': 0.18; 'extension': 0.20; 'header:X -Complaints-To:1': 0.26; 'follows': 0.29; 'allows': 0.30; "can't": 0.32; '-0700': 0.33; 'but': 0.36; 'data.': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset :us-ascii': 0.37; '(with': 0.38; 'data': 0.39; 'format': 0.39; 'to:addr:python.org': 0.40; 'field': 0.60; 'email addr:gmail.com': 0.62; 'show': 0.62; 'mar': 0.65; 'capability': 0.91; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-79-219-206.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES 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:105320 On Sun, 20 Mar 2016 16:37:32 -0700 (PDT), vernleffler@gmail.com declaimed the following: >I can't find a formatting way to get columns of data. Show us what you've tried. Hint: practically every Python formatting operation allows for specifying a field width. String interpolation formatting "format string with %s or other placeholders" % (tuple, of, data) essentially follows C printf() format capability (with the extension that %s can be used for practically every data type, but for numerics you likely want %d or %f or %e) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/