Informatics Practices

Write the output of the following:

for i in '123' :
   print ("Message",i,)

Python Control Flow

1 Like

Answer

Message 1
Message 2
Message 3

Working

The code uses a for loop to iterate over each character in the string '123'. During each iteration, it prints the string "Message" followed by the current character i.

Answered By

2 Likes


Related Questions