let vehicles = ["unicycle" : 1, "bicycle":2, "tricycle":3, "quad bike": 4]
for (vehicleName, wheelCount) in vehicles {
print (" \(vehicleName) has \(wheelCount) wheels")
}`
The printout result is:
quad bike has 4 wheels unicycle has 1 wheels tricycle has 3 wheels bicycle has 2 wheels
How can I sort them according to their number of wheels, so the printout can be like:
unicycle has 1 wheels bicycle has 2 wheels tricycle has 3 wheels quad bike has 4 wheels