From 0d779e8e58459e862d91a4888632ade84e4e9d18 Mon Sep 17 00:00:00 2001 From: Kay Faraday Date: Tue, 25 Jan 2022 05:33:39 +0000 Subject: [PATCH] simplify gen_post() a tiny bit --- freakpos.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/freakpos.py b/freakpos.py index fa1e977..45830e6 100755 --- a/freakpos.py +++ b/freakpos.py @@ -19,11 +19,10 @@ def load_static(): def gen_post(messages, labels): message = random.choice(messages) label = random.choice(labels) - if message.startswith('{}'): - # believe me, there isn't already a string method that does this. - # not even .capitalize(). - label = label[0].upper() + label[1:] - return message.format(label) + message = message.format(label) + # believe me, there isn't already a string method that does this. + # not even .capitalize(). + return message[0].upper() + message[1:] async def main(): config = load_config()