Cannot concatenate 'str' and 'list' objects
I'm getting a TypeError: cannot concatenate 'str' and 'list' objects.

I'm trying to pass an object from a list to create a new variable by concatenating it with another variable.

Example: I want to take the value from the group list and concatenate it with "All.dbf" so it will do something with that file for each value in my list.  If working properly, it would set the value for dbname equal to AdministrativeAll.dbf, CadastralAll.dbf and PlanimetericAll.dbf respectively each time it runs through but I am getting the 'str' and 'list' error....

group = ['Administrative', 'Cadastral', 'Planimetric']

for i in group:
    dbname = i + "All.dbf"

    blah, blah, blah....

I suppose I could add the "All.dbf" onto the values in the group list but thought there must be a better way to process this with a function or something that I don't know about....any thoughts??

Cheers



Cannot concatenate 'str' and 'list' objects
===

I'm getting a TypeError: cannot concatenate 'str' and 'list' objects.

I'm trying to pass an object from a list to create a new variable by concatenating it with another variable.

Example: I want to take the value from the group list and concatenate it with "All.dbf" so it will do something with that file for each value in my list.  If working properly, it would set the value for dbname equal to AdministrativeAll.dbf, CadastralAll.dbf and PlanimetericAll.dbf respectively each time it runs through but I am getting the 'str' and 'list' error....

group = ['Administrative', 'Cadastral', 'Planimetric']

for i in group:
    dbname = i + "All.dbf"

    blah, blah, blah....

I suppose I could add the "All.dbf" onto the values in the group list but thought there must be a better way to process this with a function or something that I don't know about....any thoughts??

Cheers


