Answer Posted / chaitanya
A cookie is an arbitrary string of characters that uniquely identify a session.
Each cookie is specific to one Web site and one user.
The Cookie module defines classes for abstracting the concept of cookies. It contains following method to creates cookie
Cookie.SimpleCookie([input])
Cookie.SerialCookie([input]
Cookie.SmartCookie([input])
for instance following code creates a new cookie ck-
import Cookie
ck= Cookie.SimpleCookie ( x )
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Tell me what is pep 8?
How do I run python?
Where we can use else block in python programming?
Explain the use of try: except raise, and finally?
Explain different way to trigger/ raise exception in your python script?
How do you disconnect from the database?
What is split used for?
How do you check if two objects are the same in python?
What is the output of this below query?
Explain pickling and unpickling in python?
What animal sleeps the most?
Is coding useful in finance?
What are the differences between python 2.x and python 3.x?
How will you convert a list into a string?
What are docstrings and comments?