Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Back again on f-strings
#8
I agree with buran that his solution is more life-like than oneliner and therefore longer.

One should be defensive and/or generalise (duck-typing) when writing functions. In this particular case - you can through any iterable to it and it behaves as expected. Little longer code now, lot of time saved on debugging in the future.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
Back again on f-strings - by newbieAuggie2019 - Oct-15-2019, 09:40 AM
RE: Back again on f-strings - by perfringo - Oct-15-2019, 09:50 AM
RE: Back again on f-strings - by newbieAuggie2019 - Oct-15-2019, 10:29 AM
RE: Back again on f-strings - by buran - Oct-15-2019, 10:00 AM
RE: Back again on f-strings - by newbieAuggie2019 - Oct-15-2019, 10:48 AM
RE: Back again on f-strings - by buran - Oct-15-2019, 10:37 AM
RE: Back again on f-strings - by buran - Oct-15-2019, 11:09 AM
RE: Back again on f-strings - by newbieAuggie2019 - Oct-15-2019, 12:01 PM
RE: Back again on f-strings - by perfringo - Oct-15-2019, 11:52 AM
RE: Back again on f-strings - by newbieAuggie2019 - Oct-15-2019, 12:27 PM
RE: Back again on f-strings - by newbieAuggie2019 - Oct-16-2019, 11:24 PM
RE: Back again on f-strings - by buran - Oct-15-2019, 12:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand strings and lists of strings Konstantin23 2 932 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  i'm back to f-strings, again Skaperen 4 1,190 Sep-21-2022, 08:13 PM
Last Post: Gribouillis
  Splitting strings in list of strings jesse68 3 1,911 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Finding multiple strings between the two same strings Slither 1 2,634 Jun-05-2019, 09:02 PM
Last Post: Yoriz
  lists, strings, and byte strings Skaperen 2 4,350 Mar-02-2018, 02:12 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020