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 258 views
2 answers 336 views
3 answers 325 views
5 answers 367 views
367 views asked Dec 14, 2024 by avibootz
2 answers 252 views
252 views asked Jun 16, 2021 by avibootz
3 answers 419 views
1 answer 214 views
...