Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84011
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| 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; 'string.': 0.05; 'subject:same': 0.07; 'prefix': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:into': 0.09; 'subject:number': 0.09; 'subject:string': 0.09; 'subject:How': 0.10; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:expression': 0.16; 'wrote:': 0.18; '>>>': 0.22; '(in': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints- To:1': 0.27; 'writes:': 0.31; 'subject:the': 0.34; 'add': 0.35; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'otten': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Peter Otten <__peter__@web.de> |
| Subject | Re: How to change the number into the same expression's string and vice versa? |
| Date | Mon, 19 Jan 2015 12:46:33 +0100 |
| Organization | None |
| References | <CA+YdQ_651X0NDPw1j203WGbeDTxy_Mw7g0w3VH1WoaGR1iv-Cg@mail.gmail.com> <mailman.17846.1421659473.18130.python-list@python.org> <qot8ugzqfgt.fsf@ruuvi.it.helsinki.fi> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Gmane-NNTP-Posting-Host | p57bd968c.dip0.t-ipconnect.de |
| User-Agent | KNode/4.13.3 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17850.1421668007.18130.python-list@python.org> (permalink) |
| Lines | 16 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1421668007 news.xs4all.nl 2926 [2001:888:2000:d::a6]:59509 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:84011 |
Show key headers only | View raw
Jussi Piitulainen wrote:
> Peter Otten writes:
>> >>> "{:o}".format(0xf4)
>> '364'
>> To add a prefix just put it into the format string.
> There's also these (in Python 3.2.3):
>
> >>> hex(0xf4)
> '0xf4'
D'oh!
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: How to change the number into the same expression's string and vice versa? Peter Otten <__peter__@web.de> - 2015-01-19 10:24 +0100
Re: How to change the number into the same expression's string and vice versa? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-01-19 11:36 +0200
Re: How to change the number into the same expression's string and vice versa? Peter Otten <__peter__@web.de> - 2015-01-19 12:46 +0100
csiph-web