• no difference btw my result and result expected

 

Hello,

Here is my solution: import re i,o=',!({[<@;'+'.?)}]>#:'+'0123456789','.?)}]>#:'+',!({[<@;'+'9876543210' def twist(text): return re.sub('\s{4,}',' ',re.sub(r'[[a-zA-Z]+',\ lambda w:w.group()[::-1],text).translate(str.maketrans(i,o)).swapcase())

And it fails on the test 5/5 with the following message (but I don't see any difference): (did I miss something?)

Your result: "EHt KCIUQ. NWORB XOF SPMUJ REVO A YZAL GOD, Sjd KCOLF YB NEHW vtm XA ZIUQ GORP, KNUj vtm ZIUQ DECARG YB XOF SPLEHW, SDWAb GOJ. KCILF ZTRAUQ. XEV SHPMYN, ZTLAw. DAB HPMYN. ROF KCIUQ SGIJ XEV? XOf SHPMYN BARG KCIUQ-DEVIJ ZTLAW, KCIRb ZIUQ SGNAHW YPMUJ TDLEV XOF, THGIRb SNEXIV PMUJ: YZOD LWOF KCAUQ, KCIUq GNITFAW SRYHPEZ XEV DLOB MIj, KCIUq SRYHPEZ WOLB. GNIXEV TFAD MIj, XEs-DEGRAHC POF WELB YM KNUJ vt ZIUQ, WOh YLKCIUQ TFAD GNIPMUJ SARBEZ XEV, OWt NEVIRD SKCOJ PLEH XAF YM GIB ZIUQ, KCIUq. ZAb. TEG YM NEVOW XALF SRUPHDOJ? WOn XAF ZIUQ KCAj? YM EVARB TSOHG DELP, EVIf GNIKCAUQ SRYHPEZ TLOJ YM XAW DEB, DEXOMMULf YB BOJ. GNIHCTEVK w, SPAZ QARi, YZOc XNIHPS SEVAW TRAUQ GUJ FO DAB KLIM, a YREV DAB KCAUQ THGIM XNIJ YPPIZ SLWOF, WEf SPIUQ DEZINAVLAG EHT KCOM YRUJ XOB, KCIUq NWORB SGOD PMUJ REVO EHT YZAL XOF, EHt YAJ. GIP. XOF. ARBEZ. DNA YM SEVLOW KCAUQ? YZWOLb DER SNEXIV THGIF ROF A KCIUQ PMUJ, NIUQAOj XINEOHp SAW DEZAG YB vtm ROF KCUL, a DRAZIW’S BOJ SI OT XEV SPMUHC YLKCIUQ NI GOF,"

Right result: "EHt KCIUQ. NWORB XOF SPMUJ REVO A YZAL GOD, Sjd KCOLF YB NEHW vtm XA ZIUQ GORP, KNUj vtm ZIUQ DECARG YB XOF SPLEHW, SDWAb GOJ. KCILF ZTRAUQ. XEV SHPMYN, ZTLAw. DAB HPMYN. ROF KCIUQ SGIJ XEV? XOf SHPMYN BARG KCIUQ-DEVIJ ZTLAW, KCIRb ZIUQ SGNAHW YPMUJ TDLEV XOF, THGIRb SNEXIV PMUJ: YZOD LWOF KCAUQ, KCIUq GNITFAW SRYHPEZ XEV DLOB MIj, KCIUq SRYHPEZ WOLB. GNIXEV TFAD MIj, XEs-DEGRAHC POF WELB YM KNUJ vt ZIUQ, WOh YLKCIUQ TFAD GNIPMUJ SARBEZ XEV, OWt NEVIRD SKCOJ PLEH XAF YM GIB ZIUQ, KCIUq. ZAb. TEG YM NEVOW XALF SRUPHDOJ? WOn XAF ZIUQ KCAj? YM EVARB TSOHG DELP, EVIf GNIKCAUQ SRYHPEZ TLOJ YM XAW DEB, DEXOMMULf YB BOJ. GNIHCTEVK w, SPAZ QARi, YZOc XNIHPS SEVAW TRAUQ GUJ FO DAB KLIM, a YREV DAB KCAUQ THGIM XNIJ YPPIZ SLWOF, WEf SPIUQ DEZINAVLAG EHT KCOM YRUJ XOB, KCIUq NWORB SGOD PMUJ REVO EHT YZAL XOF, EHt YAJ. GIP. XOF. ARBEZ. DNA YM SEVLOW KCAUQ? YZWOLb DER SNEXIV THGIF ROF A KCIUQ PMUJ, NIUQAOj XINEOHp SAW DEZAG YB vtm ROF KCUL, a DRAZIW’S BOJ SI OT XEV SPMUHC YLKCIUQ NI GOF,"

From: http://www.checkio.org/mission/pep8-break/solve/

HTTP_USER_AGENT:

Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0