0
explain it
l = "upadhyay raghvendra" for letter in l: if (letter == 'p' or letter == 'g'): continue; else: print(letter)
2 Antworten
+ 3
it prints all letters, except if it is a 'p' or a 'g'. Those are skipped.
+ 1
In python, continue mean you're skipping something...
So as your condition is saying if string's letters match with p or g letter it'll skip those letter...And then it will show rest of the letters.