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
konstantin123 [22]
3 years ago
8

Implement the function couple, which takes in two lists and returns a list that contains lists with i-th elements of two sequenc

es coupled together. You can assume the lengths of two sequences are the same. Try using a list comprehension.
Computers and Technology
1 answer:
In-s [12.5K]3 years ago
7 0

Answer:

couple.py

def couple(s1,s2):

  newlist = []

  for i in range(len(s1)):

      newlist.append([s1[i],s2[i]])

  return newlist

s1=[1,2,3]

s2=[4,5,6]

print(couple(s1,s2))

enum.py

def couple(s1,s2):

  newlist = []

  for i in range(len(s1)):

      newlist.append([s1[i],s2[i]])

  return newlist

def enumerate(s,start=0):

  number_Array=[ i for i in range(start,start+len(s))]

  return couple(number_Array,s)

s=[6,1,'a']

print(enumerate(s))

print(enumerate('five',5))

Explanation:

You might be interested in
HELP ASAP. Which of the following is the best example of an installation issue? A computer can’t find the file that it needs to
Svetlanka [38]

Answer:

The question is sufficiently broad that multiple answers would be likely candidates.  I would say though that the most likely "correct" answer is the last one - a program is incompatible with the OS.  That's definitely an issue with installing the wrong package.

Explanation:

With the first answer - A computer can't find the file it needs to perform an OS operation - that's more likely due to file corruption, accidental deletion, or some other event like that.  It could potentially be an issue with installation of the OS, but I doubt that's what's meant.

With the second answer - A computer displays errors and gives you a BSOD - this could be any number of issues, but installation is not the best candidate.

With the third - A user made an error while trying to set up a software - that depends on what they mean by "set up".  If they mean installation, then that's an acceptable answer.  If on the other hand they mean configuration, then it's not.

With the last - A computer program is not compatible with the system's OS - That is very definitely an issue with installation as far as it being installed on the wrong OS goes.  One could however say that the installation was successful, and that the choice of which package to install was a human error.

6 0
3 years ago
Which bitwise operation has the same effect as multiplying a by 16?
Shalnov [3]
<span>Jun 15, 2011 - Multiplication and division can be achieved using bit operators, for example .... I discovered pretty much the same thing for Sun CC close to 20 years ago. ... Just to add a rough estimation: On a typical 16-Bit processor ..... Doing it yourself willaffect readability and possibly have no effect on performance.</span><span>
</span>
4 0
3 years ago
Read 2 more answers
If a packet gets "sucked down a black hole" (figuratively speaking) and is not received by its sender, and no message is sent ba
Serga [27]

Answer:

iso

Explanation:

3 0
2 years ago
The main file type used when saving a powerpoint presentation is the?
weeeeeb [17]
I am pretty sure it is the XML format
6 0
3 years ago
Who was the inventor of the iPhone?
Over [174]

Steve Jobs and his team at Apple invented the iPhone.

6 0
3 years ago
Read 2 more answers
Other questions:
  • The most popular input device of a computer is a(n) ____.
    6·1 answer
  • Witch word in the sentence is a noun? the food he is cooking smells delicious.
    7·1 answer
  • How do you plan to keep your personal and professional connections and activity seperate on various social media platforms?
    15·1 answer
  • As a trainer for Exempla Healthcare, Tina is faced with many challenges to properly training her new hires. There are over 40 di
    15·1 answer
  • Which building-block feature is available in the Text grouping on the Insert tab?
    14·1 answer
  • Enumeration is defined as the process of extracting user names, machine names, network resources, shares, and services from a sy
    13·1 answer
  • Hey! Would you please help me do this program?
    14·1 answer
  • Shelbi likes to play video games on an old Nintendo video game system. No matter how old the cartridge, when she inserts it into
    11·2 answers
  • 1.Blocul care asigura impedanta necesara la intrarea aparatului de masurat numeric este:
    13·1 answer
  • What is a benefit of an account with interest?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!