Describe how to implement Cookies for Web python.



Describe how to implement Cookies for Web python...

Answer / 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

More Python Interview Questions

What is map and filter in python?

0 Answers  


Tell me is there a switch or case statement in python? If not then what is the reason for the same?

0 Answers  


Name the file-related modules in python?

0 Answers  


What is class used for in python?

0 Answers  


What is the output of this following statement?

0 Answers  






What is the main use of python?

0 Answers  


How do you call functions in python?

0 Answers  


How would you define a protected member in a python class ?

0 Answers  


What is pass in python? What are the differences between pass and continue?

0 Answers  


What is difference between list and set in python?

0 Answers  


Explain garbage collection with python?

0 Answers  


What does float () do in python?

0 Answers  


Categories