numpy.char.add() function in Python Last Updated : 29 Aug, 2020 Comments Improve Suggest changes Like Article Like Report The add() method of the char class in the NumPy module is used for element-wise string concatenation for two arrays of str or unicode. numpy.char.add()Syntax : numpy.char.add(x1, x2)Parameters : x1 : first array to be concatenated (concatenated at the beginning)x2 : second array to be concatenated (concatenated at the end)Returns : Array of strings or unicode Example 1 : Using the method on 2 single element string arrays. Python3 # importing the module import numpy as np # create the arrays x1 = ['Hello'] x2 = ['World'] print("The arrays are : ") print(x1) print(x2) # using the char.add() method result = np.char.add(x1, x2) print("\nThe concatenated array is :") print(result) Output : The arrays are : ['Hello'] ['World'] The concatenated array is : ['HelloWorld'] Example 2 : Using the method on 2 multiple elements string arrays. Python3 # importing the module import numpy as np # create the arrays x1 = ['Hello', 'to', 'all'] x2 = ['Geeks', 'for', 'Geeks'] print("The arrays are : ") print(x1) print(x2) # using the char.add() method result = np.char.add(x1, x2) print("\nThe concatenated array is :") print(result) Output : The arrays are : ['Hello', 'to', 'all'] ['Geeks', 'for', 'Geeks'] The concatenated array is : ['HelloGeeks' 'tofor' 'allGeeks'] Comment More infoAdvertise with us Next Article numpy.char.add() function in Python Y Yash_R Follow Improve Article Tags : Python Python-numpy Practice Tags : python Similar Reads numpy.char.multiply() function in Python The multiply() method of the char class in the NumPy module is used for element-wise string multiple concatenation. numpy.char.multiply()Syntax : numpy.char.multiply(a, i)Parameters : a : array of str or unicodei : number of times to be repeatedReturns : Array of strings Example 1 : Using the method 1 min read chr() Function in Python chr() function returns a string representing a character whose Unicode code point is the integer specified. chr() Example: Python3 num = 97 print("ASCII Value of 97 is: ", chr(num)) OutputASCII Value of 97 is: a Python chr() Function Syntaxchr(num) Parametersnum: an Unicode code integerRet 3 min read numpy.defchararray.add() in Python numpy.core.defchararray.add(arr1, arr2): Concatenates two strings element-wise. Parameters: arr1 : array-like or string. arr2 : array-like or string. Returns : Concatenates String. Code #1: Python3 1== # Python Program illustrating # numpy.char.add() method import numpy as np arr1 = ['vdteteAAAa', ' 1 min read numpy.defchararray.encode() in Python numpy.core.defchararray.encode(arr, encoding): This numpy function encodes the string(object) based on the specified codec. Parameters: arr : array-like or string. encoding : [str] Name of encoding being followed. error : Specifying how to handle error. Returns : Encoded string Code: Python3 # Pyth 1 min read numpy.count() in Python numpy.core.defchararray.count(arr, substring, start=0, end=None): Counts for the non-overlapping occurrence of sub-string in the specified range. Parameters: arr : array-like or string to be searched. substring : substring to search for. start, end : [int, optional] Range to search in. Returns : An 1 min read numpy.add() in Python NumPy, the Python powerhouse for scientific computing, provides an array of tools to efficiently manipulate and analyze data. Among its key functionalities lies numpy.add() a potent function that performs element-wise addition on NumPy arrays. numpy.add() SyntaxSyntax : numpy.add(arr1, arr2, /, out= 4 min read numpy.mintypecode() function â Python numpy.mintypecode() function return the character for the minimum-size type to which given types can be safely cast. Syntax : numpy.mintypecode(typechars, typeset = 'GDFgdf', default = 'd') Parameters : typechars : [list of str or array_like] If a list of strings, each string should represent a dtyp 1 min read numpy.find() in Python numpy.core.defchararray.find(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range. Parameters: arr : array-like or string to be searched. substring : substring to search for. start, end : [int, optional] Range to search in. Returns : An integer array wi 1 min read numpy.fromstring() function â Python numpy.fromstring() function create a new one-dimensional array initialized from text data in a string. Syntax : numpy.fromstring(string, dtype = float, count = -1, sep = ' ') Parameters : string : [str] A string that contained the data. dtype : [data-type, optional] Data-type of the array. Default d 1 min read Python 3 - input() function In Python, we use the input() function to take input from the user. Whatever you enter as input, the input function converts it into a string. If you enter an integer value still input() function converts it into a string.Python input() Function SyntaxSyntax: input(prompt)Parameter:Prompt: (optional 3 min read Like