- 1
I think I've found a mistake in this example:
letters = ['a', 'b', 'c'] if 'z' in letters: print('any message') it returns False, but in your example it returns True please fix it with regards...
24 odpowiedzi
+ 5
I don't know if you tagged the right mod, for I can't check the Russian version ;)
So I'm passing over to Kuba Siekierzyński .
+ 5
OK, found it already. The Russian question contains ["a", "b", "c"] in the list, instead of ["a", "b", "z"]. Good eye, Magomed!
Still, the question is valid even with this typo, as it tells to print "Yes" ONLY IF "z" is found in the list. So for the Russian version -- "Yes" will not be printed. The if statement, however, is correct anyway.
+ 4
Hmm... is everything settled already?
I have checked the lesson and it seems fine, but I'm checking for English version. Is RU version different in this aspect, Magomed?
+ 1
eah there is no mistake
+ 1
yes, I agree
+ 1
just check snapshots
https://yadi.sk/d/_sL-eKewWOi7cg
0
Just found that example in last part of list in python and it's correct there is no mistake in that.
0
I can send you a screen
0
I checked in python console
0
letters = ['a','b','c']
if 'z' in letters:
print("yes")
this is that question right ?
If yes then read question properly it's correct
0
in list there is no 'z', so it can't print 'yes'
0
if z in list
0
Yeah that's what motive of code it will print nothing
0
there must be if 'z' not in letters
0
is there a mistake?
0
you can check the code yourself
0
fill in the blanks to print yes if list contain z
this is question and it's clear that it only going to print yes if it have z
please consider "if present"
0
already checked it out
it will not print yes and that's what we need as output
0
soon you'll see that I was right
the question and the example totally wrong
at least in russian
0
hi