home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 134,965 of 135,536   
   Stefan Ram to Richard Kettlewell   
   Re: Python: A Little Trick For Every Nee   
   20 Jan 26 17:40:10   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca