Write a loop that prints each country's population in country_pop.

Sample output with input:
'China:1365830000,India:1247220000,United States:318463000,Indonesia:252164800':
China has 1365830000 people.
India has 1247220000 people.
United States has 318463000 people.
Indonesia has 252164800 people.

Here's the Python code:

```python
country_pop = 'China:1365830000,India:1247220000,United States:318463000,Indonesia:252164800'

# Splitting the string using comma as a separator
country_list = country_pop.split(',')

# Looping through each country in the list
for country in country_list:
name, population = country.split(':') # Splitting each country into name and population
print(f"{name} has {population} people.")
```

Output:
```
China has 1365830000 people.
India has 1247220000 people.
United States has 318463000 people.
Indonesia has 252164800 people.
```