I have a file like:
@HWI
ABCDE
+
@HWI7
EFSA
+
???=AF
GTEY@JF
GVTAWM
I want to keep only the strings ( so remove everything that contains a symbol )
I tried :
import numpy as np
arr = np.genfromtxt(f, dtype=str)
for line in np.nditer(arr):
if np.core.defchararray.isupper(line) and not '@?=;?+' in line:
print line
but it gives :
@HWI
ABCDE
@HWI7
EFSA
???=AF
GTEY@JF
GVTAWM
and I am expecting:
ABCDE
EFSA
GVTAWM
I want to use numpy for this and not commands like regex or similar.