So, I just started with python and have learned how to fix some issues but I got stuck with this one and what I have searched, doesn't help me.
This is my test.py
file: http://pastebin.com/TzASyCxm where I work with mysql and output some data to an LCD screen.
Right now, executing the code in my script returns the following error:
self.ip[host] = socket.gethostbyname(host)
TypeError: 'str' object does not support item assignment
I'm trying to do like a simple, in php:
$data = array();
$test = 'level1';
$data[$test] = 'alex';