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
What is a way to minimize technical problems with your computer
Gala2k [10]
Buy or get new software that protects ur pc, such as a "fixmestix" or just download new software or use a disc 
4 0
3 years ago
5. What are some situations where you might find it useful to use the “!” symbol in a program?
svlad2 [7]

Answer:

The most common use of symbols by programmers is for performing language reflection (particularly for callbacks), and most common indirectly is their use to create object linkages. In the most trivial implementation, they have essentially named integers (e.g. the enumerated type in C).
<u>Help Me By Marking Me as Brainlist ...</u>

5 0
2 years ago
Read 2 more answers
A(n) ____ is a computer that requests and uses network resources from a(n) ____.
Crazy boy [7]

A(n) client exists a computer that requests and utilizes network resources from a(n) server.

<h3>What is a computer network?</h3>
  • A computer network is a collection of computers that share resources that are available on or provided by network nodes.
  • The computers communicate with one another via digital links using standard communication protocols.
  • These links are made up of telecommunication network technologies that are based on physically wired, optical, and wireless radio-frequency means and can be configured in a variety of network topologies.
  • Nodes in a computer network can be personal computers, servers, networking equipment, or other specialized or general-purpose hosts.
  • They can be identified by network addresses and have hostnames.
  • Local-area networks (LANs) and wide-area networks (WANs) are the two basic network types.
  • A(n) client exists a computer that requests and utilizes network resources from a(n) server.

To learn more about computer network, refer to:

brainly.com/question/8118353

#SPJ4

6 0
1 year ago
There are ____ standard colors for text in a theme.
soldier1979 [14.2K]
In microsoft powerpoint there are 2 or two standard colors for text in a theme. If you use a theme on your presentation, a theme is always equipped with two types of colors for the text, because it gives you more options on what color suits your text and blends with the theme perfectly.
7 0
3 years ago
4) Tables in HTML are the attractive way of representing information in the form of rows and WMS.
olchik [2.2K]

Answer:

1) if "<table>" is an option then that's the answer

2) <HTML>

3) <tr>

4) border-collapse collapse

5) <caption>

Explanation:

Currently studying HTML and these are the tags I'm familar with.

4 0
2 years ago
Other questions:
  • True or false
    7·1 answer
  • What the benefit is of folder when working with files
    8·1 answer
  • A student who sets a date to finish a goal is using which SMART goal? relevant, specific, attainable or timely
    10·1 answer
  • You need to prevent the use of tftp through your firewall. which port would you block?
    9·1 answer
  • The Internet may best be compared to a/an
    8·1 answer
  • Union Carbide accident safety policies and procedures were not followed was due to
    14·1 answer
  • A total stranger is trolling Jack online. He’s offended and annoyed. How can Jack stop the troll in his or her tracks? (5 points
    10·2 answers
  • Sypherpk is good go sub 2 him
    6·2 answers
  • 1. As part of your community, your school, and your neighbourhood, how else does ICT have an impact on social
    11·1 answer
  • 6.23 Lab training: Unit tests to evaluate your program Auto-graded programming assignments may use a Unit test to test small par
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!