Re: [Tutor] startin python

2018-02-23 Thread gonzales huerta
Thank you very much for the tips I hope we will be in touch in the futire jeovanny 2018-02-23 5:48 GMT-05:00, Steven D'Aprano : > Hello, and see my comments below. > > On Thu, Feb 22, 2018 at 10:34:53PM -0500, gonzales huerta wrote: >> SIRS >> I am an absolute beginner in

Re: [Tutor] Doubt in list comprehension

2018-02-23 Thread vinod bhaskaran
Thanks Peter. Shall figure it out with the below hint. I had a hunch am wrong but was not sure where to put in . Thanks, Vinod Bhaskaran On Fri, Feb 23, 2018, 7:11 PM Peter Otten <__pete...@web.de> wrote: > vinod bhaskaran wrote: > > > Hi All, > > > > I am a beginner programmer and i wrote a

Re: [Tutor] I have a problem with def

2018-02-23 Thread john fabiani
I don't what you are doing but it should be at least def func(): notice the colon at the end. Johnf On 02/22/2018 02:16 PM, David Bauer wrote: it doesn't work, you are suppsed to declare a function as def func() and it comes back as: File "", line 1 def func() ^

Re: [Tutor] startin python

2018-02-23 Thread Alan Gauld via Tutor
On 23/02/18 03:34, gonzales huerta wrote: > What would be the best compiler for writing a combined code PYTHON and C? There are several ways to do this and it depends on your application which is most practical. If w assume yyou want to access the C code from Python then: 1) Write a Python

[Tutor] startin python

2018-02-23 Thread gonzales huerta
SIRS I am an absolute beginner in PYTHON so I would like to ask your advice regarding the appropriate compilers. What would be the best compiler for a beginner? What would be the best compiler for writing a combined code PYTHON and C? 3)I need PYTHON for the following purposes: A)EMBEDDED

[Tutor] I have a problem with def

2018-02-23 Thread David Bauer
it doesn't work, you are suppsed to declare a function as def func() and it comes back as: File "", line 1 def func() ^ SyntaxError: invalid syntax that is not expected I would also expect def to turn red because it is a keyword in Python, but that doesn't happen, anyone else

Re: [Tutor] I have a problem with def

2018-02-23 Thread Mark Lawrence
On 22/02/18 22:16, David Bauer wrote: it doesn't work, you are suppsed to declare a function as def func() and it comes back as: File "", line 1 def func() ^ SyntaxError: invalid syntax that is not expected I would also expect def to turn red because it is a keyword in

Re: [Tutor] startin python

2018-02-23 Thread Steven D'Aprano
Hello, and see my comments below. On Thu, Feb 22, 2018 at 10:34:53PM -0500, gonzales huerta wrote: > SIRS > I am an absolute beginner in PYTHON so I would like to ask your > advice regarding the appropriate compilers. > What would be the best compiler for a beginner? Python is normally

Re: [Tutor] Doubt in list comprehension

2018-02-23 Thread Peter Otten
vinod bhaskaran wrote: > Hi All, > > I am a beginner programmer and i wrote a small program (as per a > assignment i saw) as below: > > newlist = [] > for a in range(2,5): > for b in range (0,3): > newlist.append([a]) > a = a + 1 > print(newlist) > > it gives the expected output as

Re: [Tutor] I have a problem with def

2018-02-23 Thread Bob Gailer
On Feb 23, 2018 3:58 AM, "David Bauer" wrote: > > it doesn't work, you are suppsed to declare a function as def func() and it > comes back as: > > File "", line 1 > def func() > ^ > SyntaxError: invalid syntax > > that is not expected I would also

[Tutor] Doubt in list comprehension

2018-02-23 Thread vinod bhaskaran
Hi All, I am a beginner programmer and i wrote a small program (as per a assignment i saw) as below: newlist = [] for a in range(2,5): for b in range (0,3): newlist.append([a]) a = a + 1 print(newlist) it gives the expected output as below: [[2], [3], [4], [3], [4], [5], [4], [5],

Re: [Tutor] Doubt in list comprehension

2018-02-23 Thread Mats Wichmann
On 02/23/2018 06:40 AM, Peter Otten wrote: > vinod bhaskaran wrote: > >> Hi All, >> >> I am a beginner programmer and i wrote a small program (as per a >> assignment i saw) as below: >> >> newlist = [] >> for a in range(2,5): >> for b in range (0,3): >> newlist.append([a]) >> a = a + 1

Re: [Tutor] startin python

2018-02-23 Thread Mats Wichmann
Just a quick clarification: > You could try a commercial IDE like Enthought Canopy, PyCharm, > ActiveState's Python (I think this one is called Anaconda?), or the Wing > Python IDE. ActiveState's Python is ActivePython while Anaconda is a separate distribution, also very useful. Both orient