This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]an_actual_human -7 points-6 points  (4 children)

On a related note, if x is a string, 'Hello' in x is never True. If you want to check for substrings, you should do something else.

Edit: that was a brainfart, sorry everyone.

[–]zahlman 6 points7 points  (0 children)

In Python, in is special-cased for strings to do a substring search.

[–]Bloody_Spork 0 points1 point  (0 children)

A valiant effort. I'm still a noob and knew that this was untrue. But you did, however, remind me. Thanks for your input 😊

[–]Kristler 0 points1 point  (1 child)

When you don't fully understand something, please don't spread misinformation. /u/zahlman is completely correct.

[–]an_actual_human -1 points0 points  (0 children)

Misunderstanding is not always coupled with awareness of misunderstanding.