Este desafio tem cinco exercícios curtos para ajudar você a praticar a habilidade de extrair fragmentos de strings. Confira os exemplos abaixo para ver visualmente como extrair fragmentos das strings. Boa sorte!
txt = "abcdefghijklmnopqrstuvwxyz"challenge1(txt) ➞ "abcde"
# First 5 characters of the string.
challenge2(txt) ➞ "vwxyz"
# Last 5 characters of the string.
challenge3(txt) ➞ "zyxwvutsrqponmlkjihgfedcba"
# All characters in the string from back.
challenge4(txt) ➞ "fedcba"
# First 6 characters in the string (start with 6th character and go backwards).
challenge5(txt) ➞ "tvxz"
# From the final seven characters, return every other character, starting with the first of those seven.