Python sep end parameter

Python sep end parameter

In the print function, the purpose of the sep is to separate the values ​​in the parameters with a certain format.

print(1,2,3,4,5,6,sep="*")  #1*2*3*4*5*6
print(1,2,3,4,5,6,sep="/")  #1/2/3/4/5/6

the end is for the information you want to put at the end of the message printed by print

print(1,2,3,4,5,6,end=".")  #1 2 3 4 5 6.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply