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="-")
print("Hello world!",sep="_",end="Finish")
Hello World!
Hello-World!
Hello_world!Finish
-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="")