Hello I am trying to check some chars in a string. I found this code in the web. It works but I need to get i variable inside of the if block.
This is my code:
chars = set('qwertyuopasdfghjklizxcvbnm!"^+%&/()=?')
if any((i in chars) for i in myString):
myIndex = myString.index(i)
But I've got this:
NameError: name 'i' is not defined