🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

What will be the output of the following Python code?

sys.stdout.write(' Hello\n')
sys.stdout.write('Python\n')

A)
B)
C)
D)

Explanation:

The code uses sys.stdout.write() to print text:

  1. sys.stdout.write(' Hello\n') prints " Hello" and moves to the next line because of the \n.
  2. sys.stdout.write('Python\n') then prints "Python" and moves to the next line.

Thus, the output is:

 Hello
Python

Correct answer: (D) Hello Python

Latest Updates