GUVI
Back

explain the loop 

Created 2 years ago
27 Views
2 Comments
SaravananY5A8zv
@SaravananY5A8zv
SaravananY5A8zv
@SaravananY5A8zvProfile is locked. Login

x = "abcdef"

i = "i"

while i in x:

print(i, end="")

expected output=abcdef

actual output=nil

x = ['ab', 'cd']

for i in x:

i.upper()

print(x)

expected output= ['AB', 'CD']

actual output= ['ab', 'cd']

Comments (2)
Please login to comment.
 
Powered by habitate.io Habitate