Jun 13, 2019 in Python
Q: What is the output of the following?

string = "my name is x"
for i in string.split():
    print (i, end=", ")

a. m, y, , n, a, m, e, , i, s, , x,
b. error
c. my, name, is, x,
d. m, y, , n, a, m, e, , i, s, , x

1 Answer

0 votes
Nov 11, 2019

answer is a

m, y, , n, a, m, e, , i, s, , x,

Related questions

0 votes
Jun 13, 2019 in Python
0 votes
Jun 13, 2019 in Python
...