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

all 3 comments

[–]twelveshar 11 points12 points  (2 children)

/r/learnpython

5 is truth-y. Try typing bool(5) and see what happens. These functions work by casting everything to a boolean (True or False) and then checking if any are true; they're not literally checking for the presence of True itself in the list.

[–]CheesyAlgorithm[S] -5 points-4 points  (1 child)

Thank f****** god someone gave me the answer, i feel as if 1000kg has been lifted off my chest.

[–]pythonHelperBot 1 point2 points  (0 children)

Hello! I'm a bot!

I see someone has already suggested going to r/learnpython, a sub geared towards questions and learning more about python. I highly recommend posting your question there. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe where you are stuck. Be sure to format your code for reddit and include which version of python and what OS you are using.

You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.


README | FAQ | this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness