Python Forum
Group List Elements according to the Input with the order of binary combination
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Group List Elements according to the Input with the order of binary combination
#5
(Jan-27-2021, 02:36 AM)Larz60+ Wrote: To achieve list as you present, what are the values for number?
Number (for these values ) is an integer and its value is 2 for list that I presented above. So I have 4 variable(number*2) and I will have pair binary combinations of these 4 variables (a,b),(a,bp),(ap,b),(ap,bp)

If number would be 3, this time I would have 6 variable and as a list I would have the triple binary combination of these 6 variables : (a,b,c),(a,b,cp),(a,bp,c),(a,bp,cp),(ap,b,c),(ap,b,cp),(ap,bp,c),(ap,bp,cp)
Reply


Messages In This Thread
RE: Group List Elements with the order of binary combinations - by quest_ - Jan-27-2021, 09:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  difference between forms of input a list to function akbarza 6 2,624 Feb-21-2024, 08:02 PM
Last Post: bterwijn
  unable to remove all elements from list based on a condition sg_python 3 1,832 Jan-27-2024, 04:03 PM
Last Post: deanhystad
  Copying the order of another list with identical values gohanhango 7 2,889 Nov-29-2023, 09:17 PM
Last Post: Pedroski55
Question mypy unable to analyse types of tuple elements in a list comprehension tomciodev 1 1,815 Oct-17-2023, 09:46 AM
Last Post: tomciodev
  Why do I have to repeat items in list slices in order to make this work? Pythonica 7 3,177 May-22-2023, 10:39 PM
Last Post: ICanIBB
  Checking if a string contains all or any elements of a list k1llcod3 1 5,395 Jan-29-2023, 04:34 AM
Last Post: deanhystad
  user input values into list of lists tauros73 3 2,114 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  How to change the datatype of list elements? mHosseinDS86 9 3,987 Aug-24-2022, 05:26 PM
Last Post: deanhystad
  ValueError: Length mismatch: Expected axis has 8 elements, new values have 1 elements ilknurg 1 8,626 May-17-2022, 11:38 AM
Last Post: Larz60+
Question Change elements of array based on position of input data Cola_Reb 6 3,631 May-13-2022, 12:57 PM
Last Post: Cola_Reb

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020