Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created Jul 10, 2020
Embed
What would you like to do?
d={'name':'karthi',
'age':7,
'city':'chennai',
}
#Return an iterator containing keys
i=iter(d)
print (i)#Output:<dict_keyiterator object at 0x00D13BE0>
#converting iterator to list object
print (list(i))#Output:['name', 'age', 'city']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment