Write a NumPy program to split the element of a given array to multiple lines.
import numpy as np x = np.array(['Python\Exercises, Practice, Solution'], dtype=np.str) print("Original Array:") print(x) r = np.char.splitlines(x) print(r)
Sample Input:
['Python\\Exercises, Practice, Solution']
(['Python\Exercises, Practice, Solution'], dtype=np.str)
Sample Output:
[list(['Python\\Exercises, Practice, Solution'])]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Input:
Sample Input:
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer