In [16]:
string_list = ["a","b","c","d","e","f","g","h","i","j","k"]

joined_string = " ".join(string for string in string_list)

splitted_string = joined_string.split("-")
print(joined_string)


a b c d e f g h i j k
['a b c d e f g h i j k']

In [38]:
def foo():
        print ("Begin")
        for i in range(3):
            print ("before yield", i)
            yield i
            print ("after yield", i)
        print( "end")
        
f = foo()

In [42]:
next(f)


after yield 2
end
---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
<ipython-input-42-468f0afdf1b9> in <module>()
----> 1 next(f)

StopIteration: 

In [ ]:


In [ ]: