},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 5,
"metadata": {
"collapsed": false
},
"\"E TOY'P ZEPGLST OY PZED LSET YZTE. AZYLP GLSEYZOTZD HZ YPCP, SPYZW LELSEZOYLN TH ZSPPDE. YLN TE TIT QZEO, PEC L EDP'G LSES RTX, PHC PSEP RZ EEF MJE WT FRSE ZMPC LPHOY. L RYT'Y PAALS DLH ELSH ZEOY TW, MS EZMP CPHP HPXYL SE PCZX XTS PXLWMEYLN TPY ZW LSE THWL POZERT, MZZ EDTDTSEO YL XTSOY TQEY LNTOYLP YZ RDL SP. S EFM'O PPC RLP H RYT SE JCPG PCPEQ, LOTL, DPH. RY T SEJ'C PGPC PE QLELSE. PV TWE QP WPS. P GPTW PM EYL NT.\\n\""
]
},
- "execution_count": 20,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 6,
"metadata": {
"collapsed": false
},
"print(wcat(segment(cat(reversed(sanitise(caesar_decipher(c1b, key_b)))))))"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[1, 5, 7, 15, 18, 23, 28, 33, 34, 40]"
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "nonletters = [i for i in range(len(c1b)) if c1b[i] not in string.ascii_letters]\n",
+ "nonletters[:10]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'icantbelieveheleftlikethataftereverythingwesaidaftereverythingweagreedbuthehasgoneandicantfindhimandthisistoobigtodealwithaloneicantblamehimmorethanmewewerebothblindtowhatwashappeningandwearebothguiltybuttogetherwemighthavestartedtofixiticantseehowicandothataloneherenowsoidonthaveanoptionithastoendihavetoendit'"
+ ]
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "p1bs = cat(reversed(sanitise(caesar_decipher(c1b, key_b))))\n",
+ "p1bs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\"i can't believe he left like that. after everything we said, after everything we agreed. but he has gone, and i can't find him, and this is too big to deal with alone. i can't blame him more than me, we were both blind to what was happening and we are both guilty, but together we might have started to fix it. i can't see how i can do that alone, here, now. so i don't have an option. it has to end. i have to end it.\\n\""
+ ]
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "p1b = p1bs\n",
+ "for i in nonletters:\n",
+ " p1b = p1b[:i] + c1b[i] + p1b[i:]\n",
+ "p1b"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,