1. 15
  1.  

  2. 13

    True and False are names in Python 2; you can change the value of True to False if you’d like (or to any other value for that matter).

    Not as much fun as this though:

    >>> import ctypes
    >>> 
    >>> value = 2
    >>> ob_ival_offset = ctypes.sizeof(ctypes.c_size_t) + ctypes.sizeof(ctypes.c_voidp)
    >>> ob_ival = ctypes.c_int.from_address(id(value)+ob_ival_offset)
    >>> ob_ival.value = 3
    >>> print 1+1
    3
    
    1. 4

      You can do the same thing in Java too:

      java.lang.reflect.Field f = Class.forName("java.lang.Integer").getDeclaredField("value");
      f.setAccessible(true);
      f.setInt(2, 3);
      System.out.println(java.util.stream.Stream.of(1, 1).reduce(0, Integer::sum));