What is the difference between “g” variable and “session” in the flask?

What is the difference between “g” variable and “session” in the flask?

Session” can be used to store the data per specific browser for more requests, where “g” is used to share the data between different parts of the code with one request cycle.

1 Like