reply = input( "Enter a string: ") reply_2 = input ( "Enter list of indices: ") s = reply numbers_as_strings = reply_2.split() #list of numbers of type string numbers = [] #empty list for nbr in numbers_as_strings: #go through each number as a string nbr = int( nbr ) #change string number into an integer numbers.append( nbr ) #put/append the integer into new list numbers; updates the list #numbers = numbers.append( nbr ) #does this work???? NO!!!! #print returns a value #input returns a string #append returns none new_string = '' #empty string for number in numbers: #go through each integer in list of integers character = s[number] #character at this index in string print("Character: ", character) new_string = new_string + character #update new string print("New String: ", new_string) print( new_string )