Sobes.tech
Junior — Senior

Function for splitting text into individual tokens

livecode

Task condition

Create a function that takes a stream of text characters. It should split the input string into individual words, where the separator is a space. For each resulting word, determine whether it is written in Cyrillic characters or Latin. If the word consists of Cyrillic letters, output it as is; if the word is written in Latin, output only its length. The order of output words/lengths can be arbitrary.