From 9d04ede6c561dc819e3427d84d14d4617ff4abd5 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 3 Jan 2020 12:55:56 +0200 Subject: [PATCH] Update descriptions Update description in cast_list Update description in fibonacci Update description in all_equal --- snippets/all_equal.md | 2 +- snippets/cast_list.md | 2 +- snippets/fibonacci.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/all_equal.md b/snippets/all_equal.md index a99d71c6f..44233844d 100644 --- a/snippets/all_equal.md +++ b/snippets/all_equal.md @@ -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. diff --git a/snippets/cast_list.md b/snippets/cast_list.md index 103e0f304..208a71e56 100644 --- a/snippets/cast_list.md +++ b/snippets/cast_list.md @@ -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. diff --git a/snippets/fibonacci.md b/snippets/fibonacci.md index 8fb493a13..6d27dfbb8 100644 --- a/snippets/fibonacci.md +++ b/snippets/fibonacci.md @@ -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`.