osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

list initialize with ?


On Sat, 30 Jun 2018 05:49:03 -0700, Sharan Basappa wrote:

> On Saturday, 30 June 2018 17:48:05 UTC+5:30, Steven D'Aprano  wrote:
>> 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:
[...]
> oh, ok. I assumed that ? has some special meaning. I should be able to
> find out more.

It could have whatever special meaning the creator of the code chooses to 
give it. Without knowing the context of what you are doing with it, what 
libraries you are using, what functions it gets passed to, it could mean 
anything.

Your question is like asking:

    "I have a variable called x, what does it mean?"


Without more information, how could we tell?


> PS: Actually, its not my code. I am using an online code as reference
> for my research.

Then you should check the documentation for this online code.




-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson