3 ms·
Good stuff, though not really sure why you'd use this instead of just parsing with `csv` into a list or whatever. If this is a learning project, let me make som
by hatsunearu 9y ago
Good stuff, though not really sure why you'd use this instead of just parsing with `csv` into a list or whatever. If this is a learning project, let me make some suggestions:
in `readtable`, not entirely sure what `col` needs to be, but if I'm reading this correctly, it's like a list of indices. I'd try using the generator pattern instead of doing `for j in col` and `every[j]`.
- jxub 9y agoAlso, lots of typos in the readme.
- noobermin 9y agoNot sure if there is a general place to learn this stuff (like a specific tutorial) but when hacking in python, it helps to think not in terms of c like loops in which you iterate over a collection using a counter like `for(int i=start; i < end; ++i) {...`, instead, for loops in python are specifically for iterating over collections. >>> a=[1,2,3,4] Instead of >>> for i in range(len(a)): ... print("->{}".format(a[i])) You can (should!) just do >>> for x in a: ... print("->{}".format(x)) The entire point of for loops in python is it is for iterating over collections. Even better is that very same syntax can be use if `a` is not a list that can be indexed, like a generator, for example.