Announcement

Collapse
No announcement yet.

PHP like array handling in Python: Indexing multidimensional array

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP like array handling in Python: Indexing multidimensional array

    This feels like a stupid question, but I cannot find an answer anywhere. I am trying to learn python, so I figured I could try to create a little command line control for my lights and locks etc. (I have made my own home automation with Arduino).

    To my question: I want the Python equivalent to PHP's:
    $array = array('light' => array('on', 'off'), 'lock' => array('lock', 'unlock'));
    Learn Automation Anywhere Certification | 30Hrs | Live Project Use-Cases | 24*7 Support | OnDemand Webinar | 24*7 Support | AA Training Material. Free Demo!
Working...
X