Horje
character matrix input python Code Example
how to input 2-d array in python
matrix = [input().split() for i in range(no_of_rows)] # if only row is given and the number of coloumn has to be decide by user
matrix= [[input() for j in range(no_of_cols)] for i in range(no_of_rows)] # if both row and coloumn has been taken as input from user
character matrix input python
arr=[['h', 'e', 'l', 'l', 'o'],
       ['s', 'n', 'a', 'k', 'e'],
       ['p', 'l', 'a', 't', 'e']]

arr1=np.array(arr)
print(arr1)




Python

Related
pydub play audio Code Example pydub play audio Code Example
torch summary Code Example torch summary Code Example
exercises for python beginners Code Example exercises for python beginners Code Example
pandas average of vectors after groupby Code Example pandas average of vectors after groupby Code Example
how to copy all requirements to requirements.txt Code Example how to copy all requirements to requirements.txt Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8