diff --git a/snippets/flatten.md b/snippets/flatten.md index b220c86c3..d25dc1910 100644 --- a/snippets/flatten.md +++ b/snippets/flatten.md @@ -1,5 +1,5 @@ --- -title: flatten +title: Flatten list tags: list,intermediate firstSeen: 2019-09-19T15:46:10+03:00 lastUpdated: 2020-11-02T19:27:53+02:00 diff --git a/snippets/for_each.md b/snippets/for_each.md index 5a95e9e31..d05df47b3 100644 --- a/snippets/for_each.md +++ b/snippets/for_each.md @@ -1,5 +1,5 @@ --- -title: for_each +title: Execute function for each list element tags: list,beginner firstSeen: 2020-03-15T12:54:08+02:00 lastUpdated: 2020-09-15T16:13:06+03:00 diff --git a/snippets/for_each_right.md b/snippets/for_each_right.md index be899ad37..4fb15e170 100644 --- a/snippets/for_each_right.md +++ b/snippets/for_each_right.md @@ -1,5 +1,5 @@ --- -title: for_each_right +title: Execute function for each list element in reverse tags: list,beginner firstSeen: 2020-03-15T12:54:08+02:00 lastUpdated: 2020-09-15T16:13:06+03:00 diff --git a/snippets/frequencies.md b/snippets/frequencies.md index 6e7ba3497..b25e09a6a 100644 --- a/snippets/frequencies.md +++ b/snippets/frequencies.md @@ -1,5 +1,5 @@ --- -title: frequencies +title: Value frequencies tags: list,intermediate firstSeen: 2020-03-15T12:54:08+02:00 lastUpdated: 2020-11-02T19:27:53+02:00 diff --git a/snippets/from_iso_date.md b/snippets/from_iso_date.md index ca22ecf75..3a143aeaf 100644 --- a/snippets/from_iso_date.md +++ b/snippets/from_iso_date.md @@ -1,5 +1,5 @@ --- -title: from_iso_date +title: Date from ISO format tags: date,intermediate firstSeen: 2020-10-28T16:20:04+02:00 lastUpdated: 2021-01-07T23:30:28+02:00 diff --git a/snippets/gcd.md b/snippets/gcd.md index f0f36a7f8..c882a196f 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -1,5 +1,5 @@ --- -title: gcd +title: Greatest common divisor tags: math,beginner firstSeen: 2018-01-08T16:26:35+02:00 lastUpdated: 2020-09-15T16:13:06+03:00 diff --git a/snippets/geometric_progression.md b/snippets/geometric_progression.md index e426ecd7c..eaf1d1254 100644 --- a/snippets/geometric_progression.md +++ b/snippets/geometric_progression.md @@ -1,14 +1,14 @@ --- -title: geometric_progression +title: Geometric progression tags: math,list,intermediate firstSeen: 2020-10-04T12:19:28+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 --- Initializes a list containing the numbers in the specified range where `start` and `end` are inclusive and the ratio between two terms is `step`. -Returns an error if `step` equals `1`. - Use `range()`, `math.log()` and `math.floor()` and a list comprehension to create a list of the appropriate length, applying the step for each element. +- Returns an error if `step` equals `1`. - Omit the second argument, `start`, to use a default value of `1`. - Omit the third argument, `step`, to use a default value of `2`. diff --git a/snippets/get.md b/snippets/get.md index 3c0080c46..5fafc892d 100644 --- a/snippets/get.md +++ b/snippets/get.md @@ -1,5 +1,5 @@ --- -title: get +title: Get nested value tags: dictionary,list,intermediate firstSeen: 2020-10-28T12:21:39+02:00 lastUpdated: 2020-10-28T12:21:39+02:00 @@ -11,7 +11,7 @@ Retrieves the value of the nested key indicated by the given selector list from - Apply `operator.getitem()` for each key in `selectors`, retrieving the value to be used as the iteratee for the next iteration. ```py -from functools import reduce +from functools import reduce from operator import getitem def get(d, selectors): @@ -23,7 +23,7 @@ users = { 'freddy': { 'name': { 'first': 'fred', - 'last': 'smith' + 'last': 'smith' }, 'postIds': [1, 2, 3] } diff --git a/snippets/group_by.md b/snippets/group_by.md index ca9ee3c19..fb8fd09b8 100644 --- a/snippets/group_by.md +++ b/snippets/group_by.md @@ -1,5 +1,5 @@ --- -title: group_by +title: Group list elements tags: list,dictionary,intermediate firstSeen: 2019-08-20T13:29:00+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/hamming_distance.md b/snippets/hamming_distance.md index a78c83d70..9040f67fc 100644 --- a/snippets/hamming_distance.md +++ b/snippets/hamming_distance.md @@ -1,5 +1,5 @@ --- -title: hamming_distance +title: Hamming distance tags: math,intermediate firstSeen: 2021-01-17T13:04:06+02:00 lastUpdated: 2021-02-18T14:22:25+02:00 diff --git a/snippets/has_duplicates.md b/snippets/has_duplicates.md index c8ee94f12..61588f5b2 100644 --- a/snippets/has_duplicates.md +++ b/snippets/has_duplicates.md @@ -1,5 +1,5 @@ --- -title: has_duplicates +title: Check for duplicates in list tags: list,beginner firstSeen: 2018-04-01T11:03:09+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/have_same_contents.md b/snippets/have_same_contents.md index 7da8726f4..0608a4795 100644 --- a/snippets/have_same_contents.md +++ b/snippets/have_same_contents.md @@ -1,5 +1,5 @@ --- -title: have_same_contents +title: Check lists have same contents tags: list,intermediate firstSeen: 2020-03-15T12:54:08+02:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/head.md b/snippets/head.md index 4e8d17bcc..9c31b00df 100644 --- a/snippets/head.md +++ b/snippets/head.md @@ -1,5 +1,5 @@ --- -title: head +title: List head tags: list,beginner firstSeen: 2019-08-20T14:08:52+03:00 lastUpdated: 2020-09-15T16:13:06+03:00 diff --git a/snippets/hex_to_rgb.md b/snippets/hex_to_rgb.md index d13af2c24..b84a8301b 100644 --- a/snippets/hex_to_rgb.md +++ b/snippets/hex_to_rgb.md @@ -1,5 +1,5 @@ --- -title: hex_to_rgb +title: Hex to RGB tags: string,math,intermediate firstSeen: 2020-09-13T01:08:21+03:00 lastUpdated: 2020-09-15T16:13:06+03:00 diff --git a/snippets/in_range.md b/snippets/in_range.md index 2b30bffae..4b7ae2f8f 100644 --- a/snippets/in_range.md +++ b/snippets/in_range.md @@ -1,5 +1,5 @@ --- -title: in_range +title: Number in range tags: math,beginner firstSeen: 2019-08-20T13:41:40+03:00 lastUpdated: 2020-09-15T16:13:06+03:00 diff --git a/snippets/includes_all.md b/snippets/includes_all.md index fdb5b8fbc..1470e5e09 100644 --- a/snippets/includes_all.md +++ b/snippets/includes_all.md @@ -1,5 +1,5 @@ --- -title: includes_all +title: List includes all values tags: list,intermediate firstSeen: 2020-03-15T12:54:08+02:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/includes_any.md b/snippets/includes_any.md index e1310ab53..eee9f8393 100644 --- a/snippets/includes_any.md +++ b/snippets/includes_any.md @@ -1,5 +1,5 @@ --- -title: includes_any +title: List includes any values tags: list,intermediate firstSeen: 2020-03-15T12:54:08+02:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/index_of_all.md b/snippets/index_of_all.md index 0460427b3..83d115d98 100644 --- a/snippets/index_of_all.md +++ b/snippets/index_of_all.md @@ -1,5 +1,5 @@ --- -title: index_of_all +title: All indexes of value tags: list,intermediate firstSeen: 2020-10-11T13:40:42+03:00 lastUpdated: 2020-10-11T13:45:19+03:00 @@ -16,5 +16,5 @@ def index_of_all(lst, value): ```py index_of_all([1, 2, 1, 4, 5, 1], 1) # [0, 2, 5] -index_of_all([1, 2, 3, 4], 6) # [] +index_of_all([1, 2, 3, 4], 6) # [] ``` diff --git a/snippets/initial.md b/snippets/initial.md index a11f27c00..9b1f72282 100644 --- a/snippets/initial.md +++ b/snippets/initial.md @@ -1,5 +1,5 @@ --- -title: initial +title: List without last element tags: list,beginner firstSeen: 2019-08-20T14:08:52+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/initialize_2d_list.md b/snippets/initialize_2d_list.md index df9514269..97aacffc1 100644 --- a/snippets/initialize_2d_list.md +++ b/snippets/initialize_2d_list.md @@ -1,5 +1,5 @@ --- -title: initialize_2d_list +title: Initialize 2D list tags: list,intermediate firstSeen: 2019-10-25T10:11:51+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/initialize_list_with_range.md b/snippets/initialize_list_with_range.md index bc4501916..49eb7ca82 100644 --- a/snippets/initialize_list_with_range.md +++ b/snippets/initialize_list_with_range.md @@ -1,5 +1,5 @@ --- -title: initialize_list_with_range +title: Initialize list with range tags: list,beginner firstSeen: 2019-08-20T15:21:41+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/initialize_list_with_values.md b/snippets/initialize_list_with_values.md index 9d8715fed..4d2789858 100644 --- a/snippets/initialize_list_with_values.md +++ b/snippets/initialize_list_with_values.md @@ -1,5 +1,5 @@ --- -title: initialize_list_with_values +title: Initialize list with values tags: list,beginner firstSeen: 2019-08-20T14:12:06+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/intersection.md b/snippets/intersection.md index 6d1a18996..2541c88bd 100644 --- a/snippets/intersection.md +++ b/snippets/intersection.md @@ -1,5 +1,5 @@ --- -title: intersection +title: List intersection tags: list,beginner firstSeen: 2019-08-20T15:14:26+03:00 lastUpdated: 2020-11-02T19:28:05+02:00 diff --git a/snippets/intersection_by.md b/snippets/intersection_by.md index 5ad79f54c..fe9dde706 100644 --- a/snippets/intersection_by.md +++ b/snippets/intersection_by.md @@ -1,5 +1,5 @@ --- -title: intersection_by +title: List intersection based on function tags: list,function,intermediate firstSeen: 2019-08-20T15:16:27+03:00 lastUpdated: 2020-11-02T19:28:05+02:00