python-hard-way/Misc. learning/passing-parms.py

10 lines
229 B
Python
Raw Permalink Normal View History

def no_side_effects(cities, cows):
print(cities)
cities = cities + ["Birmingham", "Bradford"]
print(cities)
print(cows)
locations = ["London", "Leeds", "Glasgow", "Sheffield"]
no_side_effects(locations, "Fred")