How to continuously use Colab for long time

Here I can’t use the codes that I runned previously and it is showing as not defined.
Or else i should retype all the codes that I runned before.
for Example i have following codes

my_name=“Ansen” This was runned a day before

and now if i am doing
print(my_name) It will be showing as not defined.
How can i use colab as the continuation of what i done before.

You cannot, as colab session is limited to 12 hours.

Dont retype just rerun the previous cells.
You can go to runtime in the menu above and then select run all cells to start from exactly where you left.