In this Python list program, we will calculate the factorial of each item in the list with the help of the below-given steps.
Factorial of each item in list:
Steps to solve the program
- Take a list as input.
- Create a function for calculate factorial of a number.
- Create a new list and calculate the factorial of each number from the given list using list comprehension.
- Print the new list to see the output.
Output :
Related Articles
Python program to get a list of Fibonacci numbers from 1 to 20.
Python program to reverse all the numbers in a given list.
Python program to get palindrome numbers from a given list.
Python program to get a count of vowels in the given list.
Python program to get the list of prime numbers in a given list.
Python program to get a list with n elements removed from the left and right.