V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
E520
V2EX  ›  Python

hex to bin 16 进制转 2 进制 用 Python 怎么写呀

  •  
  •   E520 · 2019-03-13 00:04:16 +08:00 · 2895 次点击
    这是一个创建于 1843 天前的主题,其中的信息可能已经有所发展或是发生改变。
    7 条回复    2019-03-17 02:36:36 +08:00
    E520
        1
    E520  
    OP
       2019-03-13 00:04:31 +08:00
    求大神帮助!!
    CEBBCAT
        2
    CEBBCAT  
       2019-03-13 00:45:18 +08:00 via Android   ❤️ 1
    十六进制到 int:d = int ('ff', base=10)
    int 到二进制:print(bin(d))

    我知道这样的问题对于你来说很难,但我还是不喜欢你发的这个帖子,因为这个问题一搜就有
    kuangwinnie
        3
    kuangwinnie  
       2019-03-13 05:25:06 +08:00
    https://stackoverflow.com/questions/1425493/convert-hex-to-binary

    连接上 google
    然后把你这个问题里面出现的所有英文丢进去
    第一个答案就是
    CEBBCAT
        4
    CEBBCAT  
       2019-03-13 08:16:36 +08:00 via Android
    @CEBBCAT 应该 base=16,写错了
    sdlearn
        5
    sdlearn  
       2019-03-13 08:34:32 +08:00 via Android
    Google 一下不比发个帖子容易多了
    7654
        6
    7654  
       2019-03-13 09:31:28 +08:00
    考试的时候不知道怎么办?
    很简单,动手算,过程撸个算法出来
    CEBBCAT
        7
    CEBBCAT  
       2019-03-17 02:36:36 +08:00 via Android
    ……问题解答好了连个谢谢也没有,差评
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1089 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:54 · PVG 02:54 · LAX 11:54 · JFK 14:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.