But as I was going to run a string operation on the result, I didn't want to run the risk of sepa_dict containing a key 'TRTP' with value False (even if the preceding code currently seems to guarantee that when sepa_dict contains a key 'TRTP', the value will always be a string)
Thanks for the review!
I would always go for the latter in cases like:
bar = foo.get('bar')
if bar:
...
But as I was going to run a string operation on the result, I didn't want to run the risk of sepa_dict containing a key 'TRTP' with value False (even if the preceding code currently seems to guarantee that when sepa_dict contains a key 'TRTP', the value will always be a string)