KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to combine the contents of two lists, in order to later perform processing on the entire data set. I initially looked at the built in insert function, but it inserts as a list, rather than the contents of the list. I can slice and append the lists, but is there a cleaner / more Pythonic way of doing what I want than this: array = ['the', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog'] addition = ['quick', 'brown'] array = array[:1] + addition + array[1:]
Tags (comma-separated)
Save Edits
Cancel