def decrypt(message): decode = '' modifier = -1 shift = int((len(message) -1) / 2) for i in range(len(message)): shift += i * modifier decode += message[shift] modifier *= -1 return decode
import math- def decrypt(message):
# JUST DO ITreturn message- decode = ''
- modifier = -1
- shift = int((len(message) -1) / 2)
- for i in range(len(message)):
- shift += i * modifier
- decode += message[shift]
- modifier *= -1
- return decode