Beginner
Cut a message with slices
message holds "Hello, Hectal learners!". Create four variables using slices only:
first_word is Hello. last_word is learners (without the exclamation mark; count from the end with a negative index). backwards is the whole message reversed. every_other takes every second character of the message, starting with the first.
What Check tests
first_wordisHellolast_wordislearnersbackwardsis the message reversedevery_othertakes every second character- The program prints the two words
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
main.py
Sign in to run your code.
Output
Press Run to see what your program prints.