Follow these steps: ● Create a new Python file in this folder called list_types.py. ● Imagine you want to store the name
Posted: Sun May 15, 2022 8:17 am
Follow these steps:
● Create a new Python file in this folder called
list_types.py.
● Imagine you want to store the names of three of your friends in a
list of
strings. Create a list variable called friends_names, and write the
syntax to
store the full names of three of your friends.
● Now, write statements to print out the name of the first friend,
then the
name of the last friend, and finally the length of the list.
● Now, define a list called friends_ages that stores the age of
each of your
friends in a corresponding manner, i.e., the first entry of this
list is the age
of the friend named first in the other list.
● Create a new Python file in this folder called
list_types.py.
● Imagine you want to store the names of three of your friends in a
list of
strings. Create a list variable called friends_names, and write the
syntax to
store the full names of three of your friends.
● Now, write statements to print out the name of the first friend,
then the
name of the last friend, and finally the length of the list.
● Now, define a list called friends_ages that stores the age of
each of your
friends in a corresponding manner, i.e., the first entry of this
list is the age
of the friend named first in the other list.