Question: Read the inputs and create a list with 5 numbers and print it: 1 2 3 4 4 [ 1 , 2 , 3 ,
Read the inputs and create a list with numbers and print it:
Now, print only the first elements of your list using slicing.
Now, print the last elements of your list using negative indexing.
Read another input from the user and find the number of occurrences of that number on the previously created list.
The number appears times in the list.
PS: Loops are not allowed for solving this question.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
