We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a03fd4 commit 9aac877Copy full SHA for 9aac877
Dictionaries.ipynb
@@ -290,6 +290,38 @@
290
"print(mydict)"
291
]
292
},
293
+ {
294
+ "cell_type": "code",
295
+ "execution_count": 18,
296
+ "metadata": {},
297
+ "outputs": [
298
299
+ "name": "stdin",
300
+ "output_type": "stream",
301
+ "text": [
302
+ "Enter ip 1111111111\n"
303
+ ]
304
+ },
305
306
+ "name": "stdout",
307
308
309
+ "{'1': 10}\n"
310
311
+ }
312
+ ],
313
+ "source": [
314
+ "strl=input(\"Enter ip\")\n",
315
+ "dictX = {} \n",
316
+ "for i in strl: \n",
317
+ " if i not in dictX.keys(): \n",
318
+ " dictX[i] = 1\n",
319
+ " else: \n",
320
+ " dictX[i] += 1\n",
321
+ " \n",
322
+ "print (dictX)"
323
324
325
{
326
"cell_type": "code",
327
"execution_count": null,
0 commit comments