Vladimir

10%
Flag icon
In other words, the end result of this line… my_dict.setdefault(key, []).append(new_value) …is the same as running… if key not in my_dict:     my_dict[key] = [] my_dict[key].append(new_value)
Fluent Python: Clear, Concise, and Effective Programming
Rate this book
Clear rating
Open Preview