What is the main difference between:
>>> dic = {}
>>> existe = dic['key'] if 'key' in dic else None
>>> existe
None
Y:
>>> dic = {}
>>> existe = dic.get('key', None)
>>> existe
None
What is the most recommended for checking keys in a dictionary?
Or is it just a preference issue?