Q:

checking if a letter is present in a string in python

How can I check if the letter "N" is present in a string. 
Example:
flag = False
if string contains N:
   flag = True

So flag = True if string is "CNDDDNTD" and flag = False if string is "CCGGTTT".  I think re.search will work, but not sure of the options to use. 

A:

>>> 'N' in 'PYTHON'
True
>>> 'N' in 'STACK OVERFLOW'
False
>>> 'N' in 'python' # uppercase and lowercase are not equal
False
>>> 'N' in 'python'.upper()
True

Also, there is no need for a conditional statement when assigning to your flag.   Rather than
flag = False
if 'N' in your_string:
   flag = True

do
flag = 'N' in your_string

