From: ram@zedat.fu-berlin.de   
      
   Richard Kettlewell wrote or quoted:   
   >I’ve no idea, but it doesn’t matter.   
      
    There are tools out there for turning Python code into executables,   
    and maybe some folks here have already used one executable   
    generated this way without even realizing it was written in Python.   
      
    Normally, Python gets compiled into intermediate bytecode that   
    the interpreter runs, but lately there have been experiments   
    with JIT compilers.   
      
    BASIC   
      
   10 LET sum = 0   
   20 FOR i = 1 TO 100   
   30 LET sum = sum + i   
   40 NEXT i   
   50 PRINT sum   
      
    Python   
      
   sum(range(1,101))   
      
    BASIC   
      
   10 FOR i = 1 TO 10   
   20 FOR j = 1 TO 10   
   30 FOR k = 1 TO 10   
   40 PRINT i; j; k   
   50 NEXT k   
   60 NEXT j   
   70 NEXT i   
      
    Python   
      
   from itertools import product   
      
   for i, j, k in product(range(1, 11), repeat=3):   
    print(i, j, k)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|