Predict the output

What will be the output of the given code snippet?

x = ['fun', 2, 'cricket', 'done']
try: 
    print (x[1])
    print (x[3])
    print (x[4]) 
 
except IndexError:
    print("Go Home")
Options

1.fun

Go Home

2.2

done

Go Home

3.2

done

4.fun

done

Related Posts

Close Bitnami banner
Bitnami