a
containing (floating point) numbers. Now create a new list b
with each element of a
squared.[a1, a2, ...]
and [b1, b2, ...]
to a list of tuples: [(a1, b1), (a2, b2), ...]
observations = {
'forest': ['cow', 'cow', 'sheep', 'sheep', 'pig', 'sheep'],
'plains': ['horse', 'horse', 'sheep', 'horse'],
'jungle': ['ocelot', 'parrot', 'sheep', 'parrot'],
}
Try to answer with code: