# Python Program explaining # numpy.char.swapcase() function import numpy as geek in_arr = geek.array(['Geeks', 'For', 'Geeks']) print ("input array : ", in_arr) out_arr = geek.char.swapcase(in_arr) print ("output swapcasecased array :", out_arr )...
The following example shows the usage of Python String swapcase() method. In this example, we create a string with all lowercase characters in it, say "this is string example...wow!!!". The swapcase() method is called on this string and the return value will be the uppercased string...
代码1: # Python Program explaining# numpy.char.swapcase() functionimportnumpyasgeek in_arr = geek.array(['P4Q R','4q Rp','Q Rp4','rp4q'])print("input array:", in_arr) out_arr = geek.char.swapcase(in_arr)print("output swapcasecased array:", out_arr) 输出: input array: ['...