Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

PYTHON

Name: ¯\(º_o)/¯ 2012-01-22 9:07

>>> True
True
>>> True = False
>>> True
False
>>> False = True
>>> False
False

IS THIS BECAUSE I FORGOT TO INDENT

Name: Anonymous 2012-01-22 10:19

Try this

>>> True, False = False, True

Name: Anonymous 2012-01-22 10:44

Whoah, this is brilliant. You can make a variable called True!

Name: Anonymous 2012-01-22 11:28

Someone doesn't understand how Python works...

Name: Anonymous 2012-01-22 12:13


http://codepad.org/w29GHX9A
True = False
print True

if (1 > 5) == True:
    print True

Name: Anonymous 2012-01-22 12:31

>>4
Someone doesn't understand why FIOC fucking sucks. (Hint: it's about forcing something)

Name: Anonymous 2012-01-22 12:34

>>6
This is coming from someone who has, at best, an average reading comprehension level. Nice job chief. Now get really for a long and illustrious career in IT sales.

Name: Anonymous 2012-01-22 12:48

I have Python's IDLE installed (even though I don't remember the last time I used it), and I tried out a True = False, but it returned a SyntaxError: assignment to keyword. Different version maybe?

In any case, OP's question is kind of easy to answer whether you know Python or not.

x = 5
y = 3

x = y // since y equals 3, x will also become 3

// Now if you try out:
y = x // Remember that the x's current value is 3? This 3 will be assigned to y

y // this will return 3



Assuming it's possible to treat a keyword as a variable name, True = False will make True's value became False, so when you assign True's new value (which is False) to False, False will become (errr... remain) False.

Name: Anonymous 2012-01-22 13:08

>>8
False will become (errr... remain) False.
Actually, there will be a new variable with that name created and shadow the keyword/literal False. That boolean value itself will remain unchanged.

Name: Anonymous 2012-01-22 14:23

irb(main):005:0> true = false
SyntaxError: (irb):5: Can't assign to true
true = false
      ^
    from /usr/bin/irb:12:in `<main>'

ruby > python officially, grab your buttplugs

Name: Anonymous 2012-01-22 14:32

>>10
7/10

Name: Anonymous 2012-01-22 14:33

>>7
This is coming from someone who has, at best, an average reading comprehension level. Nice job chief. Now get really for a long and illustrious career in IT sales.

Don't change these.
Name: Email:
Entire Thread Thread List