While learning about python, I came upon this code, which takes a text file, splits each line into an array, and inserts it into a custom dictionary, where the array[0] is the k
No, it is better practice to leave them out.
Without strip(), you can have empty keys and values:
applesround, fruity things
orangesround, fruity things
bananas
Without strip(), bananas is present in the dictionary but with an empty string as value. With strip(), this code will throw an exception because it strips the tab of the banana line.