In this Python list program, we will take a user input as a list and find the difference between consecutive numbers in a given list with the help of the below-given steps.
Difference between consecutive numbers in list:
Steps to solve the program
- Take a list as input.
- Combine the elements from the list using the zip() function.
- Find the difference between the consecutive numbers in the list.
- Add that difference to a new list.
- Print the list to see the output.
Output :
Related Articles
Python program to calculate the average of the given list.
Python program to count integers in a given mixed list.
Python program to access multiple elements of the specified index from a given list.
Python program to check whether a specified list is sorted or not.
Python program to remove duplicate dictionaries from a given list.
Python program to check if the elements of a given list are unique or not.