How to get index of element in Set object

A set is just an unordered collection of unique elements. So, an element is either in a set or it isn’t. This means that no element in a set has an index.

Consider the set {1, 2, 3}. The set contains 3 elements: 1, 2, and 3. There’s no concept of indices or order here; the set just contains those 3 values.

So, if data[key] in itemList returns True, then data[key] is an element of the itemList set, but there’s no index that you can obtain.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)