0

Help defining

For the below I get inverter is not defined. Error. inverter['volts'] = 275 inverter['amps'] = 10.3 print () How can I define inverter before the list to make this code work?

18th May 2019, 8:00 PM
Warren
3 Answers
+ 3
I suppose than your code is in python language... In this case, you have to define a dict before access to inverter like: inverter= {} inverter['volts']= 275 inverter['amps']= 10.3 print(inverter) Next time, please, give more info about your problem (the language used is one of more important)
18th May 2019, 8:06 PM
KrOW
KrOW - avatar
+ 1
yes its python. thanks very much. will post more details next time 👍
18th May 2019, 8:36 PM
Warren
+ 1
👍
18th May 2019, 8:40 PM
KrOW
KrOW - avatar