Jupyter выдаёт ошибку
with open('sample.txt') as sample_file:
sample_data = sample_file.read()
print(sample_data)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_13908\2330393347.py in <module>
----> 1 print(sample_data)
NameError: name 'sample_data' is not defined