I have gone through these questions,
- Python assigning multiple variables to same value? list behavior
concerned with tuples, I want just variables may be a string, integer or dictionary- More elegant way of declaring multiple variables at the same time
The question has something I want to ask, but the accepted answer is much complex
so what I'm trying to achieve,
I have this variables declared, and I want to reduce this declarations to as less line of code as possible.
details = None
product_base = None
product_identity = None
category_string = None
store_id = None
image_hash = None
image_link_mask = None
results = None
abort = False
data = {}
What is the simplest, easy to maintain ?
dicitonary['details']andKeyErrorssuck., plus ides won't highlight invalid keys but variables. If I have to usedetails = dicitonary['details'], I'd better usedetails = Nonethan this round dict creations, lookups and KeyErrors. - Rivadiza,b=(True,)*2Ora=b=True- hassanzadeh.sd