← Lesson
Tokens
Joeven
Run
Reset
Python loads on first run
text = "please refund invoice 17" chars = list(text) words = text.split() pieces = [] for w in words: if w.isdigit(): pieces.extend(list(w)) else: pieces.append(w) json_text = '{"job_id": 17}' print("text", text) print("char count", len(chars)) print("char list", chars[:8], "...") print("word count", len(words)) print("word list", words) print("toy piece count", len(pieces)) print("toy pieces", pieces) print("json char count", len(list(json_text))) print("json chars", list(json_text))
Run to execute this in your browser. Nothing is sent to a server.