How to iterate over the values of a dictionary in Python

1 Answer

0 votes
dic = {"aa": "java", "bb": "c++", "cc": "python"}

for key in dic.values():
    print(key)


'''
run:
 
c++
java
python
 
'''

 



answered Dec 7, 2017 by avibootz

Related questions

1 answer 171 views
2 answers 203 views
3 answers 160 views
5 answers 165 views
165 views asked Dec 14, 2024 by avibootz
2 answers 130 views
130 views asked Jun 16, 2021 by avibootz
3 answers 215 views
1 answer 113 views
...