0

Can any one tell me how i can refer to the charector ' w ' in this code i tried my level but it's showing index error??????

str = "Hello world!" array = [1,2,3,[str],4] print(array[3])

10th Dec 2016, 10:02 AM
N.V.S.R.Sandeep
N.V.S.R.Sandeep - avatar
5 Antworten
+ 1
dnt use str its a builtin function string ="hello world" array=[1,2,3,[string],4] print (array[3][0][6])
10th Dec 2016, 10:42 AM
pythonbee
pythonbee - avatar
0
I'm sorry I couldn't get it,can be of more detail please???
10th Dec 2016, 10:06 AM
N.V.S.R.Sandeep
N.V.S.R.Sandeep - avatar
0
try this, string str="hello world"; cout<<str.at(6); include string header also shared that code too
10th Dec 2016, 10:19 AM
Morpheus
Morpheus - avatar
0
thank you
10th Dec 2016, 10:21 AM
N.V.S.R.Sandeep
N.V.S.R.Sandeep - avatar
0
thanks again
10th Dec 2016, 10:44 AM
N.V.S.R.Sandeep
N.V.S.R.Sandeep - avatar