Skip to main content
Ask a Question
Asked a question last year

I am a slow learner. kindly tell me what should i do to rectify the error. # PARDEEP RAJAN # List # we have done is declaring differnt object types in the list, # so we can use it in long term with our programming lst = ['PARDEEPRAJAN', 1, 2.3,3, 4, 5,[6,7,8,'PARDEEP RAJAN']] print(lst) # if i have to print a specific 3rd element of the list print(lst[3]) # if i have to print a specific 3rd element of the list print(lst[4]3])____________________________________________________________['PARDEEPRAJAN', 1, 2.3, 3, 4, 5, [6, 7, 8, 'PARDEEP RAJAN']] 3 --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-70-2e707c146c08> in <module> 15 # if i have to print a specific 3rd element of the list 16 ---> 17 print(lst[4][3]) TypeError: 'int' object is not subscriptable

Fuel your ambition, discover your passion and achieve your professional goals with LetsUpgrade.
Sign Up Now