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
Marrrta [24]
3 years ago
9

How to create a function, called separate_int_and_str, which takes in a list and separates out the integer values and strings in

to their own lists in python?
Computers and Technology
1 answer:
gregori [183]3 years ago
4 0

Answer:

program :

def separate_int_and_str(list_1):# function to seprate the list.

   str_list=[] #list to hold the

   int_list=[]#list which holds the integer value.

   for x in list_1: #for loop to extract the list.

       if(type(x)==str): #if condition to check the type of the element.

           str_list.append(x)#create a list for the string value.

       elif(type(x)==int): #check condition for th einteger value.

           int_list.append(x)#create a list for the integer value.

Explanation:

  • The above-defined function is written in the python language, which used the code to separate the list for integer and the string value.
  • There are two lists define in the function which holds the integer and the string value separately.
  • There is a 'for' loop which scans the element of the list and checks the list by the help of type function which tells the class of the element.
  • Then if the type function states that the element is from the strong class, it will assign the element on the string list otherwise it assigns the element in the integer list.
You might be interested in
In contrast to data in a database, data in a data warehouse is described as subject oriented, which means that it _____.
jonny [76]

Answer:

focuses on a certain subject

Explanation:

it means that it focuses on that one subject and none others

Hope it helps c:

6 0
3 years ago
Which of the following is not a component of Google Display ads' value proposition?
Evgesh-ka [11]

Answer:

D. Search.

Explanation:

Google search engine is a engine used in browsers to seek of information related to the search values inputted by the user. This search engine is used in varieties of browsers like google chrome, mozilla firefox, phoenix etc, this is because it has a wide range of Google community web servers to get information.

Google Display ads value proposition is an advertising platform that takes advantage of the enormous google community on the internet of advertise client products and services across thousands of websites.

It uses the intent of the costumer, machine learning and performance of a website to advertise products, it does not need a search component since it is advertised automatically on an active website.

6 0
3 years ago
Ted wants to go out to a neighborhood park and shoot pictures of dew drops on grass. He wants to get a low-level angle of the de
daser333 [38]

i believe that the answer to this question is c


8 0
3 years ago
Read 2 more answers
Need help this is for my technology class. We are doing a city research paper but it’s the rough draft and I’m doing la. But I c
serious [3.7K]
One business is " Backwards Beekeepers," Your welcome. >,<
5 0
3 years ago
Read 2 more answers
Differences between placeholders and textbook in PowerPoint ​
Igoryamba

Answer:

fifthly, if it is an empty box. it disappear completely. sixth the size of a text box changes depending on the length of a text that we type . this is in contrast with a place holder box where changes are made of the font of the text

Explanation:

mark me a brainlist

4 0
3 years ago
Other questions:
  • Why is it so important that you know how much traffic dfs replication requires?
    13·2 answers
  • If you delete an imessage does the other person see it
    12·1 answer
  • The approved detail design resulting from the __________ serves as a basis for making the decision to begin production.
    8·1 answer
  • Let's play Silly Sentences!
    10·1 answer
  • You can add additional design elements to a picture by adding a color background, which is accomplished by using what Paint feat
    12·1 answer
  • 9. Which of the following is the<br>leading use of computer?​
    13·1 answer
  • Can maybe someone play with me on Over-watch on the Xbox?
    8·1 answer
  • Brainliest forrrrrrr frrrrrew right herrreeee
    14·1 answer
  • Write a program that asks the user for the name of a file. The program should display the contents of the file with each line pr
    13·1 answer
  • What are the values of the digital signal when sending in physical layer?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!