Question: 1 0 : Introduction to Programming ( Python ) home > 3 . 2 : List basics List states _ list is created with four

10: Introduction to Programming (Python) home >3.2: List basics
List states_list is created with four states read from input. Using list methods, initialize:
index_var with the index of the element 'Washington' in states_list.
len_var with the length of states_list.
grad Click here to show example
Ex: If the input is:
Washington
Montana
Minnesota
Kansas
then the output is
Washington is found at index 0 of ['Washington', 'Montana', 'Minnesota', 'Kansas']
List length: 4
1 # Reads four values from input into states_list
2 states_list input(), input(), input(), input()]
4|'.' Your code goes here '.'
6 print(f'Washington is found at index {index_var} of {states_list}')
7 print(f'List length: {len_var}')
1 0 : Introduction to Programming ( Python ) home

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!