'Python function for creating a string based on length of row/list
I am using Python and SQL Alchemy to automate some categorizations of products. Essentially I am looking to take any csv with items as the rows and format it into search strings for a case statement of a SQL query.
I want to write a function in python that will measure the length of a row (or list) and insert text in between each of the words and output a string that will feed into SQL to find those words. The screenshot attached is how I've been doing it in excel. I'm sure this is fairly straightforward for someone with some concatenation skills.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
