Here is what I want to do but doesn\'t work:
mystring = \"hello world\" toUpper = [\'a\', \'e\', \'i\', \'o\', \'u\', \'y\'] array = list(mystring) for c in arr
Please try this one
mystring = "hello world" toUpper = ['a', 'e', 'i', 'o', 'u', 'y'] array = list(mystring) new_string = [x.upper() if x in toUpper else x for x in array ] new_string = ''.join(new_string) print new_string