Hello World Program by R4R Team

In python 3,

we have a print function for printing any string or statement on console. Here we are able to pass our string in single,double and triple quotation .i,e all three quotation are valid and we do not require to add a semicolon at the end of the line in python because python is a scripting language like html and html also we do not use semicolon at the end of the line.

Program to display the Hello world-

print(" Hello World! ")
print("Hello world!",sep="_",end="Finish")

Output -

Hello World!

-Here we print Hello world in three different concept. first one is simple print function and in second print function we use a term 'sep' , basically it seperate the different argument bydefault sep is space and the third print is using the end that is use to insert element at the end of print statement.

- There is a line break is present bydefault at the end of print function so we do not require to add n for line breaking and for removing the line break the code is written as

print(" Hello World! ",end="")

- print is a function in python 3 while print is statement in python 2.

- In other programming language like C and Java, the execution of every program starts with the main function while in python we do not require main function, execution of every program is starts with top most line of program.

Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!