Skip to content

Generate A/B labels for a bunch of hex IDs #440

Answered by dfellis
bkowshik asked this question in Q&A
Discussion options

You must be logged in to vote

If you want it based on the hex_id and therefore the same every time, what about:

def split_into_ab(hex_id):
    return int(hex_id, 16) % 2 == 1

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bkowshik
Comment options

@dfellis
Comment options

@dfellis
Comment options

@dfellis
Comment options

Answer selected by isaacbrodsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants