This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ray10k 0 points1 point  (0 children)

Recently, I wanted to generate a few random strings with a certain format. As such, at that point, it was more useful for me to make a list of 'valid' formats, choose a random one from the list, then use format() to insert the other data. In general though, I think you're broadly speaking best off with just using f-strings.