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
crimeas [40]
3 years ago
5

We will extend this idea to streams. Write a function called rle that takes in a stream of data, and returns a corresponding str

eam of two-element lists, which represents the run
Computers and Technology
1 answer:
yarga [219]3 years ago
3 0

Answer:

def rle(data_stream ):

     with open( "data_stream" ) as file:

           container= [ ]

           two_itemlist= [ ]

           while True:

                 container.append( file.readlines )

           file.close( )

                 while container == True:

                         value= container.pop(0)

                         split_value= value.split( " " )

                         while split_value == True:

                              while len( two_itemlist) < 2:

                                    holder = split_value.pop( 0 )

                                    two_itemlist.append( holder )

                              yield two_itemlist

new_list = rle ( new_file )

Explanation:

In the solution above, the defined function is a generator, as it continuously returns a two-element list.

You might be interested in
In Python, arrays are usually reserved for
Katen [24]
It would be the first one! Hope this helps have a great day
5 0
3 years ago
Anyone help me with number 41.
Katarina [22]
It is te = t I yhink
8 0
3 years ago
Type the correct answer in each box. Spell all words correctly. Programmers utilize to convert a program from language, which is
natulia [17]

Answer: Binary

Explanation: Binary is a system of 1s and 0s that tell the system when and where to flip a digital switch very fast

3 0
3 years ago
Employees information system source code ..please ​
Alexxx [7]

Answer:

def greetuser(username)

6 0
3 years ago
Holly needs to create an online survey to find out what people want and is
Dahasolnce [82]

Answer:

The correct answer is (A).The server application will allow the customers to select their  answers on the survey.

Explanation:

Since Holly needs to design an online survey which is a web based application, in finding out what people need or want, In this process, the role or function of the server is to enable customers to select their own choice of answers on the survey that will be created online.

4 0
4 years ago
Other questions:
  • A set of programs that enable hardware to process data is
    6·1 answer
  • The linux command _______ can be used to list the current disk devices connected to the computer.
    8·1 answer
  • A cover letter is written directly to (a) _____.
    13·1 answer
  • Which term is used for a formal, documented process that describes when and how official project documents may be modified, the
    14·2 answers
  • Which one of the following statements referring to mobile Internet
    5·2 answers
  • Worth 30 pts
    9·2 answers
  • What type of system is associated with weather that has lots of clouds and thunderstorms with the possibility of tornadoes?
    10·1 answer
  • Write the code to produce a for loop that counts down from 20 to 0 by 2’s and prints the number each time it goes through the lo
    15·1 answer
  • Adios brainly, you were sh.t sometimes, but you had your moments, wont be posting that much take my points away i d c
    6·2 answers
  • Which data type does not allow duplicate values-python
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!