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 266 views
2 answers 345 views
3 answers 335 views
5 answers 374 views
374 views asked Dec 14, 2024 by avibootz
2 answers 261 views
261 views asked Jun 16, 2021 by avibootz
3 answers 425 views
1 answer 231 views
...