isn't that because you've turned it to string with quote marks?
-
-
-
Of course, that's what I was saying. Python deals with string-numbers poorly.
-
strings are strings, regardless of their content. Do other languages deal with this differently?
-
Apparently R is just as crazy, doing implicit length() calls... but javascript returns 10, so it implicitly converts to float
-
and does so intelligently because given it non-convertible strings results in NaN.pic.twitter.com/xNGwiWAYhn
-
I'm no coder, but I'd take consistency over intelligently adapting any day of the week
-
js calls a conversion on input consistently, it's just that taking the max of NaNs gives NaN too.pic.twitter.com/A11a0jbvol
End of conversation
New conversation -
-
-
kiddo that's why I always use NumPy arrays instead of Python lists
-
I don't normally use Pyth for data analysis. Just for certain odd tasks like this one, where I just use default classes/methods.
-
get with the modern scientific Python program
End of conversation
New conversation -
-
-
That's not the length function. You are comparing strings. "9">"1": >>> max("10","9") '9'
-
It looked like length, but apparently it's an implicit alphabet sorting.
-
... which makes sense for all languages, except those specifically designed to be "practical" for your use case. Like Perl
End of conversation
New conversation -
-
This Tweet is unavailable.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.