3 ms·
Looks like he copy pasted the python version from another forum post, and didn't look at it carefully. I'd suspect it can be made to look a lot cleaner (edit, y
by version_five 4y ago
Looks like he copy pasted the python version from another forum post, and didn't look at it carefully. I'd suspect it can be made to look a lot cleaner (edit, yes, e.g. by just translating each of the main lines in the awk script to an if statement) I agree with the strawman comment.
- randlet 4y agofloats = [float(v) for v in integerList] or less idiomatic floats = map(float, integerList)
- wiredfool 4y agoExcept that these are different -- the second returns an iterator (at least in python3). You'd need list(map(float, integerList)) for them to be equivalent. (It doesn't matter in a lot of cases, but there are enough edges where it does. Json serialization for one)