From 9c4b6a2a147397c6271b9d57ad482769aa6c25e5 Mon Sep 17 00:00:00 2001 From: VeroOli <157146048+VeroOli@users.noreply.github.com> Date: Sun, 28 Jan 2024 21:43:14 +0100 Subject: [PATCH] Add files via upload --- Untitled.ipynb | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Untitled.ipynb diff --git a/Untitled.ipynb b/Untitled.ipynb new file mode 100644 index 0000000..46180a6 --- /dev/null +++ b/Untitled.ipynb @@ -0,0 +1,81 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "8e98bbd9", + "metadata": {}, + "outputs": [], + "source": [ + "class List:\n", + " def remove_(self, integer_list, values_list):\n", + " l=[]\n", + " for e in integer_list:\n", + " if e not in values_list:\n", + " l.append(e)\n", + " \n", + " \n", + " return l" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "12fe8f38", + "metadata": {}, + "outputs": [], + "source": [ + "\n", + "class List(object):\n", + " def count_spec_digits(self, integers_list, digits_list):\n", + " # your code here\n", + " l=[]\n", + " \n", + " for e in digits_list: \n", + " l.append((e, str(integers_list).count(str(e))))\n", + " \n", + " return l" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e947afcf", + "metadata": {}, + "outputs": [], + "source": [ + "def ordered_count(inp):\n", + " \n", + " \n", + " res={}\n", + " \n", + " for letra in inp: \n", + " res[letra]=inp.count(letra)\n", + " \n", + " \n", + " return list(res.items())" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}