Are non f-strings with `{}`s Pythonic? /u/katyasparadise Python Education

I’m talking about {} in non f-strings, to be later used in str.format(), Unless I pass an incorrect number of arguments, are they acceptable?

A small example:

url = "old.reddit.com/r/{}" # ... print(url.format(subreddit_name)) 

submitted by /u/katyasparadise
[link] [comments]

​r/learnpython I’m talking about {} in non f-strings, to be later used in str.format(), Unless I pass an incorrect number of arguments, are they acceptable? A small example: url = “old.reddit.com/r/{}” # … print(url.format(subreddit_name)) submitted by /u/katyasparadise [link] [comments] 

I’m talking about {} in non f-strings, to be later used in str.format(), Unless I pass an incorrect number of arguments, are they acceptable?

A small example:

url = "old.reddit.com/r/{}" # ... print(url.format(subreddit_name)) 

submitted by /u/katyasparadise
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *