Difference between end and sep

0 votes
What is the difference between the end and sep parameters of print method in Python?
Jul 30, 2019 in Python by Fata
• 1,050 points
555 views

1 answer to this question.

0 votes
end and sep are optional parameters of Python. The end parameter basically prints after all the output objects present in one output statement have been returned. the sep parameter differentiates between the objects.

EXAMPLE:

a=2
b='abc'
print(a,b,sep=',')
print(a,b,end=',')

OUTPUT:

2,abc
2 abc,
answered Jul 30, 2019 by Wajiha
• 1,950 points

Related Questions In Python

0 votes
1 answer

What's the difference in Qt between setVisible, setShown and show/hide

show() is just a convenience function for ...READ MORE

answered Apr 17, 2018 in Python by anonymous
2,959 views
0 votes
1 answer

What is the difference between list and tuple?

Lists are mutable(values can be changed) whereas ...READ MORE

answered May 4, 2018 in Python by aayushi
• 750 points
2,654 views
0 votes
1 answer

Difference between '==' and 'is'

'==' checks for the equality of the ...READ MORE

answered May 14, 2018 in Python by Nietzsche's daemon
• 4,260 points
65 views
0 votes
1 answer

Difference between pop and delete methods

I think you mean del() and not ...READ MORE

answered Jun 25, 2018 in Python by Hamartia's Mask
• 1,580 points
149 views
+1 vote
2 answers

What is the difference between classes and labels in machine learning?

Classes and Labels both are almost same things ...READ MORE

answered Apr 3, 2019 in Python by SA
• 1,050 points
455 views
0 votes
1 answer

What is the difference between Python and IPython?

There are few differences between Python and ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 57,550 points
1,669 views
0 votes
1 answer

Difference between del, remove and pop on lists

es, remove removes the first matching value, ...READ MORE

answered Aug 1, 2018 in Python by Priyaj
• 57,550 points
198 views
0 votes
1 answer

flush parameter of print in Python

Usually all I/Os are buffered, meaning they ...READ MORE

answered Jul 30, 2019 in Python by Wajiha
• 1,950 points
227 views
0 votes
1 answer

Difference between function and generator?

Normal Functions vs Generator Functions: Generators in Python ...READ MORE

answered Jul 15, 2019 in Python by Wajiha
• 1,950 points
1,130 views
0 votes
1 answer

Difference between ElementTree and Minidom

Python allows parsing these XML documents using ...READ MORE

answered Jul 22, 2019 in Python by Wajiha
• 1,950 points
1,681 views