Giving a List a Bunch of Values at Once¶

We’re going to learn how to easily give starting values to a list when creating it!

Download the provided code, and get it to run.

What You Should See¶

The first array is filled with the following values:
	alpha bravo charlie

After you add in the code you’re supposed to, you should see something more like this:

The first list is filled with the following values:
	alpha bravo charlie delta echo

The second list is filled with the following values:
	11 23 37 41 53

What You Should Do on Your Own¶

Assignments turned in without these things will receive no credit.

  1. The first list only has three values in it. Add two more, for a total of five.

  2. Create a second list of ints, and give it five starting values, too.

  3. Print the second list.


©2021 Daniel Gallo

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.

Creative Commons License

Adapted for Python from Graham Mitchell’s Programming By Doing