+ 2

If we have list l1,l2,l3.... then how can we check the presence of a element in it by looping

Ex : while true: l (<number>) In this the loop variable must replace (<number>) by the numbers 1,2,3,,... so that list can be used

22nd Mar 2020, 5:49 AM
Vijay Gunwant
Vijay Gunwant - avatar
1 Answer
0
VIJAY GUNWANT You can use FOR LOOP. a = 'abcdefg' b = 'efghijkl' for i in a: if i in b: print(i) This would print e f and g. You can use any name instead of 'i' like 'letter' or character or anything. Post ur code here, so that we can help more.
22nd Mar 2020, 6:03 AM
maf
maf - avatar