Intermediate API, error occurs, while my code is the same as the answer

Basically I have solved my problem by adding a new line character “”, just curious why the code in the answer without the new line character still works. Thank you for your help

Screen Link:
https://app.dataquest.io/c/18/m/53/intermediate-apis/9/delete-requests

My Code:

response = 
requests.delete("https://api.github.com/repos/VikParuchuri/learning-about-apis" , headers = headers)
status = response.status_code

What I expected to happen:

What actually happened:

  File "<ipython-input-1-7549ddadc695>", line 9
    response =
               ^
SyntaxError: invalid syntax

I am not quite sure what you mean by

But, the code you shared throws an error because your requests.delete() statement is on a different line than the response = one.

The code should have been -

response = requests.delete("https://api.github.com/repos/VikParuchuri/learning-about-apis" , headers = headers)
status = response.status_code