python
Dashboard
My Repos
Compilers
Python Online
Node JS Online
Golang Online
codepy
Login
My Repos
Sign Out
Online Python Interpreter
Stop
Run
def no_side_effects(cities): print(cities) cities = cities + ["Birmingham", "Bradford"] print(cities) def side_effects(cities): print(cities) cities += ["Birmingham", "Bradford"] print(cities) locations = ["London", "Leeds", "Glasgow", "Sheffield"] no_side_effects(locations) print(locations) print('-----------') side_effects(locations) print(locations)
Share this code with others
Public
Clear
My Repos
Repo
Lang
Login
Register
Login
Create a free account. No Credit card info required.
I agree with the Codepy
Term of Service
Sign Up