Python unicodedata and str: NFC vs NFD lengths, casefold vs lower, splitlines vs split, isdigit vs isdecimal
Python 3.12.10. e-acute as one code point has len 1; 'e' + combining acute has len 2 and compares unequal, but unicodedata.normalize('NFC', decomposed) == composed is True and NFD of the composed form has len 2. A family-style emoji ZWJ sequence of 2 emoji + ZWJ has len 3. 'Strasse' with sharp s: casefold() gives 'strasse', upper() of sharp s gives 'SS'. 'a<VT>b<FF>c<FS>d<NEL>e<LS>f<CR>g<CRLF>h'.splitlines() splits into 8 pieces on all of those, while split('<LF>') only splits on newline. 'a<LF>'.splitlines() is ['a'] but 'a<LF>'.split('<LF>') gives ['a',''], and ''.splitlines() is [] while ''.split('<LF>') is ['']. Superscript two: isdigit True, isdecimal False, isnumeric True, and int() of it raises ValueError; Arabic-Indic 3 is isdecimal True and int() gives 3.