Computer Science, asked by shivpreetrathore83, 6 months ago

Give the output of the following python statements.
L=list("data")
X=""
count = 1
for i in L:
if i in ["a", "e", "/", "o", "u"):
X=X+i.swapcase()
else:
if (count%2) !=0:
X=X+str(len(L[:count]))
else:
X=X+i
count=count+1​

Answers

Answered by DarkShadow040
0
First of all, kindly put proper indents

Secondly,the list in if i in [] etc is wrong since the ending is a curve bracket not a square bracket

Thirdly, there wouldn’t be any output because there is nothing to print there only. AI output would be blank
Similar questions