Skip to content

Tag: optimization

Python : optimization/multiple if then on less lanes?

I’m trying some optimisation on my code and I struggle with multiple if then statements. The point is to update SQL database with psycopg2 and I must set some variables with “None” to be “null” in SQL. If I do if/elif/elif, the script will leave on the first valid condition but I…