0
What is sep= for in phython 3?
I wnna know what is it.
1 Answer
+ 2
Using sep , we add a separator between the arguments of print
#code for disabling the softspace feature
print('A','B','C', sep='') # output : ABC
#for formatting a date
print('01','05','2016', sep='-') # output : 01-05-2016
#another example
print('INFO','SOLOLEARN.COM', sep='@') # output : INFO@SOLOLEARN.COM
-- =======================
Check documentation :
https://docs.python.org/3/library/functions.html#print
print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)