NameError: name 'y' is not defined

Why my code is wrong?

The mission link:

Hi @Maho,

You cannot use the variables x and y outside the function (because you initialized and assigned them inside the function). Instead, you can obtain your header and apps_data directly from the all_data, which you created using the defined function:

header = all_data[1]
apps_data = all_data[0]

Thanks, @Elena_Kosourova

1 Like