May-06-2022, 01:45 PM
(This post was last modified: May-06-2022, 01:47 PM by Larz60+.
Edit Reason: fixed your bbcode tags
)
Greetings,
The csv returns: [114436]
I want to get the values as an integer and not list, any pointers appreciated.
Thanks
Clive
TypeError: list indices must be integers or slices, not list
The csv returns: [114436]
I want to get the values as an integer and not list, any pointers appreciated.
Thanks
Clive
##### CSV
id = open(manhole, encoding='utf-8' )
manhole_id = csv.reader(id)
next(id, None)
rows = ()
for row in manhole_id:
data_manhole_id = [int(item) for item in row]
print(data_manhole_id)I still get:Output:[114436]
[114474]
[114514]NotOutput:114436
114474
114514I also get an error: TypeErrorTypeError: list indices must be integers or slices, not list
