def dict = [2: "groovy", 4: "c", 6: "java", 8: "rust", 5: "python"]
println "key values:"
dict.each { println it }
println()
println "keys:"
dict.keySet().each { println it }
println()
println "values:"
dict.values().each { println it }
/*
run:
key values:
2=groovy
4=c
6=java
8=rust
5=python
keys:
2
4
6
8
5
values:
groovy
c
java
rust
python
*/