推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
kevin1234
V2EX  ›  Python

求大神帮忙把这个 Python 函数功能 用 js 实现下

  •  
  •   kevin1234 · Dec 8, 2018 · 3159 views
    This topic created in 2851 days ago, the information mentioned may be changed or developed.
    求大神用 js 写下



    def decrypt(key, s):
    a = list(key)
    data = base64.b64decode(s) base64 解密
    data = list(data) 转 list
    for i in range(0,3): 删除 list index 对应值
    data.pop(0)
    for k in range(3,len(a[3:])): 删除 list index 对应值
    data.pop(3)
    data = ''.join(data) 转字符串
    return base64.b64decode(data) base64 解密
    5 replies  •  2018-12-10 11:25:21 +08:00
    azh7138m
        1
    azh7138m  
       Dec 8, 2018
    要么贴个 gist,要么 md 排版,你这个格式大家也很难办啊
    luozic
        2
    luozic  
       Dec 8, 2018
    这都知道排版的么?
    jiejiss
        3
    jiejiss  
       Dec 8, 2018
    ```
    def decrypt(key, s):
    a = list(key)
    data = base64.b64decode(s) base64 解密
    data = list(data) 转 list
    for i in range(0,3): 删除 list index 对应值
    data.pop(0)
    for k in range(3,len(a[3:])): 删除 list index 对应值
    data.pop(3)
    data = ''.join(data) 转字符串
    return base64.b64decode(data) base64 解
    ```

    ```
    def decrypt(key, s):
    a = list(key)
    data = base64.b64decode(s) base64 解密
    data = list(data) 转 list
    for i in range(0,3): 删除 list index 对应值
    data.pop(0)
    for k in range(3,len(a[3:])): 删除 list index 对应值
    data.pop(3)
    data = ''.join(data) 转字符串
    return base64.b64decode(data) base64 解
    ```

    ```
    def decrypt(key, s):
    a = list(key)
    data = base64.b64decode(s) base64 解密
    data = list(data) 转 list
    for i in range(0,3): 删除 list index 对应值
    data.pop(0)
    for k in range(3,len(a[3:])): 删除 list index 对应值
    data.pop(3)
    data = ''.join(data) 转字符串
    return base64.b64decode(data) base64 解
    ```

    ```
    def decrypt(key, s):
    a = list(key)
    data = base64.b64decode(s) base64 解密
    data = list(data) 转 list
    for i in range(0,3): 删除 list index 对应值
    data.pop(0)
    for k in range(3,len(a[3:])): 删除 list index 对应值
    data.pop(3)
    data = ''.join(data) 转字符串
    return base64.b64decode(data) base64 解
    ```

    ```
    def decrypt(key, s):
    a = list(key)
    data = base64.b64decode(s) base64 解密
    data = list(data) 转 list
    for i in range(0,3): 删除 list index 对应值
    data.pop(0)
    for k in range(3,len(a[3:])): 删除 list index 对应值
    data.pop(3)
    data = ''.join(data) 转字符串
    return base64.b64decode(data) base64 解
    ```

    我怎么知道你是哪种缩进
    jmc891205
        4
    jmc891205  
       Dec 8, 2018
    @jiejiss 哈哈 V2EX 的评论不支持 markdown 的
    jiejiss
        5
    jiejiss  
       Dec 10, 2018
    @jmc891205 #4 初来乍到不太懂 = =
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2642 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 15:18 · PVG 23:18 · LAX 08:18 · JFK 11:18
    ♥ Do have faith in what you're doing.