Update descriptions
Update description in cast_list Update description in fibonacci Update description in all_equal
This commit is contained in:
@ -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.
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user