[Tutor] Beginners question

Alan Gauld alan.gauld at yahoo.co.uk
Sat Apr 4 02:17:39 EDT 2020


On 04/04/2020 00:19, boB Stepp wrote:
> On Fri, Apr 3, 2020 at 6:35 AM Alan Gauld via Tutor <tutor at python.org> wrote:
> 
>> Perhaps the worst example in Python is string formatting.
>> We now have at least 4 different ways of formatting strings.
>> That's at least 2 too many...
> 
> Out of curiosity, which one(s) do you prefer to use and what shapes
> your preference(s)?
> 
I like C printf style for conciseness and the new format
strings(f"...") look promising although I haven't used them yet.

The format() method is too cumbersome for my taste although it does
offer some extra features over printf. (Although I suspect they
could be incorporated into printf with a bit of thought)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list