Added function to give hosts list from dict list.