I am making a web application in flask and I want to format the post votes better.
Instead of it saying "1 votes" I want it to say "1 vote" and so on.
My attempt:
def format_post_votes(post):
output = ''
if post.votes == 0 or post.votes > 1:
output = 's'
else:
output = ''
return f'{post.votes}{output}'
Is there a more efficient way to do this?..