Not sure how to form corectly, but the problem is related to a shapefile(python library) function of writing a new row, which requires to write variables..
From my data I’m creating a list, which I thought I can cast to tuple and will solve my problem, but nah.. I doesn’t go so easy…
The function is asking this:
w.record(a, b, c, d....) or w.record('a', 256, 25.2444, 'd'....)
My data is in a list, but the list length is not known my default, it depends form the input data and the right length is important!
I could also write w.record(list[0], list[1]...list[len(list)-1]), but then I have to create this automatically and not sure how could I do that.
Btw, I use an old python: 2.5… (not my choise)
There are 4 kinds of
argumentin a function declaration: –a = 5)A typical function declaration goes like this: –
You need
non-keywordargument, which take extra argument and store them astuple:Similarly
keywordargument, takesdictionaryas input. They are denoted with**kwarg.**kwargFor E.G: –
OUTPUT: –