Sail E0 Webinar
Question
What is the output of the following?string = "my name is x"for i in string.split():    print (i, end=", ")
Options:
A .  m, y, , n, a, m, e, , i, s, , x,
B .  m, y, , n, a, m, e, , i, s, , x
C .  my, name, is, x
D .  error
Answer: Option C


Variable i takes the value of one word at a time.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers