Classic python quirk: Modifying a list through a different name
Answer: A (yes, the list `a` gets modified!) Solution: Let's see what's happening under the hood. a = [2,4,6,8,9] creates a list with those values, and attaches the name `a` to it. b = a this looks up the list referenced by `a`, and gives it an additional name, `b`. So now +
1
0
2
0
955
0
0
0
0
113
United States Trends
- 1. The JUP 312K posts
- 2. FINALLY DID IT 544K posts
- 3. The PENGU 233K posts
- 4. Good Monday 30.1K posts
- 5. Victory Monday 1,193 posts
- 6. 60 Minutes 81.4K posts
- 7. Greenland 10.6K posts
- 8. #MondayMotivation 26.3K posts
- 9. #espresso 2,949 posts
- 10. #bewitched 2,986 posts
- 11. #zigzag 3,058 posts
- 12. #zesty 3,157 posts
- 13. Bari Weiss 68K posts
- 14. Ravens 67K posts
- 15. Lorraine 10.2K posts
- 16. Vance 217K posts
- 17. Christmas Week 44.5K posts
- 18. Drake Maye 29.3K posts
- 19. Harbaugh 12.7K posts
- 20. Lamar 29.3K posts
Loading...
Something went wrong.
Something went wrong.