Zip() with dictionaries

Report a typo

The domestic_animal and wild_animal variables contain dictionaries. Use a for loop to print a representation of each dictionary's keys and values in the format displayed in the example.

The dictionary variables have been defined; you do not need to accept any input.

Sample Input 1:

common name:dog, species:Canis familiaris
common name:wolf, species:Canis lupus

Sample Output 1:

The domestic animal's common name is 'dog'.
The wild animal's common name is 'wolf'.
The domestic animal's species is 'Canis familiaris'.
The wild animal's species is 'Canis lupus'.
Write a program in Python 3
# please do not modify the following code
_d_list = [keyword.split(':') for keyword in input().split(', ')]
domestic_animal = {key: value for key, value in _d_list}
_w_list = [keyword.split(':') for keyword in input().split(', ')]
wild_animal = {key: value for key, value in _w_list}

# your code here
___

Create a free account to access the full topic