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 |
What is abc abstractmethod?
What is the function of a negative index?
What is a static relationship?
Explain the use of *args, **kwargs?
Tell me why and when do you use generators in python?
Explain raise keyword?
How to find methods or attributes of an object?
What are some python projects for beginners?
Do sheeps sleep?
What does Django mean in Python?
Differentiate between deep and shallow copy?
Is there a switch..case statement in python?