+
+
+
+
+
+
+
+In [9]:
+
+
+
+
+
+text = "Some not interesting text input"
+
+
+
+
+In [10]:
+
+
+
+
+
+words = text.split(" ")
+
+
+
+
+In [11]:
+
+
+
+
+
+words
+
+
+
+
+
+
+Out[11]:
+
+
+
+
+
+In [12]:
+
+
+
+
+
+for word in words:
+ print(word)
+
+
+
+
+
+
+
+
+
+
+
+
+In [13]:
+
+
+
+
+
+"The lazy fox jumps over the lazy dog".split("the")
+
+
+
+
+
+
+Out[13]:
+
+
+
+
+
+In [14]:
+
+
+
+
+
+len("Hello")
+
+
+
+
+
+
+Out[14]:
+
+
+
+
+
+In [15]:
+
+
+
+
+
+len(words)
+
+
+
+
+
+
+Out[15]:
+
+
+
+
+
+In [16]:
+
+
+
+
+
+len(words[0])
+
+
+
+
+
+
+Out[16]:
+
+
+
+
+
+In [18]:
+
+
+
+
+
+"text" in words
+
+
+
+
+
+
+Out[18]:
+
+
+
+
+
+In [19]:
+
+
+
+
+
+text.count("text")
+
+
+
+
+
+
+Out[19]:
+
+
+
+
+
+In [20]:
+
+
+
+
+
+long_words = [word for word in words if len(word) > 4]
+
+
+
+
+In [21]:
+
+
+
+
+
+long_words
+
+
+
+
+
+
+Out[21]:
+
+
+
+
+
+In [22]:
+
+
+
+
+
+"Hello".title()
+
+
+
+
+
+
+Out[22]:
+
+
+
+
+
+In [23]:
+
+
+
+
+
+capitals = [word for word in words if word.istitle()]
+
+
+
+
+In [24]:
+
+
+
+
+
+capitals
+
+
+
+
+
+
+Out[24]:
+
+
+
+
+
+In [25]:
+
+
+
+
+
+"Adam".upper()
+
+
+
+
+
+
+Out[25]:
+
+
+
+
+
+In [26]:
+
+
+
+
+
+"Adam".lower()
+
+
+
+
+
+
+Out[26]:
+
+
+
+
+
+In [31]:
+
+
+
+
+
+text = "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s , when an unknown printer took a galley of type and scrambled it to make a type specimen book ."
+
+
+
+
+In [33]:
+
+
+
+
+
+len(set(text.split(" ")))
+
+
+
+
+
+
+Out[33]:
+
+
+
+
+
+In [ ]:
+
+
+
+
+
+
+