petter john

What does the following code output?


  1. >>> def extendList(val, list=[]):
  2. list.append(val)
  3. return list
  4. >>> list1 = extendList(10)
  5. >>> list2 = extendList(123,[])
  6. >>> list3 = extendList('a')
  7. >>> list1,list2,list3

2019-06-21 04:17:32

Your Answer This

Elbord John

list1 = [10, 'a']
list2 = [123]
list3 = [10, 'a']

2019-06-29
Response this asnwer Please login to answer this question or answer by facebook comment..