keywords_in_abstract = []
for ab in downloaded_abstracts:
keyword_box = []
words = ab.replace('.','').split(' ')
for w in words:
if w.upper() = disease:
keyword_box.append(w.upper())
for w in words:
if w.upper() = disease:
keyword_box.append(w.upper())
I typed it like this.
if w.upper() = disease:
Syntax Error: invalid syntax: <string>, line 56, pos 30
I got this error... Why is it coming up? <
python
>>> s = "aBc"
>>> if s.upper() = "ABC":
SyntaxError: invalid syntax
>>> if s.upper() == "ABC":
print(f"{s} equals `ABC`")
aBc equals `ABC`
© 2024 OneMinuteCode. All rights reserved.