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
oakcdrom
V2EX  ›  Python

请教关于 pywebio 的 table 问题

  •  
  •   oakcdrom · 2022-04-03 17:16:36 +08:00 · 2082 次点击
    这是一个创建于 726 天前的主题,其中的信息可能已经有所发展或是发生改变。

    请教各位大佬,有谁对 pywebio 比较熟悉,我想循环输出列表里的数据

    现在输出结果如下:

    请问如何能让列表里的数据,都在一行里显示呀??

    5 条回复    2022-04-04 07:39:59 +08:00
    ec0
        1
    ec0  
       2022-04-03 18:33:37 +08:00
    把 [list] 改成 *[[i] for i in list] ?
    oakcdrom
        2
    oakcdrom  
    OP
       2022-04-03 20:04:31 +08:00
    @ec0 ![]( https://i.bmp.ovh/imgs/2022/04/03/29e749a20b0095de.png)

    非常感谢。。。现在是一列了,请问怎么改成,都在一行里面显示呀。
    SenLief
        3
    SenLief  
       2022-04-03 20:42:10 +08:00   ❤️ 1
    put_table(tdata=[['ipv6address', ':'.join(list)]])

    是这个意思的?
    ec0
        4
    ec0  
       2022-04-03 20:45:21 +08:00
    把 [list] 改成 list ?
    oakcdrom
        5
    oakcdrom  
    OP
       2022-04-04 07:39:59 +08:00
    @SenLief 非常感谢大佬解答,已投币~~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2744 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 12:47 · PVG 20:47 · LAX 05:47 · JFK 08:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.