7. Slicing Text

Slices and [::-1] on text

Text slices just like lists: p[:4] is the first four characters, p[4:] is the rest, and p[::-1] is the whole thing backwards.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:p = "x...x.x.". Reverse it with r = p[::-1] and play the kick wherever r has an "x".

Goal
kick
1234
5678