6.
Create
a
dictionary
of
Colour
where
keys
are
10,20,30
and
the
values
are
Red
Green
Orange
Answers
Answered by
0
Explanation:
The data type list is an ordered sequence which is
mutable and made up of one or more elements. Unlike a
string which consists of only characters, a list can have
elements of different data types such as integer, float,
string, tuple or even another list. A list is very useful to
group elements of mixed data types. Elements of a list
are enclosed in square brackets and are separated by
comma.
Example 4.1
#list1 is the list of six even numbers
>>> list1 = [2,4,6,8,10,12]
>>> print(list1)
[2, 4, 6, 8, 10, 12]
Similar questions