+ 6

If mega=["Jolteon"] in my code and i want to output 'teon' shouldn't the listing numbers be [3:6] instead of [3:7]

super=["Vegeta"] mega=["Jolteon"] print (super[0][0:4] + mega[0][3:7]) when the mega part of the print line is mega[0][3:6] it outputs Vegeteo,..when it's mega[0][3:7], it outputs Vegeteon. Shouldn't J=0, o=1,l=2, t=3, e=4, o=5, n=6 I hope u get what I mean😀

12th Mar 2017, 12:49 PM
Lazarus King
Lazarus King - avatar
2 ответов
+ 7
oh okay thanks tho
12th Mar 2017, 1:29 PM
Lazarus King
Lazarus King - avatar
+ 1
print (mega[3:]) the easy and shorter way
15th Mar 2018, 5:15 AM
Yoshi Mochamad Lutfi
Yoshi Mochamad Lutfi - avatar