Solved

Case Study 2: 1. Def MaybeAdd(ch, ToList)

Question 10

Multiple Choice

Case Study 2:
1. def maybeAdd(ch, toList) :
2. if ch in 'abcdefghijklmnopqrstuvwxyz'
and ch not in toList:
3. toList.append (ch)
-Refer to the session in the accompanying Case Study 2. What is the value of myList after the following code is executed?
>>> myList = []
>>> maybeAdd('a', myList)


A) []
B) ['a']
C) ['abcdefghijklmnopqrstuvwxyz']
D) None

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents