>>> "⅐ↁⅣⅧↂⅪ".isnumeric()
True
>>> "ⅬⅭⅮ⅟Ⅿ39ↀ".isnumeric()
True
>>> "-3".isnumeric()
False
>>> flatten([[1, (2, 3)]])
[1, 2, 3]
>>> flatten('hi')
RecursionError
>>61766673
It's precisely defined in the docs.
> Return true if all characters in the string are numeric characters, and there is at least one character, false otherwise. Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property value Numeric_Type=Digit, Numeric_Type=Decimal or Numeric_Type=Numeric.
>>> (0, 'a') < (1, 0)
True
>>> (1, 'a') < (1, 0)
TypeError
>>> x, y = 999, 999
>>> x is y
True
>>> x = 999
>>> y = 999
>>> x is y
False
>>> map = {True: 'yes', 1: 'no', 1.0: 'maybe'}
>>> map
{True: 'maybe'}
>>61766881
>What is a hashing function?
>>61766814
I would guess that this behaviour is specific to CPython implementations, since it preallocates a small range of integers and 999 falls outside of it.
>>61766996
Do you know what "is" actually does?
>>61767057
do you?
>>61767073
Maybe?
>>61767083
good for you, friend.
i've been programming in python for literally years and never ran into any of these issues. if you aren't an autist looking for edge cases, you will never have any problems with it
the difference between c/c++ and python is that the retarded shit in the former happened much more often, in no small part due to more problematic edge cases existing
>>61766673
re.match('\d+')
>pythonistas
never use this word again
>>61769850
Python Artisans
is and == are not the same thing tards.
>>61766814
Only in REPL
>From PEP 8
>Spaces are the preferred indentation method.
>Python 3 disallows mixing the use of tabs and spaces for indentation.
>Python 2 code indented with a mixture of tabs and spaces should be converted to using spaces exclusively.
>Avoid trailing whitespace anywhere. Because it's usually invisible, it can be confusing: e.g. a backslash followed by a space and a newline does not count as a line continuation marker.
>This is literally an encouraged stylingif (this_is_one_thing and
that_is_another_thing):
do_something()
>B-B-BUT WHITESPACE SYNTAX FORCES YOU TO MAKE IT READABLE!
That's what a linting tool is for you fucking cucks
>>61771585
>That's what a linting tool is for you fucking cucks
Using lint is for cucks
Real men get it right the first time.
>>61767235
Explain this what is identity comparing? space in memory?
>>61772534
is just checks to see if two objects are the exact same object.
The builtin id() returns a "unique identifier for an object"; in cpython, this is implemented as "return the object's memory address".