← Back to Video Labs Interactive Companion Lab

String Manipulation & F-Strings Practice Hub

Experiment with live slicing, test f-string format specifiers, and complete 3 interactive coding drills.

Challenges Solved
0 / 3

1. Live String Slicer Visualizer

text[0:6:1]
Result: 'PYTHON'

2. F-String Format Specifier Playground

Test how Python formats amount = 12450.6789 with different specifiers:

f"{amount:,.2f}"
'12,450.68'

3. Interactive Code Drills (Type the Exact Output)

Drill 1: What does " Python3 ".strip()[::-1] evaluate to? (without quotes)

Drill 2: If price = 49.956, what does f"${price:.2f}" produce?

Drill 3: If x = 7, what is the exact output of f"{x*2=}"?