Как добавить mylist
как keys
и myanotherlist
как values
к myMap
def mylist = [ John, Paul, Emily ]
def myanotherlist = [ 23, 45, 56 ]
def myMap = [:]
//
println "myMap: ${myMap}"
println "Age of Paul is: ${myMap['Paul']}"
Желаемый вывод:
myMap: [
John : 23
Paul : 45
Emily : 56
]
Age of Paul is: 45