Rephrase Ex3 (uniqueness was phrased incorrectly)
parent
473040b48e
commit
1db3ee5392
|
@ -195,7 +195,7 @@
|
|||
"\n",
|
||||
"See for example these links for explanations on set operations: https://en.wikipedia.org/wiki/Set_(mathematics)#Basic_operations or https://snakify.org/en/lessons/sets/.\n",
|
||||
"\n",
|
||||
"A list, string or tuple can be converted to a set by `set(sequence_to_convert)`. Since sets only have unique items, the set resulting from the operation has same values as the input sequence, but with duplicates removed. This can be a way to find all unique elements. \n",
|
||||
"A list, string or tuple can be converted to a set by `set(sequence_to_convert)`. Since sets only have unique items, the set resulting from the operation has same values as the input sequence, but with duplicates removed. This can be a way to create a list with only unique elements. \n",
|
||||
"\n",
|
||||
"For example:\n",
|
||||
"~~~python\n",
|
||||
|
@ -1216,18 +1216,9 @@
|
|||
"~~~"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# End of exercises\n",
|
||||
"\n",
|
||||
"*The cell below is for setting the style of this document. It's not part of the exercises.*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 36,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
@ -1236,7 +1227,7 @@
|
|||
"[None, None, 182, None, 151, 174]"
|
||||
]
|
||||
},
|
||||
"execution_count": 36,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
@ -1289,7 +1280,7 @@
|
|||
"metadata": {},
|
||||
"source": [
|
||||
"# Exercise 3\n",
|
||||
"Create a list of the unique values from the following list:\n",
|
||||
"Remove the duplicates from the following list:\n",
|
||||
"\n",
|
||||
"~~~python\n",
|
||||
"L2 = ['Hi', 'Hello', 'Hi!', 'Hey', 'Hi', 'hey', 'Hey']\n",
|
||||
|
|
Loading…
Reference in New Issue