# Code error in "Solution"

**URL:** <https://discourse.jupyter.org/t/code-error-in-solution/23141>\
**Category:** discuss\
**Tags:** jupyterlab\
**Created:** [December 28, 2023, 11:22pm UTC](https://discourse.jupyter.org/t/code-error-in-solution/23141 "2023-12-28T23:22:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JGRodgers](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@JGRodgers](https://discourse.jupyter.org/u/JGRodgers)\
**Post date:** [December 28, 2023, 11:22pm UTC](https://discourse.jupyter.org/t/code-error-in-solution/23141/1 "2023-12-28T23:22:37Z")

</div>

I was doing a lab on Python and entered my code, received an error, looked at solution and saw no difference in the code, copy pasted solution into the executable block and received the same error

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/5/59478d9eddd6e361ed9b9d2be6ee42c663bfb6ba.png)

how can I proceed with understanding the code/language when the provided solution causes an error, the same error my code provided?

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [December 29, 2023, 2:47am UTC](https://discourse.jupyter.org/t/code-error-in-solution/23141/2 "2023-12-29T02:47:15Z")

</div>

It seems likely that `set` was, well, _set_ to a value in an earlier cell, overloading the built-in [`set`](https://docs.python.org/3/tutorial/datastructures.html#sets).

Restarting the kernel and re-running the cells might help.

Another helpful tool is the _Contextual Help_, which can be shown from the _Command Palette_ (opened from the _View_ menu, or via the keyboard ctrl+shift+c), which will update with inspection information based on the position of the cursor.

---

<div class="post-metadata">

**Author:** ![JGRodgers](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@JGRodgers](https://discourse.jupyter.org/u/JGRodgers)\
**Post date:** [December 29, 2023, 4:12am UTC](https://discourse.jupyter.org/t/code-error-in-solution/23141/3 "2023-12-29T04:12:31Z")

</div>

thank you i will try that and see what happens.
