May 4, 2018 in Python 1,457 views

## 1 answer to this question.

You can find factorial by many ways. Either you use "math" module or write a complete function. For example: Calcuating the factorial of number 5

```import math
print(math.factorial(5))

```

OR

```def factorial(n):

if n == 0:

return 1

else:

return n * factorial(n-1)

factorial(5)    ```

Output - 120

• 750 points

## How to find exponent of a number in Python?

Yes you can do it using the ...READ MORE

## How to find the number of a list item ?

Given a list ["foo", "bar", "baz"] and ...READ MORE

–1 vote

## How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

–1 vote

## How to filter out any digit that contains odd number in a range of number in Python?

n = list(range(10)) b = list(filter(lambda i:i%2!=0,n)) print(b) READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## Lowercase in Python

You can simply the built-in function in ...READ MORE