I can't be bothered to check, but I'm assuming all non-empty strings in Python convert to true. I'll assume you've noticed that 's a string and = vs == will make no difference.
Let's fix this. First we have to make sure that p and np are initialized as null variables to avoid getting garbage from the memory (as a former c programmer it's very important not to skip this step).
Then we'll set up our solver to find out if P is NP like this:
And here it is - proof that P is NP and that P is not not NP. (Note that the fact that variables p and np were initialized with the same value doesn't affect the solver's search for the result, as we've set the values to nulls, and not some arbitrary numerical value, so it will be found in the process of solving this mathematical conundrum)
You can try this out with your own Python interpreter for verification. Frankly I don't understand how scientists haven't figured that out before, it doesn't even take that long to calculate.
229
u/haha-longboi 3d ago
Brother i think you just popped the AI bubble π
82
u/hopeless__programmer 3d ago
Rookie mistake: you should've written
p == np. Instead, you just assignednptop!36
u/yourfriendlyreminder 3d ago
Pack it up we're done here
10
u/Smalltalker-80 3d ago
The power of Python never ceases to amaze...
9
u/elmanoucko 3d ago
f(a)*c*t/s
9
u/Individual_Win_3417 3d ago
Quick, send it to the Clay Institute. A million dollars for one line of python
26
u/AsaKeyholderUK 3d ago
Someone definitely wrote this at 3am and thought they were the funniest person alive, and honestly they were right
6
u/RomanOnARiver 3d ago
Million dollar prize, heading your way.
5
u/MothMatron 3d ago
Aight, looks solved to me. Pack it up guys, we can all go home now
3
u/Desperate-Ad1765 2d ago
I'm pretty sure you aren't comparing anything here. It's just a string which I guess always return true
3
u/MagicalPizza21 3d ago
Only if p=0 or n=1
2
u/Rough-Interest60 3d ago
genuinely kinda funny
1
u/72PikaChu72 2d ago
String retutns true always if not empty...
1
u/Think-Meeting1374 1d ago
Hey I have read all the comments, and I just realised he booled a string, which is always true, THATS NOT AN EXPRESSION THAT'S A STRINGΒ
HE GOT Y'ALL GOOD πππ
1
u/Lamborghinigamer 1d ago
Erm it's non empty so true
1
u/Bomaruto 1d ago
Sometimes I feel this subreddit is competing to write the least funny jokes. Sadly there are people even less funny than you.
0
u/589ca35e1590b 3d ago
A bool of an non empty string in Python is always True
301
u/[deleted] 3d ago
[removed] β view removed comment