πŸ“Š Python
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

πŸ‘οΈ
40
Total Visits
πŸ“½οΈ
4 mo ago
Published
πŸŽ–οΈ
Ankit Singh
Publisher
πŸ“ˆ
87%
Success Rate