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 map and filter in python?
Tell me is there a switch or case statement in python? If not then what is the reason for the same?
Name the file-related modules in python?
What is class used for in python?
What is the output of this following statement?
What is the main use of python?
How do you call functions in python?
How would you define a protected member in a python class ?
What is pass in python? What are the differences between pass and continue?
What is difference between list and set in python?
Explain garbage collection with python?
What does float () do in python?