use std::collections::BTreeMap;
fn main() {
let mut map = BTreeMap::new();
map.insert("c", 1);
map.insert("cpp", 2);
map.insert("java", 3);
map.insert("rust", 4);
for (key, value) in &map {
println!("Key:{k} Value:{v}", k = key, v = value);
}
}
/*
run:
Key:c Value:1
Key:cpp Value:2
Key:java Value:3
Key:rust Value:4
*/