Write code that finds a given value in a list . The list iscalled stuList and contains a list ofnames of students.a. Complete the code to locate a given student name within the listand print the indexat which the value was found. Should the value be not present inthe list a negativeindex should be shown. The search key is declared and initializedfor you and itcontains the name "deo"
def main():# list created and called stuList# searchList contains names of students# eg 'ratneel', 'john', 'abby', 'deo', and other namessearchKey = 'deo'#write code here
Write code that finds a given value in a list . The list is called stuList and contains a list of names of students. a.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am