May 2019
Beginner
528 pages
29h 51m
English
When you read a sentence, your brain breaks it into individual words, or tokens, each of which conveys meaning. Interpreters like IPython tokenize statements, breaking them into individual components such as keywords, identifiers, operators and other elements of a programming language. Tokens typically are separated by whitespace characters such as blank, tab and newline, though other characters may be used—the separators are known as delimiters.
We showed previously that string method split with no arguments tokenizes a string by breaking it into substrings at each whitespace character, then returns a list of tokens. To tokenize a string at a custom delimiter (such as each comma-and-space ...
Read now
Unlock full access