python-crash-course/Chapter_11/city_functions_expanded.py
2025-03-10 00:13:14 +00:00

7 lines
250 B
Python

# Exercise 11-02 Population
# Learning Objective: Create a unit test for a function and run it.
def create_city_string(city, country, population=''):
new_string = city.title() + ", " + country.title() + ", " + population
return new_string