QuestionQ1

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output from the following code?

Question Image

Explanation

Python’s str.lower() converts uppercase letters in a string to lowercase and leaves the @ symbol and exclamation marks unchanged. The resulting printed text is hello@peter!!.

Community Discussion

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