email_key = ' ' + 'Email Address'
email_index = user_data_list[0].index(email_key)
normally we take .index of the given list but here index0 is also included of another list afterwards .index(email_key) is there.its a question from coursers qwiklabs
It is important to understand the structure of the data, which is what leads to the error...
Basically, this can be the case where there is a
lists of lists(or at least the first index[0]of the list is an list itself).Here is an example of how this would work:
both examples would print
2as a result.