Create a python list containing the following elements and display each item one by one on the
screen. 4 Mangoes, 3 Apples, 2 Oranges, 1 Boy
plz answer
Answers
Answer:
screen 4 mango
3 apples
2 organes
1 boy
Answer: 4 fruit screensaver
three pears
two organs
1 boy
Explanation: In Python, a group of components is referred to as a list.
Python lists are very similar to arrays, but the major distinction is that an array can only store one type of element while a list can store multiple types of elements.
Lists can be changed. (changeable).
Because lists are dynamic, their extent is not set. Lists are denoted by a square frame[, divided by commas]. In Python, a class is formed in which the user defines an entity that can be a part of a list with various data types. In Python, we can use add for class instances to list to create a collection of objects. After executing the preceding code (creating a list of objects), display "(val.empname, val.empid)" and the result will be "Rohan 15 Ram 30 Sohan 34" as a list. For making a collection of objects in Python, see the image below.
Learn more about Python from here;
https://brainly.in/question/7697308
https://brainly.in/question/11818321
#SPJ6