1"""
2This error means the variable you want to subscript is an integer.
34if you want to subscript an int, a way of doing that is turning it to str.
5"""6num = 12347x = num[2] # does not work8x = int(str(num)[2]) # works, x = 3
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content