Skip to content

Instantly share code, notes, and snippets.

@SEJeff
Last active March 11, 2021 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SEJeff/81c594a11b6e4f62f77640c62b9468fb to your computer and use it in GitHub Desktop.
Save SEJeff/81c594a11b6e4f62f77640c62b9468fb to your computer and use it in GitHub Desktop.
Python question
def append_one(data=[]):
data.append(1)
return data
### What does this function return for
1. `append_one()`
2. `append_one(data=[2])`
3. `append_one()`
4. `append_one(data=[5])`
5. `append_one()`
6. `append_one()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment