For the following Python statement Txt=list ('PEACE')
For the following Python statement
Txt=list ('PEACE')
What shall be the output of print (Txt)?
Show answerHide answer
Correct answer: (A) ['P', 'E', 'A', 'C', 'E']
Explanation
list() on a string makes a list of its individual characters, so list('PEACE') gives ['P', 'E', 'A', 'C', 'E'].