Q. What is the output of the following code?

Code:
print(list('123'))
  • (A) ['1','2','3']
  • (B) [123]
  • (C) [1,2,3]
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) ['1','2','3']
Explanation: list() converts a string into a list of characters.
Explanation by: Ankit Singh
list() converts a string into a list of characters.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
63
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Ankit Singh
Publisher
πŸ“ˆ
89%
Success Rate