This commit is contained in:
2023-07-28 18:07:30 +08:00
parent 7255c3b046
commit bf82aa62ff
7 changed files with 45 additions and 24 deletions

View File

@@ -553,6 +553,29 @@
"G.has_edge(1, 2, 1)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n"
]
}
],
"source": [
"s = set()\n",
"s.add(1)\n",
"s.add(2)\n",
"s.add(1)\n",
"len(s)\n",
"if s:\n",
" print(1)"
]
},
{
"cell_type": "code",
"execution_count": null,