semvec/pypi-packages huggingface dataset:
num-tool 0.0.20
A basic number tools package
License: MIT
Keywords: python,random,number,tools


# num_tool
## _Basic number tools package_

## Features:

**Random numbers list:**
```python
from num_tool import random_num_list
print(random_num_list(0, 5, length=20))
```

- **returns a list with length random values in the range a, b**


Example:
```py
[5, 0, 1, 0, 0, 1, 5, 3, 3, 3, 5, 3, 1, 0, 3, 0, 5, 1, 2, 4]
```

**Count Duplicates:**

```py
from num_tool import count_duplicates
print(count_duplicates([0, 0, 1, 1, 2, 1, 3, 2]))
```

- **returns a dictionary with the duplicates**

Example:
```py
{0: 2, 1: 3, 2: 2, 3: 1}
```

**Remove Duplicates:**

```py
from num_tool import remove_duplicates
print(remove_duplicates([0, 0, 1, 1, 2, 1, 3, 2]))
```

- **returns the list without duplicates**

Example:
```py
[0, 1, 2, 3]
```

**is prime:**

```py
from num_tool import is_prime
print(is_prime(3))
```

- **returns True if the number given is a prime number**

Example:

```py
True
```

**is even:**

```py
from num_tool import is_even
print(is_even(10))
```

- **returns True if the number given is an even number**

Example:

```py
True
```