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

How will you get a 10 digit zero-padded number from an original number?

0 Answers  


What is strip in python?

0 Answers  


Is python strongly typed or weakly typed language?

0 Answers  


Name the function which helps to change the files permission

0 Answers  


Boolean have 2 possible values. Are there types in python that have 3 possible values?

0 Answers  






What do you think is the output of the following code fragment?

0 Answers  


What is none literal in python?

0 Answers  


What happens when a function doesn’t have a return statement? Is this valid?

0 Answers  


Explain logical operators in python?

0 Answers  


Why python is used?

0 Answers  


What is flask- wtf? Explain its features.

0 Answers  


What are objects and classes in python?

0 Answers  


Categories