Computer Science, asked by tusharmishra30112002, 8 months ago

Write the output of the following Python program code: data = ['D','o' , ' ' ,'I', 't', ' ','@','1','2','3',' ','!' ] for i in range (len (data)-1): if (data [i]. isupper ()): data [i] =data [i].lower ( ) elif (data [i]. isspace ( ) ) : data [i]=data[i+1] print (data)

Answers

Answered by luisecubero77
3

Answer:

Explanation:

data = ['D','o' , ' ' ,'I', 't', ' ','@','1','2','3',' ','!' ]  

for i in range (len (data)-1):

   if (data[i].isupper()):  

       data[i]=data[i].lower( )  

   elif (data[i].isspace( )):  

       data[i]=data[i+1]  

       print (data)

Attachments:
Similar questions