Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
the_pwner224
6y ago
0 comments
Save
Share
"Discuss" if comments == 0 else (f"{comments} comment" + "s"*(comments > 1))
0 comments
1 comments · 1 top-level
top
newest
oldest
airstrike
6y ago
Sure, I can put it all in one line too:
"%d comment%s" % (comments, "s" if comments > 1 else "") if comments > 0 else "Discuss"
j
/
k
navigate · click thread line to collapse