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 python and python scripting?

0 Answers  


Why everything in python is an object?

0 Answers  


How does the ternary operator work in python?

0 Answers  


What does “list comprehension” mean? How does it work and how can I use it?

0 Answers  


What are docstrings and comments?

0 Answers  






Write a program to check given number is prime using for loop with else?

0 Answers  


Write a program to find the given string in the line?

0 Answers  


What is zip () in python?

0 Answers  


What does the meaning of gil in python language?

0 Answers  


Write a logic to find the max sum of a list in another list?

0 Answers  


What is a module in python?

0 Answers  


Short description of the scoping rules?

0 Answers  


Categories