[python] array's

Started by
13 comments, last by Brandon N 18 years, 10 months ago
I'm not sure what you mean, but if you write your code in somefile.py and then type in the command line "python somefile.py" it'll be run there.

Oh, and you have to assign a splice. Doing a[::-1] will return the spliced list, not auto-assign it to a.
i.e.:
s = a[::-1]
print s
Advertisement
I don't understand your question. A python program will produce the same output whether you run it from within IDLE or as a standalone program.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
but isnt there any other compiler for python like ms visual C++?
Quote:Original post by jordi_0071
but isnt there any other compiler for python like ms visual C++?


There are two main python distributions (as far as I am aware of), the Python Foundation's and ActiveState's. There are a few python interpreter ('compiler') implementations: CPython, Jython, Stackless; all with a specific purpose. There are a number of Python IDEs: IDLE, wxPython's PyCrust, PythonWin, Boa Constructor, Komodo, Visual Python...
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Quote:Original post by jordi_0071
but isnt there any other compiler for python like ms visual C++?

If you mean as in something that "makes a program" (ie .exe in windows) then no, nothing that relaly does that (outside of py2exe which just wraps this process).

This topic is closed to new replies.

Advertisement