Join() function
lis=["sarah","jossie","vivi","preeti","soundariya","rakul"]
for item in lis:
print(item,"and",end=" ")
print("other my gfs")
#this code result is same as upper code but in this we had used join function which make easy to code.
a=" and ".join(lis)
print(a,"other ex gfs")
Comments
Post a Comment