human
Can you provide a code to change string to a new character set and the other steps required given the following:
Change string to a new character set | function for converting the string.
find the index of each element of the string in the modified set of alphabets replace the element with the one having the same index in the actual set of alphabets.
Driver Code"
Solution in Python:
assistant
#Here is code to change string to a new character set and the other steps required.
 def conversion ( charSet , str1 ) :
	s2 = " "
	for i in str1 :
		s2 += alphabets [ charSet . index ( i ) ]
	return s2
if __name__ == ' _ _ main _ _ ' :
	alphabets = " abcdefghijklmnopqrstuvwxyz "
	charSet = " qwertyuiopasdfghjklzxcvbnm "
	str1 = " egrt "
	print ( conversion ( charSet , str1 ) )