Challenge
Tâche
Swipe to start coding
You have such string watermelon
. You have to get such characters: n
, m
, l
, a
. Use only negative indexing.
Solution
9
1
2
3
4
5
6
string = 'watermelon'
n = string[-1]
m = string[-5]
l = string[-3]
a = string[-9]
print(n, m, l, a)
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 4
single
9
1
2
3
4
5
6
string = 'watermelon'
n = string[_ _ _]
m = string[_ _ _]
l = string[_ _ _]
a = string[_ _ _]
print(n, m, l, a)
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion