swift Explain what is For-in loop and what is Dictionaries? Provide example with a code snippet, when you use for-in to iterate over items in a dictionary.
Example: loop key value swift
func findDic(dict: [String: String]){
for (key, value) in dict{
print("\(key) : \(value)")
}
}
findDic(dict: ["Animal":"Lion", "Bird":"Sparrow"])
//prints Animal : Lion
Bird : Sparrow