Quiz Yourself on Python Basics

Take a short quiz on what you learned in this chapter.

1

What is the output of the following Python code?

str = 'programiz'
print('str[-1] = ', str[-1])
A)

str[-1] = p

B)

str[-1] = z

C)

str[-1] = i

D)

str[-1] = g

Question 1 of 40 attempted

Get hands-on with 1200+ tech skills courses.