Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84005
| 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!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <contropinion@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'python3': 0.07; 'subject:same': 0.07; 'subject:into': 0.09; 'subject:number': 0.09; 'subject:string': 0.09; 'subject:How': 0.10; 'subject:expression': 0.16; '>>>': 0.22; '>>>': 0.24; 'message-id:@mail.gmail.com': 0.30; 'to:name:python-list': 0.33; 'subject:the': 0.34; 'received:google.com': 0.35; 'vice': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=GkIheErN9iV9WM4hWuJlT2vOoGFDwT/bt7Byrzr0kSQ=; b=HUZ1svEKIg8t9MMEbFQ7v257AlRwB02oGVDbxsrDXj1UZK9jzOXG/U/UPq1OuccL/W NpbPIHF32ZbNcAiFa/wwaWhBWdUmpmzsa6Ofam/4BLX6aDkkxA2vkEH/oGXlJYmcjH2J J0avEGf5i8cFSLBsjjPmAgxvn3Qw0Hgb9PddxqxHh03cyWA1TUHEXsSXiNeqbOZb/h52 0PqXFSXVbuQBivdrFlwPuszJhslgjNjlY24DQO7Ww2Mq0D3gf8z4e2WTrXbq4ebfxp6A 1DPiG8/U9lfhOC9wK7Q7mVTuCZDIa+OLADc5tQcqfnNnKJrNfyD6Djmcr/cd4QLQ5+BO 9eTQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.194.20.137 with SMTP id n9mr39548788wje.114.1421658091688; Mon, 19 Jan 2015 01:01:31 -0800 (PST) |
| Date | Mon, 19 Jan 2015 17:01:31 +0800 |
| Subject | How to change the number into the same expression's string and vice versa? |
| From | contro opinion <contropinion@gmail.com> |
| To | python-list <python-list@python.org> |
| Content-Type | multipart/alternative; boundary=047d7b5d8a118c1802050cfd91dc |
| 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.17845.1421658099.18130.python-list@python.org> (permalink) |
| Lines | 36 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1421658099 news.xs4all.nl 2940 [2001:888:2000:d::a6]:59676 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:84005 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
In the python3 console:
>>> a=18
>>> b='18'
>>> str(a) == b
True
>>> int(b) == a
True
Now how to change a1,a2,a3 into b1,b2,b3 and vice versa?
a1=0xf4
a2=0o36
a3=011
b1='0xf4'
b2='0o36'
b3='011'
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
How to change the number into the same expression's string and vice versa? contro opinion <contropinion@gmail.com> - 2015-01-19 17:01 +0800
csiph-web