Question: I want to make a table to analyze a function when it tends to 1 on the left and on the right.
for example if this is the function

$\lim \_{x\rightarrow 1} \frac{1-\sqrt{x}}{1-x}$

the table should look like this or similar, I found this example but with another function $x^2$

[![enter image description here](https://i.stack.imgur.com/5aBo7.png)](https://i.stack.imgur.com/5aBo7.png)

I cannot find any appropriate example in the forum to help the understanding of the question although I think it is understood.
help me in forming this format

Answer: 
Even if the session was still open `External code cell` will be open after executing, you can't use the same variable name you'd defined in the external session, inside Mathematica. Let me introduce you to [`ExternalValue`](http://reference.wolfram.com/language/ref/ExternalValue.html).

```
(* start a python session *)
session = StartExternalSession["Python"];

(* run your code using the defined session *)
ExternalEvaluate[session, "import math
result=[math.sqrt(i) for i in range(10)]"];

(* get the value from the session *)
ExternalValue[session, "result"]

(*Out: {0., 1., 1.41421, 1.73205, 2., 2.23607, 2.44949, 2.64575, 2.82843, 3.} *)

(* terminate the session *)
DeleteObject[session]

```

Also, you can use this workaround but it has its limitations:

```
result = ExternalEvaluate["Python", "import math
[math.sqrt(i) for i in range(10)]"];

result
(*Out: {0., 1., 1.41421, 1.73205, 2., 2.23607, 2.44949, 2.64575, 2.82843, 3.} *)

```

Note that if you use the `print` statement in python, this workaround doesn't work. `result` value will be `Null`.

### Update 1

You can stay in the `External code cell`:

```
result = ExternalValue[ExternalEvaluate`GetDefaultExternalSession["Python"], "result"]

```
Inspired by your solution, I find another workaround with External Code Cell:

[![enter image description here](https://i.stack.imgur.com/82Vtb.png)](https://i.stack.imgur.com/82Vtb.png)