Iterables with Sets and Maps
using the entries, keys and values methods to play with iterables of keys or values
The entries
method is defined on sets and maps. You can also use the keys
and values
method on a set or map to create an iterator/iterable of the keys or values. For example:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.