I'm doing some queries ( inserts ) to a database based on some input. However not all the times I get all the data from the user. I still would like though to insert the data that I received. I have a table with close to 10 columns but in the data I also have some arrays.
When I'm trying to insert something I get an exception that the say input['name'] does not exists and the query is not executed.
Is there some way to quickly manage that? If a variable does isn't defined simply throw a warning like in PHP and not break the whole loop.
New to python and only thing I can think of is to check for every single variable but I'd really hope there's something more simpler than this and quicker.