Can a string be split and some of the words be assigned to a tuple?
For instance:
a = "Jack and Jill went up the hill"
(user1, user2) = a.split().pick(1,3) # picks 1 and 3 element in the list.
Is such a one liner possible? If so what is the syntax.
If you want to get fancy, you could use
operator.itemgetter:Example:
Or as a one-liner (w/o the import):