list initialize with ?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sat Jun 30 08:15:29 EDT 2018
On Sat, 30 Jun 2018 04:50:10 -0700, Sharan Basappa wrote:
> Can anyone explain to me what the ? does here:
>
> ignore_words = ['?']
Its a question mark inside a string, which is inside a list. You can put
anything you like in strings:
'a'
'abcde'
even punctuation like '?'. Then you can put the string inside a list.
What you do with it, I have no idea -- presumably its your code.
--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson
More information about the Python-list
mailing list