Update descriptions

Update description in cast_list
Update description in fibonacci
Update description in all_equal
This commit is contained in:
Angelos Chalaris
2020-01-03 12:55:56 +02:00
parent af304c4b62
commit 9d04ede6c5
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ title: all_equal
tags: list,beginner
---
Check if all elements in a list are equal.
Checks if all elements in a list are equal.
Use `[1:]` and `[:-1]` to compare all the values in the given list.

View File

@ -3,7 +3,7 @@ title: cast_list
tags: utility,list,beginner
---
Casts the provided value as an array if it's not one.
Casts the provided value as a list if it's not one.
Use `isinstance()` to check if the given value is enumerable and return it by using `list()` or encapsulated in a list accordingly.

View File

@ -3,7 +3,7 @@ title: fibonacci
tags: math,list,intermediate
---
Generates an array, containing the Fibonacci sequence, up until the nth term.
Generates a list, containing the Fibonacci sequence, up until the nth term.
Starting with `0` and `1`, use `list.append()` to add the sum of the last two numbers of the list to the end of the list, until the length of the list reaches `n`.
If `n` is less or equal to `0`, return a list containing `0`.