You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. note:: Remember that `sort` method does not return the sorted list, instead the list itself will be sorted. This is done to keep performance of the code in mind. More details can be found `here <https://docs.python.org/3/faq/design.html?highlight=walrus#why-doesn-t-list-sort-return-the-sorted-list>`_.
92
+
90
93
You can also delete an element at any particular position of the list using the del keyword.
91
94
92
95
::
@@ -506,5 +509,11 @@ changes the variable outside of the function.
506
509
[1, 2, 4, 42]
507
510
508
511
512
+
Create a calculator
513
+
====================
509
514
515
+
Here is a small problem for you. You will have to use list, and dictionary to
516
+
create a tool, which will take input like `(* (+ 3 4) 2)` and return the answer
517
+
like `14`. The four valid operators are `+`, `-`, `/*`. Every operator will
518
+
need two operands to work on. Another input `(* 2 3)` and the output is `6`.
0 commit comments