what does this line fout write n format opentags pop do

0 votes

what does this line fout.write("</{}>\n".format(opentags.pop())) do? Does it not close the tag?

Nov 10, 2020 in Python by Roshni
• 10,480 points
65 views

1 answer to this question.

0 votes

It closes one tag actually, opentags is an empty list where u add tags when you add on

answered Nov 10, 2020 by Gitika
• 65,950 points

Related Questions In Python

0 votes
1 answer

What exactly does the .join() method do?

Look carefully at your output: 5wlfgALGbXOahekxSs9wlfgALGbXOahekxSs5 ^ ...READ MORE

answered May 30, 2018 in Python by charlie_brown
• 7,780 points
129 views
0 votes
1 answer

What does if __name__ == “__main__”: do?

According to what I know,  When the Python ...READ MORE

answered Jul 30, 2018 in Python by Priyaj
• 58,140 points
788 views
0 votes
1 answer

What does eval() in Python do?

The eval function lets a Python program ...READ MORE

answered Aug 24, 2018 in Python by Priyaj
• 58,140 points
214 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,362 views
0 votes
0 answers
0 votes
1 answer

Can someone tell me what this line of code does?

Hey, Your above-asked query means: Confidence loads one ...READ MORE

answered Oct 12, 2020 in Python by Gitika
• 65,950 points
77 views
0 votes
1 answer

What does this Class bicycle(bicycle) actually mean?

A Python class is for defining a ...READ MORE

answered Oct 7, 2020 in Python by Gitika
• 65,950 points
77 views