Python

Index

1. Print Delimiter

 


1. Print Delimiter
print is a function that can be executed by passing multiple parameters with , delimiter. When comma is given the o/p is generated with space between actual values. When comma is excluded then the o/p is generated w/o space between actual values.

>>> print("Srikanth G D")
Srikanth G D
>>> print("Srikanth", "G", "D")
Srikanth G D
>>> print("Srikanth" "G" "D")
SrikanthGD
>>> print(250)
250
>>> print(250.60)
250.6
>>> print(250.61)
250.61
>>> print("Srikanth G D", 123, 123.45)
Srikanth G D 123 123.45
>>> print("Srikanth G D" 123 123.45)
  File "<stdin>", line 1
    print("Srikanth G D" 123 123.45)
                           ^
SyntaxError: invalid syntax
>>> print(123, 123.45)
123 123.45
>>> print(123 123.45)
  File "<stdin>", line 1
    print(123 123.45)
                   ^
SyntaxError: invalid syntax
>>> print(123 123)
  File "<stdin>", line 1
    print(123 123)
                ^
SyntaxError: invalid syntax