我必须编写一个函数,该函数返回给定年份在给定地理区域中的总人口总数。输入的年份应为int
,区域的输入应为str
,并应返回与人口相对应的int
。
我有些困惑,不确定如何继续。有人可以帮我吗?我会很感激。
def total_pop_in_region(year,region):
"""
This function returns the summed population total in a given geographic region for a given year.
Parameters:
-----------
items: (intergar, string) contains numerical and regional (string) entries.
Returns:
--------
total_pop_in_region: (dictionary) returns a summed population
"""
pop_in_region = 1970, "South Asia"
return