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 |
Does netflix use python?
Explain what is a flask? What are its benefits?
Why does the following behave unexpectedly in python?
How do you append to a file in python?
What are the 5 tuples?
What is constructor in python?
Is python used for frontend or backend?
Is python strongly typed or weakly typed language?
What is python shell and idle?
Explain pickling and unpickling in python?
What does pep8 refer to?
What is python in simple words?