What is the best way to read large dict in vscode? I know u showed to look at debugger in pycharm after response.json step when we call api. Is there an easier way to visualize large dict e.g dict of dict?
You can use right-click over the code and go to "Run in Interactive Window". That will run the code in an embedded jupyter notebook and you will be able to see the dictionary there.
import csv
fieldname=['Language1','Language2']
with open(r"C:\Users\kulde\Downloads\example1.csv",'a',newline='') as file :
writer=csv.DictWriter(file,fieldnames=fieldname,)
writer.writeheader()
while True:
org_word=input("Enter a word in languahe 1(or type 'done' to finish):")
if org_word.lower() == 'done':
break
else:
trans=input('enter the translation of {} in the language2 :'.format(org_word))
writer.writerow({'Language1':org_word,
'Language2':trans})
print('{}(language1) has been added with the translation : {} (language2)'.format(org_word,trans) )
This was good one!! Enjoyed the learning..thanks
Glad you liked it!
What is the best way to read large dict in vscode? I know u showed to look at debugger in pycharm after response.json step when we call api. Is there an easier way to visualize large dict e.g dict of dict?
You can use right-click over the code and go to "Run in Interactive Window". That will run the code in an embedded jupyter notebook and you will be able to see the dictionary there.
Ok, I will check today. Thanks