diff --git a/your-code/challenges.ipynb b/your-code/challenges.ipynb index ba91b3f..b7f566f 100644 --- a/your-code/challenges.ipynb +++ b/your-code/challenges.ipynb @@ -13,11 +13,12 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "# Your code here" + "# Your code here\n", + "tup= (\"I\",)" ] }, { @@ -31,11 +32,23 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "tuple" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "type(tup)" ] }, { @@ -53,16 +66,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "ename": "AttributeError", + "evalue": "'tuple' object has no attribute 'append'", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mAttributeError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 3\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Your code here\u001b[39;00m\n\u001b[32m 2\u001b[39m elements= [\u001b[33m\"\u001b[39m\u001b[33mr\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mo\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mn\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mh\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33ma\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mc\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mk\u001b[39m\u001b[33m\"\u001b[39m]\n\u001b[32m----> \u001b[39m\u001b[32m3\u001b[39m \u001b[43mtup\u001b[49m\u001b[43m.\u001b[49m\u001b[43mappend\u001b[49m(elements)\n\u001b[32m 5\u001b[39m \u001b[38;5;66;03m# You can not append nothing to a string nor a variable (tuple) indeed. \u001b[39;00m\n\u001b[32m 6\u001b[39m \u001b[38;5;66;03m# It must me a _mutable_ list or a dictionary. \u001b[39;00m\n\u001b[32m 7\u001b[39m \u001b[38;5;66;03m# \"'tuple' object has no attribute 'append'\"\u001b[39;00m\n", + "\u001b[31mAttributeError\u001b[39m: 'tuple' object has no attribute 'append'" + ] + } + ], "source": [ "# Your code here\n", + "elements= [\"r\", \"o\", \"n\", \"h\", \"a\", \"c\", \"k\"]\n", + "tup.append(elements)\n", "\n", - "# Your explanation here\n", - "# You can :) " + "# You can not append nothing to a string nor a variable (tuple) indeed. \n", + "# It must me a _mutable_ list or a dictionary. \n", + "# \"'tuple' object has no attribute 'append'\"" ] }, { @@ -80,11 +108,15 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ - "# Your code here" + "# Your code here\n", + "tup= (\"I\", \"r\", \"o\", \"n\", \"h\", \"a\", \"c\", \"k\")\n", + "\n", + "# I assume by \"Re-assign\" you mean rewrite the tuple. \n", + "# So yes, by reassign any variable you can rewrite everything was before with the new variable (data)." ] }, { @@ -102,11 +134,23 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('I', 'r', 'o', 'n') ('h', 'a', 'c', 'k')\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "tup1= tup[:4]\n", + "tup2= tup[4:]\n", + "\n", + "print(f\"{tup1} {tup2}\")" ] }, { @@ -120,11 +164,38 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('I', 'r', 'o', 'n', 'h', 'a', 'c', 'k')\n" + ] + } + ], + "source": [ + "# Your code here\n", + "tup3= tup1+ tup2\n", + "print(tup3)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tup3: ('I', 'r', 'o', 'n', 'h', 'a', 'c', 'k') is equal to tup: ('I', 'r', 'o', 'n', 'h', 'a', 'c', 'k')\n" + ] + } + ], "source": [ - "# Your code here" + "print(f\"tup3: {tup3} is equal to tup: {tup}\") if tup3 == tup else print(f\"tup3: {tup3} is not equal to tup: {tup}\")" ] }, { @@ -138,9 +209,22 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sum of tup1 + tup2 is equal to tup3: 8\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "# First we check the len for every tuple, then we add them.\n", + "count= len(tup1) + len(tup2)\n", + "\n", + "# With a ternary if-else we compare if \"count\" is equal to \"tup3\"\n", + "print(f\"The sum of tup1 + tup2 is equal to tup3: {count}\") if count == len(tup3) else print(\"the sum of tup1 + tup2 is not equal to tup3\")" ] }, { @@ -154,9 +238,20 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The index for 'h' in ('I', 'r', 'o', 'n', 'h', 'a', 'c', 'k') is :4\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "# We search the index by using the method .index(\"x\"), then we print it.\n", + "h_index= tup3.index(\"h\")\n", + "print(f\"The index for 'h' in {tup3} is :{h_index}\")" ] }, { @@ -176,20 +271,29 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 44, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "False\n", + "True\n", + "False\n", + "False\n" + ] + } + ], "source": [ - "# Your code here" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Your code here" + "# Your code here\n", + "# List of letters\n", + "letters= [\"a\", \"b\", \"c\", \"d\", \"e\"]\n", + "\n", + "# using a simple for-in, we print True (by \"in\") for every \"letter\" if in \"tup3\"\n", + "for letter in letters:\n", + " print(letter in tup3)" ] }, { @@ -205,9 +309,24 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The letters apears in tup3: 2 times\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "counter= 0\n", + "\n", + "for letter in letters:\n", + " if letter in tup3:\n", + " counter= counter + 1\n", + "\n", + "print(f\"The letters apears in 'tup3': {counter} times\")" ] }, { @@ -223,7 +342,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -250,9 +369,23 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[23, 18, 56, 85, 50, 37, 7, 43, 96, 38, 30, 87, 49, 75, 54, 29, 42, 11, 39, 44, 83, 72, 6, 58, 84, 98, 4, 10, 66, 55, 45, 32, 41, 21, 91, 28, 9, 33, 64, 82, 52, 69, 80, 1, 61, 93, 15, 81, 92, 51, 76, 48, 26, 36, 77, 86, 74, 20, 95, 14, 27, 59, 53, 97, 47, 19, 25, 31, 63, 89, 24, 34, 99, 73, 78, 60, 94, 57, 2, 12]\n", + "Number of samples: 80\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "# by using random.sample we can settle the range of numbers [0 to 100] and the number of samples [80]\n", + "\n", + "sample_list_1= random.sample(range(1, 100), 80)\n", + "print(sample_list_1)\n", + "print(f\"Number of samples: {len(sample_list_1)}\")" ] }, { @@ -264,11 +397,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ - "# your code here" + "# your code here\n", + "set1= set()\n", + "set1.update(sample_list_1)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1, 2, 4, 6, 7, 9, 10, 11, 12, 14, 15, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 66, 69, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99}\n", + "80\n" + ] + } + ], + "source": [ + "print(set1)\n", + "print(len(set1))" ] }, { @@ -287,11 +441,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1, 73, 87, 3, 79, 22, 77, 90, 56, 10, 63, 54, 9, 55, 38, 34, 23, 58, 87, 21, 73, 89, 72, 16, 4, 31, 46, 91, 65, 21, 43, 43, 77, 97, 56, 78, 30, 40, 31, 76, 97, 93, 81, 97, 55, 39, 59, 12, 74, 10, 22, 24, 73, 44, 1, 21, 69, 17, 65, 50, 98, 61, 83, 69, 79, 23, 72, 64, 47, 81, 66, 1, 52, 54, 63, 42, 98, 68, 78, 6]\n", + "Number of samples: 80\n" + ] + } + ], "source": [ - "# your code here" + "# your code here\n", + "# By here, we made a ternary for-in loop who creates 80 samples from a range of 1 to 100, but here the values can not be unique.\n", + "sample_list_2= [random.randint(1, 100) for _ in range(80)]\n", + "print(sample_list_2)\n", + "print(f\"Number of samples: {len(sample_list_2)}\")" ] }, { @@ -303,11 +470,26 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1, 73, 87, 3, 79, 22, 77, 90, 56, 10, 63, 54, 9, 55, 38, 34, 23, 58, 87, 21, 73, 89, 72, 16, 4, 31, 46, 91, 65, 21, 43, 43, 77, 97, 56, 78, 30, 40, 31, 76, 97, 93, 81, 97, 55, 39, 59, 12, 74, 10, 22, 24, 73, 44, 1, 21, 69, 17, 65, 50, 98, 61, 83, 69, 79, 23, 72, 64, 47, 81, 66, 1, 52, 54, 63, 42, 98, 68, 78, 6]\n", + "80\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "# in this case the numbers are equal so the set does kept with the same lenght\n", + "set2= set()\n", + "\n", + "set2.update(sample_list_2)\n", + "print(sample_list_2)\n", + "print(len(sample_list_2))" ] }, { @@ -319,11 +501,21 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{2, 7, 11, 14, 15, 18, 19, 20, 25, 26, 27, 28, 29, 32, 33, 36, 37, 41, 45, 48, 49, 51, 53, 57, 60, 75, 80, 82, 84, 85, 86, 92, 94, 95, 96, 99}\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "set3= set1 - set2\n", + "print(set3)" ] }, { @@ -335,11 +527,21 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{65, 3, 68, 40, 46, 79, 16, 17, 22, 90}\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "set4= set2 - set1\n", + "print(set4)" ] }, { @@ -351,11 +553,21 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1, 4, 6, 9, 10, 12, 21, 23, 24, 30, 31, 34, 38, 39, 42, 43, 44, 47, 50, 52, 54, 55, 56, 58, 59, 61, 63, 64, 66, 69, 72, 73, 74, 76, 77, 78, 81, 83, 87, 89, 91, 93, 97, 98}\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "set5= set1 & set2\n", + "print(set5)" ] }, { @@ -375,11 +587,23 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99}\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "# They are a sumatory of the sets, so:\n", + "\n", + "count_sets= set1 | set2 | set3 | set4 | set5\n", + "print(count_sets)" ] }, { @@ -391,11 +615,12 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ - "# Your code here" + "# Your code here\n", + "set6= set()" ] }, { @@ -407,11 +632,21 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1, 2, 4, 6, 7, 9, 10, 11, 12, 14, 15, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 66, 69, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99}\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "set6.update(set3, set5)\n", + "print(set6)" ] }, { @@ -423,11 +658,20 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "print(True) if set1 == set6 else print(False)" ] }, { @@ -439,11 +683,22 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "False\n", + "True\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "print(True) if set2.issubset(set1) else print(False)\n", + "print(True) if set3.issubset(set1) else print(False)" ] }, { @@ -457,11 +712,25 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n" + ] + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "sets_union1= set()\n", + "sets_union2= set()\n", + "sets_union1.union(set3, set3, set5)\n", + "sets_union1.union(set1, set2)\n", + "\n", + "print(True) if sets_union1 == sets_union2 else print(False)" ] }, { @@ -473,11 +742,23 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "# Your code here" + "# Your code here\n", + "set1.pop()" ] }, { @@ -493,11 +774,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "metadata": {}, "outputs": [], "source": [ - "# Your code here" + "# Your code here\n", + "list_to_remove = [1, 9, 11, 19, 21, 29, 31, 39, 41, 49, 51, 59, 61, 69, 71, 79, 81, 89, 91, 99]\n", + "\n", + "for element in list_to_remove:\n", + " set1.discard(element)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{2, 4, 6, 7, 10, 12, 14, 15, 18, 20, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 36, 37, 38, 42, 43, 44, 45, 47, 48, 50, 52, 53, 54, 55, 56, 57, 58, 60, 63, 64, 66, 72, 73, 74, 75, 76, 77, 78, 80, 82, 83, 84, 85, 86, 87, 92, 93, 94, 95, 96, 97, 98}\n" + ] + } + ], + "source": [ + "print(set1)" ] }, { @@ -515,7 +817,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 36, "metadata": {}, "outputs": [], "source": [ @@ -551,11 +853,38 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 37, + "metadata": {}, + "outputs": [], + "source": [ + "# Your code here\n", + "word_freq2= word_freq" + ] + }, + { + "cell_type": "code", + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ - "# Your code here" + "word_freq2= dict(sorted(word_freq.items()))" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'a': 8, 'about': 1, 'all': 1, 'although': 3, 'and': 23, 'are': 1, 'at': 1, 'baby': 14, 'backseat': 1, 'bag': 1, 'bar': 1, 'be': 16, 'bedsheets': 3, 'begin': 1, 'best': 1, 'body': 17, 'boy': 2, 'brand': 6, 'can': 1, 'chance': 1, 'club': 1, 'come': 37, 'conversation': 1, 'crazy': 2, 'dance': 1, 'date': 1, 'day': 6, 'discovering': 6, 'do': 3, 'doing': 2, \"don't\": 2, 'drinking': 1, 'driver': 1, 'eat': 1, 'every': 6, 'falling': 3, 'family': 1, 'fast': 1, 'fill': 2, 'find': 1, 'first': 1, 'follow': 6, 'for': 3, 'friends': 1, 'get': 1, 'girl': 2, 'give': 1, 'go': 2, 'going': 1, 'grab': 2, 'hand': 1, 'handmade': 2, 'heart': 3, 'hours': 2, 'how': 1, 'i': 6, \"i'll\": 1, \"i'm\": 23, 'in': 27, 'is': 5, \"isn't\": 1, 'it': 1, 'jukebox': 1, 'just': 1, 'kiss': 1, 'know': 2, 'last': 3, 'lead': 6, 'leave': 1, 'let': 1, \"let's\": 2, 'like': 10, 'love': 25, 'lover': 1, 'magnet': 3, 'make': 1, 'man': 1, 'may': 2, 'me': 10, 'mind': 2, 'much': 2, 'my': 33, 'new': 6, 'night': 3, 'not': 2, 'now': 11, 'of': 6, 'okay': 1, 'on': 40, 'one': 1, 'our': 1, 'out': 1, 'over': 1, 'place': 1, 'plate': 1, 'play': 1, 'pull': 3, 'push': 3, 'put': 3, 'radio': 1, 'room': 3, 'say': 2, 'shape': 6, 'shots': 1, 'singing': 2, 'slow': 1, 'smell': 3, 'so': 2, 'somebody': 2, 'something': 6, 'sour': 1, 'start': 2, 'stop': 1, 'story': 1, 'sweet': 1, 'table': 1, 'take': 1, 'talk': 4, 'taxi': 1, 'tell': 1, 'that': 2, 'the': 18, 'then': 3, 'thrifty': 1, 'to': 2, 'too': 5, 'trust': 1, 'up': 3, 'van': 1, 'waist': 2, 'want': 2, 'was': 2, 'we': 7, \"we're\": 1, 'week': 1, 'were': 3, 'where': 1, 'with': 22, 'you': 16, 'your': 21}\n" + ] + } + ], + "source": [ + "print(word_freq2)" ] }, { @@ -592,17 +921,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 45, "metadata": {}, "outputs": [], "source": [ - "# Your code here" + "# Your code here\n", + "import operator\n", + "\n", + "word_freq2= sorted(word_freq.items(), key= operator.itemgetter(1))" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[('conversation', 1), (\"we're\", 1), ('plate', 1), ('sour', 1), ('jukebox', 1), ('taxi', 1), ('fast', 1), ('bag', 1), ('man', 1), ('going', 1), ('one', 1), ('backseat', 1), ('friends', 1), ('take', 1), ('play', 1), ('okay', 1), ('begin', 1), ('over', 1), ('just', 1), ('are', 1), ('tell', 1), ('drinking', 1), ('our', 1), ('where', 1), (\"i'll\", 1), ('all', 1), (\"isn't\", 1), ('make', 1), ('lover', 1), ('get', 1), ('radio', 1), ('give', 1), ('can', 1), ('club', 1), ('it', 1), ('out', 1), ('chance', 1), ('first', 1), ('table', 1), ('thrifty', 1), ('driver', 1), ('slow', 1), ('dance', 1), ('trust', 1), ('family', 1), ('week', 1), ('date', 1), ('leave', 1), ('at', 1), ('hand', 1), ('how', 1), ('eat', 1), ('about', 1), ('story', 1), ('sweet', 1), ('best', 1), ('let', 1), ('van', 1), ('shots', 1), ('place', 1), ('find', 1), ('kiss', 1), ('stop', 1), ('bar', 1), (\"don't\", 2), ('mind', 2), ('know', 2), ('so', 2), ('start', 2), ('boy', 2), ('girl', 2), ('singing', 2), ('doing', 2), ('somebody', 2), ('handmade', 2), ('may', 2), ('that', 2), ('much', 2), ('grab', 2), ('was', 2), ('say', 2), ('waist', 2), ('want', 2), (\"let's\", 2), ('not', 2), ('crazy', 2), ('go', 2), ('to', 2), ('fill', 2), ('hours', 2), ('push', 3), ('then', 3), ('put', 3), ('room', 3), ('magnet', 3), ('up', 3), ('pull', 3), ('last', 3), ('do', 3), ('smell', 3), ('although', 3), ('falling', 3), ('were', 3), ('night', 3), ('heart', 3), ('for', 3), ('bedsheets', 3), ('talk', 4), ('too', 5), ('is', 5), ('every', 6), ('new', 6), ('follow', 6), ('brand', 6), ('of', 6), ('i', 6), ('day', 6), ('lead', 6), ('shape', 6), ('discovering', 6), ('something', 6), ('we', 7), ('a', 8), ('like', 10), ('me', 10), ('now', 11), ('baby', 14), ('you', 16), ('be', 16), ('body', 17), ('the', 18), ('your', 21), ('with', 22), (\"i'm\", 23), ('and', 23), ('love', 25), ('in', 27), ('my', 33), ('come', 37), ('on', 40)]\n" + ] + } + ], + "source": [ + "print(word_freq2)" ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "base", "language": "python", "name": "python3" }, @@ -616,12 +965,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" - }, - "vscode": { - "interpreter": { - "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" - } + "version": "3.12.7" } }, "nbformat": 4,