0
It's easy but I can't remember
Hi, I can't remember an easy thing, how could I do like this: a = [1,2,3,4,5] if " An element of the array a" == 3: ....
17 odpowiedzi
+ 1
for x in [1,2,3,4,5]:
if x == 3:
return True
+ 1
Thank you bro, that's exactly what I was looking for!
0
if 3 in a:
...
0
No, I need exactly as I have shown, I don't know what to put instead of "An element..."
0
Do you mean if a contains 3?
0
yep
0
Try what i wrote, it works
0
Can I write like this?
0
"contains"?
0
Like what?
0
the word contains
0
use in
if 3 in a:
....
0
no I can't in my project
0
I need the way as I told
0
Hmmm...
0
Yeees
0
Ok