<jupyter_start><jupyter_text>Combining StringsCombining strings is an important skill to acquire. There are multiple ways of combining strings in Python, as well as combining strings with variables. We will explore this in the first challenge. In the cell below, combine the strings in the list and add spaces between the strings (do not add a space after the last string). Insert a period after the last string.<jupyter_code>str_list = ['Durante', 'un', 'tiempo', 'no', 'estuvo', 'segura', 'de', 'si', 'su', 'marido', 'era', 'su', 'marido']
# Your code here<jupyter_output><empty_output><jupyter_text>In the cell below, use the list of strings to create a grocery list. Start the list with the string `Grocery list: ` and include a comma and a space between each item except for the last one. Include a period at the end. Only include foods in the list that start with the letter 'b' and ensure all foods are lower case.  You should have something like this:  *`Grocery list: bananas, bread, brownie mix, broccoli.`*<jupyter_code>food_list = ['Bananas', 'Chocolate', 'bread', 'diapers', 'Ice Cream', 'Brownie Mix', 'broccoli']
# Your code here<jupyter_output><empty_output><jupyter_text>Splitting StringsWe have first looked at combining strings into one long string. There are times where we need to do the opposite and split the string into smaller components for further analysis. In the cell below, split the string into a list of strings using the space delimiter. Count the frequency of each word in the string in a dictionary. Strip the periods, line breaks and commas from the text. Make sure to remove empty strings from your dictionary.<jupyter_code>poem = """Some say the world will end in fire,
Some say in ice.
From what I’ve tasted of desire
I hold with those who favor fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great
And would suffice."""
# Your code here<jupyter_output><empty_output><jupyter_text>In the cell below, find all the words that appear in the text and do not appear in the `reject_list`.  You must parse the string but can choose any data structure you wish for the words that do not appear in the `reject_list`.  Remove all non letter characters and convert all words to lower case.<jupyter_code>reject_list = ['and', 'as', 'an', 'a', 'the', 'in', 'it']

poem = """I was angry with my friend; 
I told my wrath, my wrath did end.
I was angry with my foe: 
I told it not, my wrath did grow. 

And I waterd it in fears,
Night & morning with my tears: 
And I sunned it with smiles,
And with soft deceitful wiles. 

And it grew both day and night. 
Till it bore an apple bright. 
And my foe beheld it shine,
And he knew that it was mine. 

And into my garden stole, 
When the night had veild the pole; 
In the morning glad I see; 
My foe outstretched beneath the tree."""
# Your code here<jupyter_output><empty_output><jupyter_text>Regular Expressions - regex First of all, `import regex` module.<jupyter_code>import re<jupyter_output><empty_output><jupyter_text>Obtain a list containing all phone numbers in the text below:  *Note: There should be 5 of them.*<jupyter_code>text = """
Henry's phone number is 9789-0984
Darlene's phone number is 4222-0901
Andrew's phone number is 4312-5701
James' phone number is 9413 1383
Erica's phone number is 8993-1031
"""
# Your code here<jupyter_output><empty_output><jupyter_text>In the cell below, filter the list provided and return all elements of the list containing a number.   To filter the list, use the `re.search` function.  Check if the function does not return None.   You can read more about the `re.search` function [here](https://docs.python.org/3/library/re.html).<jupyter_code>data = ['123abc', 'abc123', 'JohnSmith1', 'ABBY4', 'JANE']
# Your code here<jupyter_output><empty_output><jupyter_text>Bonus   StringsBased on this `reviews` list we want to know the frequency of words that are in the `keywords_list`.  *Pay attention to lower and upper letters, this can change your frequency counting.*<jupyter_code>reviews = ["Anacell provides the best services in the city whereas betacellular is the best of the world",
  "cetracular has awesome services, cetracular is good, cetracular is awesome!",
  "Best services provided by anacell, everyone should use anacell",
  "Wow, betacellular services are good.",]
keywords_list = ["anacell", "cetracular", "betacellular"]
# Your code here<jupyter_output><empty_output><jupyter_text>Regular Expressions - regexIn the cell below, filter the list provided to keep only strings containing `at least one digit` and `at least one lower case letter`.  As in the previous question, use the `re.search` function and check that the result is not `None`.<jupyter_code>data = ['123abc', 'abc123', 'JohnSmith1', 'ABBY4', 'JANE']
# Your code here<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08094747682801236, 'fraction_numerical': 0.011946446961894954, 'mean_word_length': 4.972939729397294, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '458860', 'license': 'MIT', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1399, 'n_words': 697, 'path': 'labs/M01-L02-string_operations.ipynb', 'repo_name': 'AndresCBF/64_PT_NOV202111', 'size': '4855'}