How should remove spaces between the line

my code

output

hey @sarthaktech23 ,
there are two way to do that ,

  1. use pandas to create your submission.csv file
  2. after you created the jokes.csv as shown in above code , then re read it ,and re write it and while looping over the rows , just skip those whose length is 0.

i dont know how to create csv file using pandas

import requests import json import csv import pandas as pd

you can use this

import pandas as pd
m = pd.DataFrame.from_dict(data[‘value’],orient=‘columns’)[[‘id’,‘joke’]]
m.columns = [‘ID’,‘Joke’]
m.to_csv(“jokes.csv”,index=False)

But remember you need to take only those values that are there in test file.
not all , so just update that and submit

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.