R
Q. What will be the output of given Python code?
Code:
str1="hello"
c=0
for x in str1:
if(x!="l"):
c=c+1
else:
pass
print(c)
c=0
for x in str1:
if(x!="l"):
c=c+1
else:
pass
print(c)
- Correct Answer - Option(C)
- Views: 142
- Filed under category Python
Discusssion
Login to discuss.