1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-24 12:04:24 +01:00

Refactor 'if' expression

Signed-off-by: ankitdobhal <dobhal.ankit@protonmail.com>
This commit is contained in:
ankitdobhal 2021-03-20 05:47:43 -04:00
parent c2724c948c
commit 8cbe61bb66

View File

@ -78,7 +78,7 @@ with open("add_categories", "r") as f:
while True: while True:
title = content.next() title = content.next()
cat = content.next().strip() cat = content.next().strip()
is_new = True if cat[-1]=="*" else False is_new = cat[-1]=="*"
cat = cat.replace('*','') cat = cat.replace('*','')
snips_by_title[title] = { snips_by_title[title] = {
"category": cat, "category": cat,