Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

Come leggere il file json

alessioclemente (19640 points)
16 67 153
in Programmare in python by (19.6k points)
Salve, come posso leggere il file json? Devo usare la libreria json?
393 views
closed

2 Answers

Best answer
andrea.sterbini (207920 points)
750 1267 2373
by (208k points)
selected by
madai ................. :)
alessioclemente (19640 points)
16 67 153
by (19.6k points)
Sorry, ero dubbioso perché pensavo non si potessero usare librerie >.<
alessioclemente (19640 points)
16 67 153
by (19.6k points)
E non avevo visto l'import json già scritto
_andrea_ (45670 points)
11 42 297
by (45.7k points)
Apri il file mettendolo in una variabile come nel secondo hw. Poi fai
qualcosa=json.load(variabile del file)
E ora puoi chiudere il file, avendo salvato il contenuto del json in una variabile qualsiasi