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
allochka39001 [22]
2 years ago
6

The function below takes a single argument: data_list, a list containing a mix of strings and numbers. The function tries to use

the Filter pattern to filter the list in order to return a new list which contains only strings longer than five characters. The current implementation breaks when it encounters integers in the list. Fix it to return a properly filtered new list.
Computers and Technology
1 answer:
Doss [256]2 years ago
6 0

Answer:

def filter_strings(data_list):

   string_list = []

   for s in data_list:

       if type(s) == str and len(s) > 5:

           string_list.append(s)

   return string_list

Explanation:

Create a function called filter_strings that takes data_list as a parameter

Initialize a new list to hold the strings that are longer than 5 characters

Initialize a for loop that iterates through the data_list

Check the elements if they are string - use type function, and if their length is greater than 5 - use len function. If an element satisfies the both conditions, put it to the string_list

When the loop is done, return the string_list

You might be interested in
Queries are questions true or false?
makkiz [27]
True

…………………………………………………..
5 0
3 years ago
An independent penetration testing company is invited to test a company's legacy banking application developed for Android phone
LenaWriter [7]

In the case above, the company can prevent this from happening in the public Internet through the Use certificate pinning.

<h3>Should a person use certificate pinning?</h3>

Mobile applications are known to be one that often make use of   certificate or also public key pinning so that they can be able to make sure that communications are secure.

Hence it is one that  is often implemented if  the developer of the application is said to be require to validate the remote host's identity or if operating in a harsh environment.

Hence, Certificate pinning hinders which certificates are considered valid for a any kind of website,  and as such, In the case above, the company can prevent this from happening in the public Internet through the Use certificate pinning.

Learn more about certificate from

brainly.com/question/1874937

#SPJ1

4 0
1 year ago
ERP implementation probably will not require:
Mamont248 [21]

Answer:

c. just a few weeks to install.

Explanation:

ERP is known as Enterprise Resource Planning.ERP implementation involves software installation, transfer of the financial data to the new system, configuration of the users and processes and training the users on the software.

It also involves upgrades after installation,cross-functional teams, intensive training, high funding for both initial cost and maintenance. This whole process usually takes place between 6 months to 2 years. This makes option C which says it takes few weeks to install incorrect.

3 0
3 years ago
Read 2 more answers
To specify your preferred colors, fonts, and effects for a document, which of the following should be done?
Irina-Kira [14]

Answer: crest custom theme

Explanation:

8 0
2 years ago
Read 2 more answers
Research the disadvantages of the computer and explain them.​
lisabon 2012 [21]

Answer:

Too much sitting-affects the back and makes our muscles tight

Carpal tunnel and eye strain-moving your hand from your keyboard to a mouse and typing are all repetitive and can cause injuries

Short attention span and too much multitasking-As you use a computer and the Internet and get immediate answers to your questions and requests, you become accustomed to getting that quick dopamine fix. You can become easily frustrated when something doesn't work or is not answered in a timely matter.

3 0
3 years ago
Other questions:
  • Cobbling together elements from the previous definition and whittling away the unnecessary bits leaves us with the following def
    7·1 answer
  • Your friend sends you a photograph of his son. you want to enlarge the photograph. which program type will you use to make this
    15·1 answer
  • Which of the following commands would I use to begin a new presentation?
    14·1 answer
  • 1. A device that can be used to insert data into a computer or other computational devices is
    6·2 answers
  • To implement the various placement algorithms discussed for dynamic partitioning (see Section 7.2 ), a list of the free blocks o
    11·1 answer
  • I need help. I wanna help a friend by giving him my powerpoint but I dont want him to steal my work. Is their anyway to restrict
    8·1 answer
  • Help giving points mark BRAINLEST
    5·1 answer
  • A sales transaction was coded with an invalid customer account code (XXX-XX-XXX rather than XXX-XXX-XXX). The error was not dete
    12·1 answer
  • What do I do if my friend wants me to watch a video at my house?
    8·2 answers
  • Write an enhanced for loop that multiplies all elements in an int[] array named factors, accumulating the result in a variable n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!