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
scZoUnD [109]
3 years ago
13

Define a function below, filter_only_strs, which takes a single argument of type list. Complete the function so that it returns

a list that contains only the strings from the original list and no other data. It is acceptable to return an empty list if there are no strings in the original list.
Computers and Technology
1 answer:
Crank3 years ago
5 0

Answer:

In Python:

def filter_only_str(mylist):

   for x in mylist:

       if isinstance(x, str) == False:

           mylist.remove(x)

   return mylist

Explanation:

The function is not given. So, I write from scratch.

In Python:

This defines the function

def filter_only_str(mylist):

This iterates through the list

   for x in mylist:

This checks if list item is not string

       if isinstance(x, str) == False:

If true that list item is not string, the item is removed from the list

           mylist.remove(x)

Return list

   return mylist

You might be interested in
Instructions:Select the correct answer.
taurus [48]

Answer:

I'm years late, but the answer is A.) Slide Layout...

Explanation:

-Slide layout changes the layout and make-up of the slide(s)

-It's not B. because Shapes is just to insert shapes onto the slide(s)

-It's not C. because Animation is to modify the shapes and add animation to them.

-It's not D. because Slide Transition is to modify the way the presentation goes from slide to slide when being presented.

6 0
4 years ago
Which concept often comes in conflict with privacy rights?
likoan [24]
The correct answer is C.
8 0
3 years ago
Write a program that reads a floating-point number from the user and prints "zero", "positive" or "negative"
Lorico [155]
```
#!/usr/local/bin/python3

foo = float( input( "Enter a number: " ) )
if( foo < 0.0 ):
    print( "negative" )
elif( foo > 0.0 ):
    print( "positive" )
else
    print( "zero" )

exit( 0 )
```

3 0
3 years ago
What is hub.pls ans from pic. for computers​
schepotkina [342]

<h3>what is hub? </h3>

<h3>✅An Ethernet hub, active hub, network hub, repeater hub, multiport repeater, or simply hub is a network hardware device for connecting multiple Ethernet devices together and making them act as a single network segment.</h3>
5 0
3 years ago
Read 2 more answers
Use ________ resolution when recording human speech in an audio file.
Reil [10]
<span>Use 8-bit resolution when recording human speech in an audio file.
</span><span>The </span>resolution<span> of </span>8 bits<span> can encode an analog input to one in 256 different levels. The reason why 256 levels is because 2^8</span><span> = 256.
</span>The analog to digital converter (ADC) <span> represents the analog input as a digital word.</span>
6 0
3 years ago
Other questions:
  • On a hard disk each track is divided into invisible wedge-shaped sections called _______
    15·1 answer
  • Helping people keep track on things is the purpose of_____ A database B table C query D form​
    12·1 answer
  • What is a googleplex?
    7·1 answer
  • When at the rightmost cell in a row, press the ENTER key to move to the first cell in the next row; do not press the TAB key.
    14·1 answer
  • Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "To
    5·1 answer
  • Describe the following types of Cloud services:
    11·1 answer
  • Not sure where I should ask this sorry
    15·1 answer
  • Jared has trouble remembering when his assignments are due, and he wants to keep reminders on his computer. Which online note-ta
    10·2 answers
  • What is the role of UPS in Computer security?<br>4 marks answer​
    12·1 answer
  • The capacity of your hand drive is measured in​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!