Should i use 'has_key()' or 'in' on python dicts in Python Programming Language?



Report

1 Answer(s) available

17 


in is definitely more pythonic.

In fact has_key() was removed in Python 3.x.



Report

Related Questions