QuestionQ258

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What output should be expected from this code?

print(list('hello'))  
Explanation

Converting a string to a list creates one string element for each character. Python displays the resulting list with quoted string elements separated by commas.

Community Discussion

No comments yet. Be the first to start the discussion!