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
katovenus [111]
3 years ago
8

How does join work? a. You write separator.join('a', 'b', 'c', 'd', ...) where 'a', 'b', 'c', 'd' can be replaced with other str

ings, but isn't in a list. b. The separator must be a single character, and you use list.join(separator). c. You use separator.join(a_list) where a_list is a list of strings. d. You write a_list.join(separator) where a_list is a list of strings, and separator is a string.
Computers and Technology
1 answer:
Ulleksa [173]3 years ago
6 0

Answer:

c. You use separator.join(a_list) where a_list is a list of strings.

Explanation:

The join() is an in-built string method which returns a string concatenated with the elements of an iterable. It concatenates each element of an iterable (such as list, string and tuple) to the string and returns the concatenated string.

The syntax of join() is:

string.join(iterable)

From the above syntax, the string usually mean a separator and the iterable will be a string or list or tuple.

The answer is C.

c. You use separator.join(a_list) where a_list is a list of strings.

It is not A because the iterable could be a string. It is not D because the separator is outside not in the bracket.

You might be interested in
Write a short program that uses a for loop to populate an array. The array can store up to 10 integers. Modify the code slightly
mr Goodwill [35]

Answer:

  1. public class num16 {
  2.    public static void main(String[] args) {
  3.        //This code is designed to create and populate an array with
  4.        //Ten Integer values
  5.        Scanner in = new Scanner(System.in);
  6.        //Create the array
  7.        int [] intArray = new int [10];
  8.        //populating the array
  9.        for(int i =0; i<=10; i++){
  10.            System.out.print("Enter the elements: ");
  11.            intArray[i]= in.nextInt();
  12.        }
  13.        //Print the Values in the array
  14.        System.out.println(Arrays.toString(intArray));
  15.    }
  16. }

Explanation:

  • The above code looks like it will run successfully and give desired output.
  • But a bug has been introduced on line 9. This will lead to an exception called ArrayIndexOutOfBoundsException.
  • The reason for this is since the array is of length 10, creating a for loop from 0-10 will amount to 11 values, and the attempt to access index 10 for the eleventh element will be illegal
  • One way to fix this bug is to change the for statement to start at 1.
8 0
3 years ago
What is the GCF of 48mn and 81mn??<br> O 3mn<br> O 3m?n<br> O 48mºn<br> O 129mn
vitfil [10]

Answer:

A. 3mn

Explanation:

48 divides by 2 48 = 24 x 2

then =2 x 2 x 12

then = 2 x 2 x 2 x 2 x 3

greatest factorization is 3 therefore,

3mn is the answer

8 0
3 years ago
Program Convert Measurements:
worty [1.4K]

on the truth is that the walls

6 0
3 years ago
Why does my hp computer keep freezing when i move it?
ehidna [41]
There is probably a loose or broken cable, most likely connected to the hard drive
3 0
3 years ago
Which of the following is NOT essential for individuals to have to build their own web page?
natali 33 [55]
Linux. You do not need Linux as an operating system for your website.
5 0
4 years ago
Other questions:
  • An application that can be launched from my web browser is known as a _____. java applet spreadsheet cad software music applicat
    14·1 answer
  • Reflexes are basically "hard-wired" into the CNS. Anatomically, the basis of a reflex is an afferent neuron that synapses direct
    10·1 answer
  • A company has a network printer that is utilzed by several departments. Although the printer shows online and other departments
    11·1 answer
  • An _____image is an image that appears on a web page
    8·1 answer
  • Practice with CSS. a. Write the CSS for an HTML selector footer with the following characteristics: a light-blue background colo
    11·1 answer
  • Describe the five steps of the process of assessing personal strengths and weaknesses
    15·1 answer
  • Francis has created a new program. However, Francis used some objects from another program to run methods in the current program
    14·2 answers
  • And<br>Why the computer is called dilligent<br>Versatile machine?give long answer ​
    10·1 answer
  • a certain kind of fish in the ocean eats only algae. a seal eats this fish a bear eats the seal .when the bear dies,it’s recycle
    6·1 answer
  • High speed printer that produce higher quality printouts but are more expensive is
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!