sep **stands for separator
**sep works only when there are 2 or more values.
Its cant work if any one value is available.
print("Gunalan", sep="*")
output
Gunalan
If you didn't use **sep **to make a **space **By default Python uses space, so we use sep to change it.
program
print("Gunalan","Ramesh")
output
Gunalan Ramesh
So we need any thing instead of Space use sep for change.
Example:
program
print("Gunalan","Ramesh",sep="*")
output
Gunalan*Ramesh
print("Gunalan","Ramesh",sep=".")
output
Gunalan.Ramesh
print("Gunalan","Ramesh",sep="with")
output
GunalanwithRamesh
But you did \n
output
Gunalan
Ramesh
Reason is \n is used for push next value to next line.
Symbol Meaning
\n next line
\t tab space
\ backslash
\' single quote
\" double quote
They are special commands inside .
Top comments (0)