Add files via upload

This commit is contained in:
Peter Norvig
2026-07-08 10:39:55 -07:00
committed by GitHub
parent 8c8f0cef1a
commit 6a2ab5033f

View File

@@ -48,7 +48,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"program = \"\"\"\n", "program = \"\"\"\n",
"for i, line in enumerate(input):\n", "for i, line in enumerate(input, 1):\n",
" for word in re.findall(\"[A-Z]+\", line.upper()):\n", " for word in re.findall(\"[A-Z]+\", line.upper()):\n",
" $word = $word + i + \", \"\n", " $word = $word + i + \", \"\n",
"\"\"\"" "\"\"\""
@@ -137,35 +137,35 @@
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"-------------------------------------------------------------------------------\n", "-------------------------------------------------------------------------------\n",
"A = 0, \n", "A = 1, \n",
"AND = 2, 7, \n", "AND = 3, 8, \n",
"DIDDY = 1, 1, 1, 3, 3, 3, \n", "DIDDY = 2, 2, 2, 4, 4, 4, \n",
"DO = 1, 1, 3, 3, \n", "DO = 2, 2, 4, 4, \n",
"DOWN = 0, \n", "DOWN = 1, \n",
"DUM = 1, 3, \n", "DUM = 2, 4, \n",
"FEET = 2, \n", "FEET = 3, \n",
"FINE = 5, 5, 6, \n", "FINE = 6, 6, 7, \n",
"FINGERS = 2, \n", "FINGERS = 3, \n",
"GOOD = 4, 4, 6, \n", "GOOD = 5, 5, 7, \n",
"HER = 2, 2, \n", "HER = 3, 3, \n",
"I = 7, \n", "I = 8, \n",
"JUST = 0, \n", "JUST = 1, \n",
"LOOKED = 4, 4, 5, 5, 6, 6, \n", "LOOKED = 5, 5, 6, 6, 7, 7, \n",
"LOST = 7, \n", "LOST = 8, \n",
"MIND = 7, \n", "MIND = 8, \n",
"MY = 7, \n", "MY = 8, \n",
"NEARLY = 7, \n", "NEARLY = 8, \n",
"SHE = 0, 4, 5, 6, 6, \n", "SHE = 1, 5, 6, 7, 7, \n",
"SHUFFLIN = 2, \n", "SHUFFLIN = 3, \n",
"SINGIN = 1, 3, \n", "SINGIN = 2, 4, \n",
"SNAPPIN = 2, \n", "SNAPPIN = 3, \n",
"STREET = 0, \n", "STREET = 1, \n",
"THE = 0, \n", "THE = 1, \n",
"THERE = 0, \n", "THERE = 1, \n",
"WAH = 1, 3, \n", "WAH = 2, 4, \n",
"WALKIN = 0, \n", "WALKIN = 1, \n",
"WAS = 0, \n", "WAS = 1, \n",
"i = 7\n", "i = 8\n",
"line = And I nearly lost my mind\n", "line = And I nearly lost my mind\n",
"word = MIND\n" "word = MIND\n"
] ]