p
y
c
h
a
l
l
e
n
g
e
r
Home
Python Basics
Loops
Exercise: Reverse string with for-loop
Exercise: Reverse string with for-loop
Create a for-loop that assigns the reverse of
text
to the variable
reversed_text
.
Premium
reset
def greet(name): return f"Hello, {name}!" print(greet("Erik"))
Python
Setting up Python environment...
Output