Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.python Subject: Re: Formatted Integer With Specified Number Of Digits Date: Fri, 24 Oct 2025 01:14:39 -0700 Organization: A noiseless patient Spider Lines: 5 Message-ID: <87ikg467io.fsf@nightsong.com> References: <10d23rk$2bc2b$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 24 Oct 2025 08:14:40 +0000 (UTC) Injection-Info: dont-email.me; posting-host="21a1865d7c2f18eb16115017d6951444"; logging-data="2589629"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/dD9ABFdoH8FoJroQgRlu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:kcLe5cr0rMmQd3zFpNU0ziW3v3s= sha1:trBXGr7HxqKr9TwhEICXhY7RYng= Xref: csiph.com comp.lang.python:197571 Lawrence D’Oliveiro writes: > >>> "%#0.3x" % 2 > '0x002' f'0x{2:03x}