1. Home
  2. Data Science
  3. Python
  4. What is the result of "hello".upper() in Python?

Added 4 May 2024

What is the result of "hello".upper() in Python?

  1. "hello"
  2. "HELLO" Correct answer
  3. "Hello"
  4. Error

Correct answer

B. "HELLO"

15 views

MCQSEXAM

Explanation

The upper() method converts all characters in a string to uppercase.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs