![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 10.01.2020 06:31 Nevaeh3700
#write a function called alter_list. alter_list should have#two parameters: a list of strings and a list of integers.##the list of integers will represent indices for the list of#strings. alter_list should alter the capitalization of all#the words at the designated indices. if the word was all#capitals, it should become all lower case. if it was all#lower case, it should become all capitals. you may assume#that the words will already be all-caps or all-lower case.##for example: ## string_list = ["hello", "world", "how", "are", "you"]# index_list = [0, 2]# alter_list(string_list, index_list) -> # ["hello", "world", "how", "are", "you"]##after calling alter_list, the strings at indices 0 and 2#have switched their capitalization. ##note that it may be the case that the same index is present#in the second twice. if this happens, you should switch the#text at that index twice. for example: ## string_list = ["hello", "world", "how", "are", "you"]# index_list = [0, 2, 2]# alter_list(string_list, index_list) -> # ["hello", "world", "how", "are", "you"]##2 is in index_list twice, so the string at index 2 is#switched twice: capitals to lower case, then back to#capitals.#write your function here! #below are some lines of code that will test your function.#you can change the value of the variable(s) to test your#function with different inputs.##if your function works correctly, this will originally#print: #["hello", "world", "how", "are", "you"]#["hello", "world", "how", "are", "you"]print(alter_list(["hello", "world", "how", "are", "you"], [0, 2]))print(alter_list(["hello", "world", "how", "are", "you"], [0, 2, 2]))
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 22:00, robert7248
Competent nonverbal communication involves interacting with others in a manner that is appropriate for which of the following? select all that apply. situation task individuals
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 11:00, soystersoce
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
You know the right answer?
#write a function called alter_list. alter_list should have#two parameters: a list of strings and a...
Questions in other subjects:
![Konu](/tpl/images/cats/fizika.png)
Physics, 28.03.2021 04:50
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 28.03.2021 04:50
![Konu](/tpl/images/cats/health.png)
Health, 28.03.2021 04:50
![Konu](/tpl/images/cats/mat.png)
Mathematics, 28.03.2021 04:50
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/en.png)
English, 28.03.2021 04:50