Travis build: 156

This commit is contained in:
30secondsofcode
2019-10-12 10:16:11 +00:00
parent 7df05a4634
commit 88bdc45108
3 changed files with 57 additions and 0 deletions

View File

@ -837,6 +837,21 @@
"hash": "c920b58f01c63346e65eab83a60c4635d4c104e41767b9d41ad94029e662b902"
}
},
{
"id": "most_frequent",
"type": "snippetListing",
"title": "most_frequent",
"attributes": {
"text": "Returns the most frequent element in a list.\n\nUse `set(list)` to get the unique values in the `list` combined with `max()` to find the element that has the most appearances.\n\n",
"tags": [
"list",
"beginner"
]
},
"meta": {
"hash": "8f90ba8698b866c434ad0345df4753c46e1b19f01e339b00043a541d0e241db8"
}
},
{
"id": "n_times_string",
"type": "snippetListing",

View File

@ -1107,6 +1107,26 @@
"hash": "c920b58f01c63346e65eab83a60c4635d4c104e41767b9d41ad94029e662b902"
}
},
{
"id": "most_frequent",
"title": "most_frequent",
"type": "snippet",
"attributes": {
"fileName": "most_frequent.md",
"text": "Returns the most frequent element in a list.\n\nUse `set(list)` to get the unique values in the `list` combined with `max()` to find the element that has the most appearances.\n\n",
"codeBlocks": {
"code": "def most_frequent(list):\n return max(set(list), key = list.count)",
"example": "most_frequent([1,2,1,2,3,2,1,4,2]) #2"
},
"tags": [
"list",
"beginner"
]
},
"meta": {
"hash": "8f90ba8698b866c434ad0345df4753c46e1b19f01e339b00043a541d0e241db8"
}
},
{
"id": "n_times_string",
"title": "n_times_string",