Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8061419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:20:00+00:00 2026-06-05T10:20:00+00:00

The first two elements of my tuple s are computated (see below), but I

  • 0

The first two elements of my tuples are computated (see below), but I want them to be 3-tuples rather than 2-tuples with the last element being set to 1.

from itertools import permutations

if __name__ == '__main__':
    alphabet='abcdefghijklmnopqrstuvwxyz'
    print list(permutations(alphabet,2))

Output:

[('a', 'b'), ('a', 'c'), ('a', 'd'), ('a', 'e'), ('a', 'f'), ('a', 'g'), ('a', 'h'), ('a', 'i'), ('a', 'j'), ('a', 'k'), ('a', 'l'), ('a', 'm'), ('a', 'n'), ('a', 'o'), ('a', 'p'), ('a', 'q'), ('a', 'r'), ('a', 's'), ('a', 't'), ('a', 'u'), ('a', 'v'), ('a', 'w'), ('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'a'), ('b', 'c'), ('b', 'd'), ('b', 'e'), ('b', 'f'), ('b', 'g'), ('b', 'h'), ('b', 'i'), ('b', 'j'), ('b', 'k'), ('b', 'l'), ('b', 'm'), ('b', 'n'), ('b', 'o'), ('b', 'p'), ('b', 'q'), ('b', 'r'), ('b', 's'), ('b', 't'), ('b', 'u'), ('b', 'v'), ('b', 'w'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'a'), ('c', 'b'), ('c', 'd'), ('c', 'e'), ('c', 'f'), ('c', 'g'), ('c', 'h'), ('c', 'i'), ('c', 'j'), ('c', 'k'), ('c', 'l'), ('c', 'm'), ('c', 'n'), ('c', 'o'), ('c', 'p'), ('c', 'q'), ('c', 'r'), ('c', 's'), ('c', 't'), ('c', 'u'), ('c', 'v'), ('c', 'w'), ('c', 'x'), ('c', 'y'), ('c', 'z'), ('d', 'a'), ('d', 'b'), ('d', 'c'), ('d', 'e'), ('d', 'f'), ('d', 'g'), ('d', 'h'), ('d', 'i'), ('d', 'j'), ('d', 'k'), ('d', 'l'), ('d', 'm'), ('d', 'n'), ('d', 'o'), ('d', 'p'), ('d', 'q'), ('d', 'r'), ('d', 's'), ('d', 't'), ('d', 'u'), ('d', 'v'), ('d', 'w'), ('d', 'x'), ('d', 'y'), ('d', 'z'), ('e', 'a'), ('e', 'b'), ('e', 'c'), ('e', 'd'), ('e', 'f'), ('e', 'g'), ('e', 'h'), ('e', 'i'), ('e', 'j'), ('e', 'k'), ('e', 'l'), ('e', 'm'), ('e', 'n'), ('e', 'o'), ('e', 'p'), ('e', 'q'), ('e', 'r'), ('e', 's'), ('e', 't'), ('e', 'u'), ('e', 'v'), ('e', 'w'), ('e', 'x'), ('e', 'y'), ('e', 'z'), ('f', 'a'), ('f', 'b'), ('f', 'c'), ('f', 'd'), ('f', 'e'), ('f', 'g'), ('f', 'h'), ('f', 'i'), ('f', 'j'), ('f', 'k'), ('f', 'l'), ('f', 'm'), ('f', 'n'), ('f', 'o'), ('f', 'p'), ('f', 'q'), ('f', 'r'), ('f', 's'), ('f', 't'), ('f', 'u'), ('f', 'v'), ('f', 'w'), ('f', 'x'), ('f', 'y'), ('f', 'z'), ('g', 'a'), ('g', 'b'), ('g', 'c'), ('g', 'd'), ('g', 'e'), ('g', 'f'), ('g', 'h'), ('g', 'i'), ('g', 'j'), ('g', 'k'), ('g', 'l'), ('g', 'm'), ('g', 'n'), ('g', 'o'), ('g', 'p'), ('g', 'q'), ('g', 'r'), ('g', 's'), ('g', 't'), ('g', 'u'), ('g', 'v'), ('g', 'w'), ('g', 'x'), ('g', 'y'), ('g', 'z'), ('h', 'a'), ('h', 'b'), ('h', 'c'), ('h', 'd'), ('h', 'e'), ('h', 'f'), ('h', 'g'), ('h', 'i'), ('h', 'j'), ('h', 'k'), ('h', 'l'), ('h', 'm'), ('h', 'n'), ('h', 'o'), ('h', 'p'), ('h', 'q'), ('h', 'r'), ('h', 's'), ('h', 't'), ('h', 'u'), ('h', 'v'), ('h', 'w'), ('h', 'x'), ('h', 'y'), ('h', 'z'), ('i', 'a'), ('i', 'b'), ('i', 'c'), ('i', 'd'), ('i', 'e'), ('i', 'f'), ('i', 'g'), ('i', 'h'), ('i', 'j'), ('i', 'k'), ('i', 'l'), ('i', 'm'), ('i', 'n'), ('i', 'o'), ('i', 'p'), ('i', 'q'), ('i', 'r'), ('i', 's'), ('i', 't'), ('i', 'u'), ('i', 'v'), ('i', 'w'), ('i', 'x'), ('i', 'y'), ('i', 'z'), ('j', 'a'), ('j', 'b'), ('j', 'c'), ('j', 'd'), ('j', 'e'), ('j', 'f'), ('j', 'g'), ('j', 'h'), ('j', 'i'), ('j', 'k'), ('j', 'l'), ('j', 'm'), ('j', 'n'), ('j', 'o'), ('j', 'p'), ('j', 'q'), ('j', 'r'), ('j', 's'), ('j', 't'), ('j', 'u'), ('j', 'v'), ('j', 'w'), ('j', 'x'), ('j', 'y'), ('j', 'z'), ('k', 'a'), ('k', 'b'), ('k', 'c'), ('k', 'd'), ('k', 'e'), ('k', 'f'), ('k', 'g'), ('k', 'h'), ('k', 'i'), ('k', 'j'), ('k', 'l'), ('k', 'm'), ('k', 'n'), ('k', 'o'), ('k', 'p'), ('k', 'q'), ('k', 'r'), ('k', 's'), ('k', 't'), ('k', 'u'), ('k', 'v'), ('k', 'w'), ('k', 'x'), ('k', 'y'), ('k', 'z'), ('l', 'a'), ('l', 'b'), ('l', 'c'), ('l', 'd'), ('l', 'e'), ('l', 'f'), ('l', 'g'), ('l', 'h'), ('l', 'i'), ('l', 'j'), ('l', 'k'), ('l', 'm'), ('l', 'n'), ('l', 'o'), ('l', 'p'), ('l', 'q'), ('l', 'r'), ('l', 's'), ('l', 't'), ('l', 'u'), ('l', 'v'), ('l', 'w'), ('l', 'x'), ('l', 'y'), ('l', 'z'), ('m', 'a'), ('m', 'b'), ('m', 'c'), ('m', 'd'), ('m', 'e'), ('m', 'f'), ('m', 'g'), ('m', 'h'), ('m', 'i'), ('m', 'j'), ('m', 'k'), ('m', 'l'), ('m', 'n'), ('m', 'o'), ('m', 'p'), ('m', 'q'), ('m', 'r'), ('m', 's'), ('m', 't'), ('m', 'u'), ('m', 'v'), ('m', 'w'), ('m', 'x'), ('m', 'y'), ('m', 'z'), ('n', 'a'), ('n', 'b'), ('n', 'c'), ('n', 'd'), ('n', 'e'), ('n', 'f'), ('n', 'g'), ('n', 'h'), ('n', 'i'), ('n', 'j'), ('n', 'k'), ('n', 'l'), ('n', 'm'), ('n', 'o'), ('n', 'p'), ('n', 'q'), ('n', 'r'), ('n', 's'), ('n', 't'), ('n', 'u'), ('n', 'v'), ('n', 'w'), ('n', 'x'), ('n', 'y'), ('n', 'z'), ('o', 'a'), ('o', 'b'), ('o', 'c'), ('o', 'd'), ('o', 'e'), ('o', 'f'), ('o', 'g'), ('o', 'h'), ('o', 'i'), ('o', 'j'), ('o', 'k'), ('o', 'l'), ('o', 'm'), ('o', 'n'), ('o', 'p'), ('o', 'q'), ('o', 'r'), ('o', 's'), ('o', 't'), ('o', 'u'), ('o', 'v'), ('o', 'w'), ('o', 'x'), ('o', 'y'), ('o', 'z'), ('p', 'a'), ('p', 'b'), ('p', 'c'), ('p', 'd'), ('p', 'e'), ('p', 'f'), ('p', 'g'), ('p', 'h'), ('p', 'i'), ('p', 'j'), ('p', 'k'), ('p', 'l'), ('p', 'm'), ('p', 'n'), ('p', 'o'), ('p', 'q'), ('p', 'r'), ('p', 's'), ('p', 't'), ('p', 'u'), ('p', 'v'), ('p', 'w'), ('p', 'x'), ('p', 'y'), ('p', 'z'), ('q', 'a'), ('q', 'b'), ('q', 'c'), ('q', 'd'), ('q', 'e'), ('q', 'f'), ('q', 'g'), ('q', 'h'), ('q', 'i'), ('q', 'j'), ('q', 'k'), ('q', 'l'), ('q', 'm'), ('q', 'n'), ('q', 'o'), ('q', 'p'), ('q', 'r'), ('q', 's'), ('q', 't'), ('q', 'u'), ('q', 'v'), ('q', 'w'), ('q', 'x'), ('q', 'y'), ('q', 'z'), ('r', 'a'), ('r', 'b'), ('r', 'c'), ('r', 'd'), ('r', 'e'), ('r', 'f'), ('r', 'g'), ('r', 'h'), ('r', 'i'), ('r', 'j'), ('r', 'k'), ('r', 'l'), ('r', 'm'), ('r', 'n'), ('r', 'o'), ('r', 'p'), ('r', 'q'), ('r', 's'), ('r', 't'), ('r', 'u'), ('r', 'v'), ('r', 'w'), ('r', 'x'), ('r', 'y'), ('r', 'z'), ('s', 'a'), ('s', 'b'), ('s', 'c'), ('s', 'd'), ('s', 'e'), ('s', 'f'), ('s', 'g'), ('s', 'h'), ('s', 'i'), ('s', 'j'), ('s', 'k'), ('s', 'l'), ('s', 'm'), ('s', 'n'), ('s', 'o'), ('s', 'p'), ('s', 'q'), ('s', 'r'), ('s', 't'), ('s', 'u'), ('s', 'v'), ('s', 'w'), ('s', 'x'), ('s', 'y'), ('s', 'z'), ('t', 'a'), ('t', 'b'), ('t', 'c'), ('t', 'd'), ('t', 'e'), ('t', 'f'), ('t', 'g'), ('t', 'h'), ('t', 'i'), ('t', 'j'), ('t', 'k'), ('t', 'l'), ('t', 'm'), ('t', 'n'), ('t', 'o'), ('t', 'p'), ('t', 'q'), ('t', 'r'), ('t', 's'), ('t', 'u'), ('t', 'v'), ('t', 'w'), ('t', 'x'), ('t', 'y'), ('t', 'z'), ('u', 'a'), ('u', 'b'), ('u', 'c'), ('u', 'd'), ('u', 'e'), ('u', 'f'), ('u', 'g'), ('u', 'h'), ('u', 'i'), ('u', 'j'), ('u', 'k'), ('u', 'l'), ('u', 'm'), ('u', 'n'), ('u', 'o'), ('u', 'p'), ('u', 'q'), ('u', 'r'), ('u', 's'), ('u', 't'), ('u', 'v'), ('u', 'w'), ('u', 'x'), ('u', 'y'), ('u', 'z'), ('v', 'a'), ('v', 'b'), ('v', 'c'), ('v', 'd'), ('v', 'e'), ('v', 'f'), ('v', 'g'), ('v', 'h'), ('v', 'i'), ('v', 'j'), ('v', 'k'), ('v', 'l'), ('v', 'm'), ('v', 'n'), ('v', 'o'), ('v', 'p'), ('v', 'q'), ('v', 'r'), ('v', 's'), ('v', 't'), ('v', 'u'), ('v', 'w'), ('v', 'x'), ('v', 'y'), ('v', 'z'), ('w', 'a'), ('w', 'b'), ('w', 'c'), ('w', 'd'), ('w', 'e'), ('w', 'f'), ('w', 'g'), ('w', 'h'), ('w', 'i'), ('w', 'j'), ('w', 'k'), ('w', 'l'), ('w', 'm'), ('w', 'n'), ('w', 'o'), ('w', 'p'), ('w', 'q'), ('w', 'r'), ('w', 's'), ('w', 't'), ('w', 'u'), ('w', 'v'), ('w', 'x'), ('w', 'y'), ('w', 'z'), ('x', 'a'), ('x', 'b'), ('x', 'c'), ('x', 'd'), ('x', 'e'), ('x', 'f'), ('x', 'g'), ('x', 'h'), ('x', 'i'), ('x', 'j'), ('x', 'k'), ('x', 'l'), ('x', 'm'), ('x', 'n'), ('x', 'o'), ('x', 'p'), ('x', 'q'), ('x', 'r'), ('x', 's'), ('x', 't'), ('x', 'u'), ('x', 'v'), ('x', 'w'), ('x', 'y'), ('x', 'z'), ('y', 'a'), ('y', 'b'), ('y', 'c'), ('y', 'd'), ('y', 'e'), ('y', 'f'), ('y', 'g'), ('y', 'h'), ('y', 'i'), ('y', 'j'), ('y', 'k'), ('y', 'l'), ('y', 'm'), ('y', 'n'), ('y', 'o'), ('y', 'p'), ('y', 'q'), ('y', 'r'), ('y', 's'), ('y', 't'), ('y', 'u'), ('y', 'v'), ('y', 'w'), ('y', 'x'), ('y', 'z'), ('z', 'a'), ('z', 'b'), ('z', 'c'), ('z', 'd'), ('z', 'e'), ('z', 'f'), ('z', 'g'), ('z', 'h'), ('z', 'i'), ('z', 'j'), ('z', 'k'), ('z', 'l'), ('z', 'm'), ('z', 'n'), ('z', 'o'), ('z', 'p'), ('z', 'q'), ('z', 'r'), ('z', 's'), ('z', 't'), ('z', 'u'), ('z', 'v'), ('z', 'w'), ('z', 'x'), ('z', 'y')]

Trying to efficiently get to this:

[('a', 'b', 1), ('a', 'c', 1), ('a', 'd', 1), ('a', 'e', 1), ('a', 'f', 1), ('a', 'g', 1), ('a', 'h', 1), ('a', 'i', 1), ('a', 'j', 1), ('a', 'k', 1), ('a', 'l', 1), ('a', 'm', 1), ('a', 'n', 1), ('a', 'o', 1), ('a', 'p', 1), ('a', 'q', 1), ('a', 'r', 1), ('a', 's', 1), ('a', 't', 1), ('a', 'u', 1), ('a', 'v', 1), ('a', 'w', 1), ('a', 'x', 1), ('a', 'y', 1), ('a', 'z', 1), ('b', 'a', 1), ('b', 'c', 1), ('b', 'd', 1), ('b', 'e', 1), ('b', 'f', 1), ('b', 'g', 1), ('b', 'h', 1), ('b', 'i', 1), ('b', 'j', 1), ('b', 'k', 1), ('b', 'l', 1), ('b', 'm', 1), ('b', 'n', 1), ('b', 'o', 1), ('b', 'p', 1), ('b', 'q', 1), ('b', 'r', 1), ('b', 's', 1), ('b', 't', 1), ('b', 'u', 1), ('b', 'v', 1), ('b', 'w', 1), ('b', 'x', 1), ('b', 'y', 1), ('b', 'z', 1), ('c', 'a', 1), ('c', 'b', 1), ('c', 'd', 1), ('c', 'e', 1), ('c', 'f', 1), ('c', 'g', 1), ('c', 'h', 1), ('c', 'i', 1), ('c', 'j', 1), ('c', 'k', 1), ('c', 'l', 1), ('c', 'm', 1), ('c', 'n', 1), ('c', 'o', 1), ('c', 'p', 1), ('c', 'q', 1), ('c', 'r', 1), ('c', 's', 1), ('c', 't', 1), ('c', 'u', 1), ('c', 'v', 1), ('c', 'w', 1), ('c', 'x', 1), ('c', 'y', 1), ('c', 'z', 1), ('d', 'a', 1), ('d', 'b', 1), ('d', 'c', 1), ('d', 'e', 1), ('d', 'f', 1), ('d', 'g', 1), ('d', 'h', 1), ('d', 'i', 1), ('d', 'j', 1), ('d', 'k', 1), ('d', 'l', 1), ('d', 'm', 1), ('d', 'n', 1), ('d', 'o', 1), ('d', 'p', 1), ('d', 'q', 1), ('d', 'r', 1), ('d', 's', 1), ('d', 't', 1), ('d', 'u', 1), ('d', 'v', 1), ('d', 'w', 1), ('d', 'x', 1), ('d', 'y', 1), ('d', 'z', 1), ('e', 'a', 1), ('e', 'b', 1), ('e', 'c', 1), ('e', 'd', 1), ('e', 'f', 1), ('e', 'g', 1), ('e', 'h', 1), ('e', 'i', 1), ('e', 'j', 1), ('e', 'k', 1), ('e', 'l', 1), ('e', 'm', 1), ('e', 'n', 1), ('e', 'o', 1), ('e', 'p', 1), ('e', 'q', 1), ('e', 'r', 1), ('e', 's', 1), ('e', 't', 1), ('e', 'u', 1), ('e', 'v', 1), ('e', 'w', 1), ('e', 'x', 1), ('e', 'y', 1), ('e', 'z', 1), ('f', 'a', 1), ('f', 'b', 1), ('f', 'c', 1), ('f', 'd', 1), ('f', 'e', 1), ('f', 'g', 1), ('f', 'h', 1), ('f', 'i', 1), ('f', 'j', 1), ('f', 'k', 1), ('f', 'l', 1), ('f', 'm', 1), ('f', 'n', 1), ('f', 'o', 1), ('f', 'p', 1), ('f', 'q', 1), ('f', 'r', 1), ('f', 's', 1), ('f', 't', 1), ('f', 'u', 1), ('f', 'v', 1), ('f', 'w', 1), ('f', 'x', 1), ('f', 'y', 1), ('f', 'z', 1), ('g', 'a', 1), ('g', 'b', 1), ('g', 'c', 1), ('g', 'd', 1), ('g', 'e', 1), ('g', 'f', 1), ('g', 'h', 1), ('g', 'i', 1), ('g', 'j', 1), ('g', 'k', 1), ('g', 'l', 1), ('g', 'm', 1), ('g', 'n', 1), ('g', 'o', 1), ('g', 'p', 1), ('g', 'q', 1), ('g', 'r', 1), ('g', 's', 1), ('g', 't', 1), ('g', 'u', 1), ('g', 'v', 1), ('g', 'w', 1), ('g', 'x', 1), ('g', 'y', 1), ('g', 'z', 1), ('h', 'a', 1), ('h', 'b', 1), ('h', 'c', 1), ('h', 'd', 1), ('h', 'e', 1), ('h', 'f', 1), ('h', 'g', 1), ('h', 'i', 1), ('h', 'j', 1), ('h', 'k', 1), ('h', 'l', 1), ('h', 'm', 1), ('h', 'n', 1), ('h', 'o', 1), ('h', 'p', 1), ('h', 'q', 1), ('h', 'r', 1), ('h', 's', 1), ('h', 't', 1), ('h', 'u', 1), ('h', 'v', 1), ('h', 'w', 1), ('h', 'x', 1), ('h', 'y', 1), ('h', 'z', 1), ('i', 'a', 1), ('i', 'b', 1), ('i', 'c', 1), ('i', 'd', 1), ('i', 'e', 1), ('i', 'f', 1), ('i', 'g', 1), ('i', 'h', 1), ('i', 'j', 1), ('i', 'k', 1), ('i', 'l', 1), ('i', 'm', 1), ('i', 'n', 1), ('i', 'o', 1), ('i', 'p', 1), ('i', 'q', 1), ('i', 'r', 1), ('i', 's', 1), ('i', 't', 1), ('i', 'u', 1), ('i', 'v', 1), ('i', 'w', 1), ('i', 'x', 1), ('i', 'y', 1), ('i', 'z', 1), ('j', 'a', 1), ('j', 'b', 1), ('j', 'c', 1), ('j', 'd', 1), ('j', 'e', 1), ('j', 'f', 1), ('j', 'g', 1), ('j', 'h', 1), ('j', 'i', 1), ('j', 'k', 1), ('j', 'l', 1), ('j', 'm', 1), ('j', 'n', 1), ('j', 'o', 1), ('j', 'p', 1), ('j', 'q', 1), ('j', 'r', 1), ('j', 's', 1), ('j', 't', 1), ('j', 'u', 1), ('j', 'v', 1), ('j', 'w', 1), ('j', 'x', 1), ('j', 'y', 1), ('j', 'z', 1), ('k', 'a', 1), ('k', 'b', 1), ('k', 'c', 1), ('k', 'd', 1), ('k', 'e', 1), ('k', 'f', 1), ('k', 'g', 1), ('k', 'h', 1), ('k', 'i', 1), ('k', 'j', 1), ('k', 'l', 1), ('k', 'm', 1), ('k', 'n', 1), ('k', 'o', 1), ('k', 'p', 1), ('k', 'q', 1), ('k', 'r', 1), ('k', 's', 1), ('k', 't', 1), ('k', 'u', 1), ('k', 'v', 1), ('k', 'w', 1), ('k', 'x', 1), ('k', 'y', 1), ('k', 'z', 1), ('l', 'a', 1), ('l', 'b', 1), ('l', 'c', 1), ('l', 'd', 1), ('l', 'e', 1), ('l', 'f', 1), ('l', 'g', 1), ('l', 'h', 1), ('l', 'i', 1), ('l', 'j', 1), ('l', 'k', 1), ('l', 'm', 1), ('l', 'n', 1), ('l', 'o', 1), ('l', 'p', 1), ('l', 'q', 1), ('l', 'r', 1), ('l', 's', 1), ('l', 't', 1), ('l', 'u', 1), ('l', 'v', 1), ('l', 'w', 1), ('l', 'x', 1), ('l', 'y', 1), ('l', 'z', 1), ('m', 'a', 1), ('m', 'b', 1), ('m', 'c', 1), ('m', 'd', 1), ('m', 'e', 1), ('m', 'f', 1), ('m', 'g', 1), ('m', 'h', 1), ('m', 'i', 1), ('m', 'j', 1), ('m', 'k', 1), ('m', 'l', 1), ('m', 'n', 1), ('m', 'o', 1), ('m', 'p', 1), ('m', 'q', 1), ('m', 'r', 1), ('m', 's', 1), ('m', 't', 1), ('m', 'u', 1), ('m', 'v', 1), ('m', 'w', 1), ('m', 'x', 1), ('m', 'y', 1), ('m', 'z', 1), ('n', 'a', 1), ('n', 'b', 1), ('n', 'c', 1), ('n', 'd', 1), ('n', 'e', 1), ('n', 'f', 1), ('n', 'g', 1), ('n', 'h', 1), ('n', 'i', 1), ('n', 'j', 1), ('n', 'k', 1), ('n', 'l', 1), ('n', 'm', 1), ('n', 'o', 1), ('n', 'p', 1), ('n', 'q', 1), ('n', 'r', 1), ('n', 's', 1), ('n', 't', 1), ('n', 'u', 1), ('n', 'v', 1), ('n', 'w', 1), ('n', 'x', 1), ('n', 'y', 1), ('n', 'z', 1), ('o', 'a', 1), ('o', 'b', 1), ('o', 'c', 1), ('o', 'd', 1), ('o', 'e', 1), ('o', 'f', 1), ('o', 'g', 1), ('o', 'h', 1), ('o', 'i', 1), ('o', 'j', 1), ('o', 'k', 1), ('o', 'l', 1), ('o', 'm', 1), ('o', 'n', 1), ('o', 'p', 1), ('o', 'q', 1), ('o', 'r', 1), ('o', 's', 1), ('o', 't', 1), ('o', 'u', 1), ('o', 'v', 1), ('o', 'w', 1), ('o', 'x', 1), ('o', 'y', 1), ('o', 'z', 1), ('p', 'a', 1), ('p', 'b', 1), ('p', 'c', 1), ('p', 'd', 1), ('p', 'e', 1), ('p', 'f', 1), ('p', 'g', 1), ('p', 'h', 1), ('p', 'i', 1), ('p', 'j', 1), ('p', 'k', 1), ('p', 'l', 1), ('p', 'm', 1), ('p', 'n', 1), ('p', 'o', 1), ('p', 'q', 1), ('p', 'r', 1), ('p', 's', 1), ('p', 't', 1), ('p', 'u', 1), ('p', 'v', 1), ('p', 'w', 1), ('p', 'x', 1), ('p', 'y', 1), ('p', 'z', 1), ('q', 'a', 1), ('q', 'b', 1), ('q', 'c', 1), ('q', 'd', 1), ('q', 'e', 1), ('q', 'f', 1), ('q', 'g', 1), ('q', 'h', 1), ('q', 'i', 1), ('q', 'j', 1), ('q', 'k', 1), ('q', 'l', 1), ('q', 'm', 1), ('q', 'n', 1), ('q', 'o', 1), ('q', 'p', 1), ('q', 'r', 1), ('q', 's', 1), ('q', 't', 1), ('q', 'u', 1), ('q', 'v', 1), ('q', 'w', 1), ('q', 'x', 1), ('q', 'y', 1), ('q', 'z', 1), ('r', 'a', 1), ('r', 'b', 1), ('r', 'c', 1), ('r', 'd', 1), ('r', 'e', 1), ('r', 'f', 1), ('r', 'g', 1), ('r', 'h', 1), ('r', 'i', 1), ('r', 'j', 1), ('r', 'k', 1), ('r', 'l', 1), ('r', 'm', 1), ('r', 'n', 1), ('r', 'o', 1), ('r', 'p', 1), ('r', 'q', 1), ('r', 's', 1), ('r', 't', 1), ('r', 'u', 1), ('r', 'v', 1), ('r', 'w', 1), ('r', 'x', 1), ('r', 'y', 1), ('r', 'z', 1), ('s', 'a', 1), ('s', 'b', 1), ('s', 'c', 1), ('s', 'd', 1), ('s', 'e', 1), ('s', 'f', 1), ('s', 'g', 1), ('s', 'h', 1), ('s', 'i', 1), ('s', 'j', 1), ('s', 'k', 1), ('s', 'l', 1), ('s', 'm', 1), ('s', 'n', 1), ('s', 'o', 1), ('s', 'p', 1), ('s', 'q', 1), ('s', 'r', 1), ('s', 't', 1), ('s', 'u', 1), ('s', 'v', 1), ('s', 'w', 1), ('s', 'x', 1), ('s', 'y', 1), ('s', 'z', 1), ('t', 'a', 1), ('t', 'b', 1), ('t', 'c', 1), ('t', 'd', 1), ('t', 'e', 1), ('t', 'f', 1), ('t', 'g', 1), ('t', 'h', 1), ('t', 'i', 1), ('t', 'j', 1), ('t', 'k', 1), ('t', 'l', 1), ('t', 'm', 1), ('t', 'n', 1), ('t', 'o', 1), ('t', 'p', 1), ('t', 'q', 1), ('t', 'r', 1), ('t', 's', 1), ('t', 'u', 1), ('t', 'v', 1), ('t', 'w', 1), ('t', 'x', 1), ('t', 'y', 1), ('t', 'z', 1), ('u', 'a', 1), ('u', 'b', 1), ('u', 'c', 1), ('u', 'd', 1), ('u', 'e', 1), ('u', 'f', 1), ('u', 'g', 1), ('u', 'h', 1), ('u', 'i', 1), ('u', 'j', 1), ('u', 'k', 1), ('u', 'l', 1), ('u', 'm', 1), ('u', 'n', 1), ('u', 'o', 1), ('u', 'p', 1), ('u', 'q', 1), ('u', 'r', 1), ('u', 's', 1), ('u', 't', 1), ('u', 'v', 1), ('u', 'w', 1), ('u', 'x', 1), ('u', 'y', 1), ('u', 'z', 1), ('v', 'a', 1), ('v', 'b', 1), ('v', 'c', 1), ('v', 'd', 1), ('v', 'e', 1), ('v', 'f', 1), ('v', 'g', 1), ('v', 'h', 1), ('v', 'i', 1), ('v', 'j', 1), ('v', 'k', 1), ('v', 'l', 1), ('v', 'm', 1), ('v', 'n', 1), ('v', 'o', 1), ('v', 'p', 1), ('v', 'q', 1), ('v', 'r', 1), ('v', 's', 1), ('v', 't', 1), ('v', 'u', 1), ('v', 'w', 1), ('v', 'x', 1), ('v', 'y', 1), ('v', 'z', 1), ('w', 'a', 1), ('w', 'b', 1), ('w', 'c', 1), ('w', 'd', 1), ('w', 'e', 1), ('w', 'f', 1), ('w', 'g', 1), ('w', 'h', 1), ('w', 'i', 1), ('w', 'j', 1), ('w', 'k', 1), ('w', 'l', 1), ('w', 'm', 1), ('w', 'n', 1), ('w', 'o', 1), ('w', 'p', 1), ('w', 'q', 1), ('w', 'r', 1), ('w', 's', 1), ('w', 't', 1), ('w', 'u', 1), ('w', 'v', 1), ('w', 'x', 1), ('w', 'y', 1), ('w', 'z', 1), ('x', 'a', 1), ('x', 'b', 1), ('x', 'c', 1), ('x', 'd', 1), ('x', 'e', 1), ('x', 'f', 1), ('x', 'g', 1), ('x', 'h', 1), ('x', 'i', 1), ('x', 'j', 1), ('x', 'k', 1), ('x', 'l', 1), ('x', 'm', 1), ('x', 'n', 1), ('x', 'o', 1), ('x', 'p', 1), ('x', 'q', 1), ('x', 'r', 1), ('x', 's', 1), ('x', 't', 1), ('x', 'u', 1), ('x', 'v', 1), ('x', 'w', 1), ('x', 'y', 1), ('x', 'z', 1), ('y', 'a', 1), ('y', 'b', 1), ('y', 'c', 1), ('y', 'd', 1), ('y', 'e', 1), ('y', 'f', 1), ('y', 'g', 1), ('y', 'h', 1), ('y', 'i', 1), ('y', 'j', 1), ('y', 'k', 1), ('y', 'l', 1), ('y', 'm', 1), ('y', 'n', 1), ('y', 'o', 1), ('y', 'p', 1), ('y', 'q', 1), ('y', 'r', 1), ('y', 's', 1), ('y', 't', 1), ('y', 'u', 1), ('y', 'v', 1), ('y', 'w', 1), ('y', 'x', 1), ('y', 'z', 1), ('z', 'a', 1), ('z', 'b', 1), ('z', 'c', 1), ('z', 'd', 1), ('z', 'e', 1), ('z', 'f', 1), ('z', 'g', 1), ('z', 'h', 1), ('z', 'i', 1), ('z', 'j', 1), ('z', 'k', 1), ('z', 'l', 1), ('z', 'm', 1), ('z', 'n', 1), ('z', 'o', 1), ('z', 'p', 1), ('z', 'q', 1), ('z', 'r', 1), ('z', 's', 1), ('z', 't', 1), ('z', 'u', 1), ('z', 'v', 1), ('z', 'w', 1), ('z', 'x', 1), ('z', 'y', 1)]

(I’m happy for it be nested list rather than nested 3-tuple)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:20:03+00:00Added an answer on June 5, 2026 at 10:20 am

    My current solution, in case anyone is still interested:

    [x + (1,) for x in list(permutations(alphabet,2))+[(alpha, alpha) for alpha in alphabet]]
    

    Would still be interested if there is a more efficient way of doing this though…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

freeze the first two column but if I want to freeze the column dynamically
For example, I have two elements in an enum. I would like the first
I have two kind of elements <i rel=tooltip class='icon-ok'> <i title=Teste class='icon-info'> The first
I created two arrays. First the arrays show the elements with no order whatsoever.
I am trying to delete first two lines and last four lines from my
How to append received elements after certain index, so first two elements do not
Is there a CIL instruction to exchange the first two elements in the stack?
Is there a way to drop the first element of a 3 element tuple,
the first two keys are operational (leftmost key, and the black key right next
The first two paragraphs of this page explain that generic views are supposed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.