← All practice pages
Python
Python String Operations
Strings are pieces of text. Python gives you slicing, formatting and a long list of built-in methods for cutting, joining and reshaping them.
Try it now
Refactor the following code that converts temperatures using repeated string concatenation in a loop to use f-strings and list comprehension instead.
Create a free account to run your answer and get ARIA's review.