Zip not supported?

  • Is the "zip" function not supported in Drawbot? Seems to work in Sublime. 🤐

  • it seems to be working just fine:

    L1 = ['a', 'b', 'c']
    L2 = ['one', 'two', 'three']
    for items in zip(L1, L2):

    maybe you’re confused about py2 vs. py3 behavior?

    • in py2 zip returns a list
    • in py3 zip returns a zip object

    you can use list() to convert a zip iterator into a list:

    print(zip(L1, L2))
    print(list(zip(L1, L2)))

  • Still can't quite pin point what the issue is. Your snippet of code seems to work in both.
    Another issue: emoji! (Why did I venture down this rabbit hole.)
    Emoji seems to function differently across different IDE. The same script that works greats in Drawbot is 💩 in Sublime.

    Also was trying to count emojis in Drawbot.

    from collections import Counters

  • @bic to make sure which version of Python you are running:

    import sys

    in SublimeText3 you can set the Python version in Tools > Build System.

    handling of unicode changed radically from py2 to py3. see:

    hope this helps!

Log in to reply