DAY 26(CODE INFINITY)
Here is a question for you' all today .......
Question: Write a program to greet all person names stored in a list L1 and which starts with 's'
L1 =["Harry", "sohan", "sachin", "rahul"]
you should try it yourself as some find it very easy and some okay okay so just give it a try everyone .
answer for this is given below you take help from that also
code for this question is:
l1 = ["Harry", "sohan", "sachin" ,"rahul"]
for name in l1:
if name.startswith("s"):
print("hello",name)
Screenshot of the repel:
![]() |
Link of the repel:
https://replit.com/@shwetaantil97/greet-everyone-name-starting-with-s
Comments