Getting Started With Basics ....
Basics of Python
Let's start with the usage of 'print' function, the syntax of the 'print' function is :
print("Text under this will be Displayed ")
the basic definition of print is :
print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile: a file-like object (stream); defaults to the current sys.stdout.\nsep:string inserted between values, default a space.\nend:string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream.
The above definition of print you can get by entering docstring and flexibility of python print
function ,syntax to get info of any function that used in the python is by using the docstring,
we can get to know about the parameter that can used or should be passed through a
pre-defined function.
The syntax for "Docstring" keyword is :
print.__doc__
Image :
The flexibility of the print function is :
print("Text1","Text2","Text3",".....","TextN",sep="Any symbol or string whatever",end="space or anything will be placed at the end")
Image :
Comments
Post a Comment