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
babunello [35]
3 years ago
13

Write a function that takes, as an argument, a list, identified by the variable aList. If the list only contains elements contai

ning digits (either as strings as non-negative integers), return the string formed by concatenating all of the elements in the list (see the example that follows).
Computers and Technology
1 answer:
Genrish500 [490]3 years ago
5 0

Answer:

The function is as follows:

def concList(aList):

   retList = ""

   for i in aList:

       if(str(i).isdigit()):

           retList+=str(i)

       else:

           retList = "Not digits"

           break;

   return retList

Explanation:

This defines the function

def concList(aList):

This initializes the return string to an empty string

   retList = ""

This iterates through aList

   for i in aList:

This converts each element of the list to an empty list and checks if the string is digit

       if(str(i).isdigit()):

If yes, the element is concatenated

           retList+=str(i)

If otherwise

       else:

The return string is set to "No digits"

           retList = "Not digits"

And the loop is exited

           break;

This returns the return string

   return retList

You might be interested in
Can you help me with this question please ​
Flura [38]
D. half period because it is the converting of bidirectional current flow to unidirectional currency flow.
3 0
3 years ago
How many of you got the right answer from this app​
Flura [38]
Actually, a lot, and it’s especially helpful when the answer is expert verified
8 0
3 years ago
Which of the following is not a type of Internet Job Board? Options Resume Blaster Professional Association Target Applicants We
mr Goodwill [35]
The answer is : Weighted application blanks

Job board is a type of system in which the employers set up a list of requirements for the job hunter

Weighted Application blanks is used to to collect background information from the job applicants, which is not a part of job board
6 0
3 years ago
When you collaborate or meet with a person or group online, it is called
stiks02 [169]
It is called social networking.
3 0
3 years ago
Read 2 more answers
Hide Time Remaining A
Maslowich

Answer:

True

Explanation:

The class Math include mathematical functions such as sin(), cos(), tan(), abs(), etc

If the given statement is not written, each of the math function will be written as (take for instance, the sin() function):

<em>Math.sin()</em>

<em></em>

But after the statement has been written (it implies that the Math library has been imported into the program) and as such each of the mathematical function can be used directly.

So instead of <em>Math.sin(), </em>you write <em>sin()</em>

5 0
3 years ago
Other questions:
  • "Which of the following will help protect against a brute force attack?
    11·1 answer
  • You have an insurance policy with a $300 premium and a $500 deductible. How much should you expect to pay the insurance company
    15·1 answer
  • Your mom wants to purchase a computer. She has heard about how the Windows 8 operating system is best-geared for a touch-enabled
    8·1 answer
  • 3. The invention of the transistor was important to the development of computers because it
    5·1 answer
  • A girl scout troop with 10 girl scouts and 2 leaders goes on a hike. When the path narrows, they must walk in single file with a
    12·1 answer
  • After compiling source code, which command still needs to be run in order to copy the newly compiled binaries into a directory l
    5·1 answer
  • Send me the answers<br>​
    15·1 answer
  • RUNTIME ORGANIZATION AND DATA LAYOUT.​
    8·1 answer
  • Effective online learning method for students
    5·1 answer
  • Your development team is planning to host a development environment on the cloud. This consists of EC2 and RDS instances. This e
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!