Question: This doesn't seem to be an indentation error. Please help In [1]:importrequestsimportcsv In [3]: # Open the CSV file and read email addresses from the
This doesn't seem to be an indentation error. Please help
![This doesn't seem to be an indentation error. Please help In [1]:importrequestsimportcsv](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f332d74f6a6_29466f332d6abe14.jpg)
In [1]:importrequestsimportcsv In [3]: \# Open the CSV file and read email addresses from the 'Email' column with open('/Users//Desktop/Scripts/Email validation/Data/Member_survey_list_2023 - Sheet.csv', 'r') as file: reader = csv. DictReader (file) for row in reader: email_address = row [ Email' ] In [4]: \# Call the API to validate the email address response = requests.get ("https://isitarealemail.com/api/email/validate", params=\{'email': email_address } ) status = response.json( )[ 'status ' ] In [5]: \# Print the validation result for each email address if status == "valid": print(f" { email_address } is valid") elif status == "invalid": print(f"\{email_address } is invalid") else: print(f"\{email_address } was unknown") Input In [5] elif status == "invalid": Syntaxerror: invalid syntax
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
