Important Notice:

Course Content
Accepting Input from the Console
0/1
Introduction to Python (Chapter-3) M3-R5.1
About Lesson
print() Function:-

Python में किसी भी तरह का डाटा को screen पर print करने के लिए print() function का इस्तेमाल किया जाता है। ये एक inbuilt function है जिसका यूज़ हम अपने Python program में स्क्रीन पर Output देने के लिए करते है।

print() Function Parameters

print() function के अंदर Single or double कोट्स में लिखे गए टेक्स्ट्स हमे ज्यूँ के त्यूं output में मिल जाते है। अगर आपको एक लाइन से ज्यादा print करवाना है तो आपको डबल कोट्स की जगह ट्रिपल कोट्स का यूज़ करना पड़ेगा।

Syntax:- print(*objects, sep=’ ‘, end=’n’, file=sys.stdout, flush=False)

print(“””hi student

How are You

I hope you are good

welcome to Python programming”””)

       print(“welcome to ak it solution youtube channel”)

Example 1:- program to display string using print command.

Example 2:- wap to display sum of two numbers

print() Function:-

     In Python, print() function is used to print any type of data on the screen. This is an inbuilt function which we use in our Python program to give output on the screen.

print() Function Parameters

Inside the print() function, we get the text written in single or double quotes in the output. If you want to print more than one line, you will have to use triple quotes instead of double quotes

Syntax:- print(*objects, sep=’ ‘, end=’n’, file=sys.stdout, flush=False)

print() Parameters

objects – object to the printed. * indicates that there may be more than one object

sep -the separator between multiple printed objects. Default value: ‘ ‘

end – the character/string printed at the end after the object.

file – specifies the file where the output goes. By default this is the console.

flush – If True, the stream is forcibly flushed. Default value: False

print(“””hi student

How are You

I hope you are good

welcome to Python programming”””)

       print(“welcome to ak it solution youtube channel”)

Example 1:- program to display string using print command.

Example 2:- wap to display sum of two numbers

error: Content is protected !!