Machine Learning with Python
1. What will be the output of the following code? def add_item(item, lst=None): if lst is None: lst = [] lst.append(item) return lst print(add_item(1)) print(add_item(2)) A. [1] then [2] B. [1] then [1, 2] C. [] then [] D. Raises TypeError…
These questions are taken from the book "Python Workout 2025"
❤6