Browse Source

Update solution.

master
Jan Paulus 2 years ago
parent
commit
f017ea0a61
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      07kapitel/070a Uebung.ipynb

+ 3
- 3
07kapitel/070a Uebung.ipynb View File

@@ -147,8 +147,8 @@
"import timeit\n",
"\n",
"my_dict = {}\n",
"print(timeit.timeit('get_it_or_none1(my_dict, 0)', 'from __main__ import get_it_or_none1, my_dict', number=10000))\n",
"print(timeit.timeit('get_it_or_none2(my_dict, 0)', 'from __main__ import get_it_or_none2, my_dict', number=10000))\n"
"print(f'get_it_or_none1:: {timeit.timeit(lambda: get_it_or_none1(my_dict, 0), number=10000)}')\n",
"print(f'get_it_or_none2:: {timeit.timeit(lambda: get_it_or_none2(my_dict, 0), number=10000)}')\n"
]
},
{
@@ -194,7 +194,7 @@
},
"outputs": [],
"source": [
"print(timeit.timeit('my_dict.get(0, None)', 'from __main__ import my_dict', number=10000))\n"
"print(f'get_it_or_none2:: {timeit.timeit(lambda: my_dict.get(0), number=10000)}')\n"
]
},
{

Loading…
Cancel
Save