I wrote this code and it prints rows sequentially:
with open(filename, 'r') as csvfile:
rder = csv.reader(csvfile, delimiter=',')
for row in rder:
print(row)
Is it possible to access rder
with hasNext
and next
fashion, i.e. without for
construct? For example, how to skip first row?
The question is general, I would like to understand, what does it mean to be able to stay before in
. In Java this means being of Iterable
interface and I can easily find it's documentation and know, what I can do with it.
In Python there is no information that I can find about what is returned by the reader
function and I don't know what I can do with it except what is written in example. And that example is written to only use it with for
.
Can I choose to choose something else?