214k views
4 votes
7.3.4: Find the Error

User NoNameZ
by
4.9k points

1 Answer

1 vote

Answer:

my_string = "hello!"

# One of the two lines below will cause an error.

# Each line is an attempt to replace the first

# letter of myString with H. Comment out the

# line you think is incorrect.

# my_string[0] = "H"

my_string = "H" + my_string[1:]

print(my_string)

Step-by-step explanation:

User Davy
by
5.1k points