# print Function in Python its built-in
functions
#Print Function Display the result in Console/screen to user
#print function having multiple parameter
#---------Jut Print Hello world use Below Statement--
print("Hello World ")
#Printing Multiple Values
a=10
b=20
print(a+b) # add two Numbers with sum
print(a , b ) # add Space to the values
# if u want Space in Each Value Using Seprator parameter In Print Function
print("Python", "Java", "C++", sep=" **
")
#end Parameter Will Work Wat u need put end of statement
print("Python", "Java", "C++", sep=" **
",end=" etc ....!")
#Flash value should true or false(It forces immediate output.) below \n means
print result in new line
print("\n","Python", "Java", "C++", sep="%",end="
etc ....!",flush=False)
print("\n","Python", "Java", "C++", sep="
--",end=" etc ....!",flush=True)
#\t means new tab and \\ means Backslash \" menas Double quote
print("Hello\tworld", "hello\\world", "hello \"
world")
#Syntax:print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
#objects values to print sep separator end line ending file output location
#flush force output
No comments:
Post a Comment