1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OleMash [197]
4 years ago
13

Python:

Engineering
1 answer:
stira [4]4 years ago
4 0

Answer:

# Python Program to Print  

# all subsets of given size of a set  

 

import itertools  

 

def findsubsets(s, n):  

   return list(itertools.combinations(s, n))  

 

# Driver Code  

s = {1, 2, 3}  

n = 2

 

print(findsubsets(s, n))

-----------------------------------------------

# Python Program to Print  

# all subsets of given size of a set  

 

import itertools  

# def findsubsets(s, n):  

def findsubsets(s, n):  

   return [set(i) for i in itertools.combinations(s, n)]  

     

# Driver Code  

s = {1, 2, 3, 4}  

n = 3

 

print(findsubsets(s, n))

-------------------------------------------------------------

# Python Program to Print  

# all subsets of given size of a set  

 

import itertools  

from itertools import combinations, chain  

 

def findsubsets(s, n):  

   return list(map(set, itertools.combinations(s, n)))  

     

# Driver Code  

s = {1, 2, 3}  

n = 2

 

print(findsubsets(s, n))

You might be interested in
PLZ ANSWER SOON!!!
slava [35]

Answer:

You're answer would be "D. Perform all of the above"

Explanation:

Have a Blessed Day (Mark Brainliest!)

4 0
3 years ago
Read 2 more answers
Three ways to advertise for AVID
lilavasa [31]

Answer:

newspaper, radio, televison

Explanation:

had avid in 7th :)

8 0
3 years ago
Read 2 more answers
Which of the following is an example of an observation?
Novay_Z [31]
The monkey is brown!
6 0
3 years ago
Read 2 more answers
Why doesn’t the servant kill the child oedipus as he was ordered to do
Anni [7]
The Servant does not kill the child Oedipus as he was ordered to do because "He pitied the child" based on the Oedipus Rex story. The servant was ordered to kill the child because of the prophecy that predicted King Laius' death. The king already had attempted to hurt Oedipus by piercing Oedipus's ankle. However, the servant did not finish the job and he rather saved the baby Oedipus.
6 0
3 years ago
Basic concepts surrounding electrical circuitry?​
Elanso [62]
Hopefully that helps you out and is this for history or science?

3 0
3 years ago
Other questions:
  • What is the weight in pounds of a gallon of oil that has a specific gravity of .86
    8·1 answer
  • What are the two types of pumps in compressors?
    5·2 answers
  • You have just finished your OST takeoffs for a single-story home and found 175 LF of interior walls with 2x6 studs 14" OC. The h
    14·1 answer
  • A two-stage compression refrigeration system operates with refrigerant-134a between the pressure limits of 1.4 and 0.10 MPa. The
    6·1 answer
  • A piston-cylinder device contains 0.1 [kg] of air at a pressure of 100 [kPa] and a temperature of 400 [K] that undergoes an expa
    14·1 answer
  • Please help due by end of the day!!!! I need the code for 5 and 7, Milky Way in coderz. will mark brainliest answer.
    10·2 answers
  • You are NASA. Build a space station on Mars that could support humans to live in for an extended period of time.
    9·1 answer
  • A service station has 10 employees who are responsible for checking in customers who bring their cars in to be serviced. The emp
    14·1 answer
  • What information you would gain by watching the video. Plz Help due today.
    6·1 answer
  • with a digital system, if you have measured incorrectly and use too low of a kvp for adequate penetration, what do you need to d
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!