kramon
V2EX  ›  问与答

请问有没有办法用 EXCEL 或 MATLAB 或编程语言或者在线工具生成一组词所有的无序组合?

  •  
  •   kramon · Aug 25, 2014 · 2474 views
    This topic created in 4281 days ago, the information mentioned may be changed or developed.
    比如,现有“发现”、“自然”、“探索”、“求知”和“希望”5个词,需要得到以下结果:

    发现 自然 探索 求知 希望
    自然 发现 探索 求知 希望
    求知 希望 发现 自然 探索
    求知 希望 发现 探索 自然
    ...
    ...
    ...
    探索 求知 希望 发现 自然
    探索 求知 发现 自然 希望
    发现 自然 希望 探索 求知
    自然 探索 发现 求知 希望
    1 replies    2014-08-25 01:42:23 +08:00
    robbielj
        1
    robbielj  
       Aug 25, 2014   ❤️ 1
    python可以用itertools.permutations

    例子

    http://ideone.com/8DjwRn
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   995 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 19:19 · PVG 03:19 · LAX 12:19 · JFK 15:19
    ♥ Do have faith in what you're doing.