Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Retrieving Letters from String | Variables and Types in Python
Introduction to Python (dev copy)

bookChallenge: Retrieving Letters from String

Task

Swipe to start coding

You're given the string "This is string for learning" stored in the variable test_str. Your tasks are to:

  1. Retrieve and display the first character of the test_str (using the first print() function).
  2. Retrieve and display the last character of the test_str (using the second print() function).
  3. Retrieve and display the word string from the test_str variable.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 10
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 1.64

bookChallenge: Retrieving Letters from String

Swipe to show menu

Task

Swipe to start coding

You're given the string "This is string for learning" stored in the variable test_str. Your tasks are to:

  1. Retrieve and display the first character of the test_str (using the first print() function).
  2. Retrieve and display the last character of the test_str (using the second print() function).
  3. Retrieve and display the word string from the test_str variable.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

close

Awesome!

Completion rate improved to 1.64
SectionΒ 2. ChapterΒ 10
single

single

some-alt