On 2/26/19 11:36 AM, Maninath sahoo wrote:
is it possible reverse inheritance?
mean child class to parent class
Well, it's Python, so you can do all sorts of things, some of them good
ideas, some bad...
Like Alan says, the question as asked doesn't really make a lot of sense
to us, but the
On 26/02/2019 18:36, Maninath sahoo wrote:
> is it possible reverse inheritance?
> mean child class to parent class
I have no idea what you mean by that. How would it work?
Can you give an example of the kind of thing you want to do?
For example Circles and Rectangles are kinds of Shape
so their
On 16/01/2019 18:26, Maninath sahoo wrote:
> Using of relational operator i Python?
> How to use relational operator in List.
> Please answer me..
Relational operators are more commonly called
comparisons (or predicates). You use them with
a List much as you use any other object.
if list1 == list
it's because of how the language works. c is a compiled lang. py an
interpreted one ( more of a hybrid i would say )
if you write a language in c like
if a == 5: do this
then run your c program to execute it, you get pretty much what python is
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.c
On Mon, Jan 07, 2019 at 09:59:31PM +0530, Amit Yadav wrote:
> How can simply typing
>
> print "hello world"
>
> work?
> Like without including any header file or import statements how can it work.
Why shouldn't it work? Python is not C and doesn't use header files.
In Python, the interpreter k
Amit Yadav wrote:
> How can simply typing
>
> print "hello world"
>
> work?
> Like without including any header file or import statements how can it
> work.
In Python 2 print is part of the syntax that the compiler knows, just like
int
or
for (... ) {}
in C. In Python 3 print is just a na
On 1/7/19 9:29 AM, Amit Yadav wrote:
> How can simply typing
>
> print "hello world"
>
> work?
> Like without including any header file or import statements how can it work.
because you're using a function (or in your case - which looks like
Python 2.x because it is not written as a function ca
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 sm
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
>
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 be
On 29 Jan 2018, at 7:42, vinod bhaskaran wrote:
As the new character is adding the char in the new string but how is
it
getting reversed without any line giving the char number to be
traversed in
reverse order.
You don't need that, think about this example
newstring = ''
oldstring = "Newton
Thanks a lot Nitin. I misunderstood the "char + newstring".
As a newbie to programming as well as newbie to Python trying to grasp
basics. Sure will need the built in functions present for different things
in Python.
Any suggestion good book for python?
Thanks,
Vinod Bhaskaran
On Mon, Jan 29, 201
Vinod,
First time it loops,
newstring = ‘’
oldstring = ‘Newton’
char = ‘N’
char + newstring = ‘N’ + ‘’ = ‘N’
Second time it loops,
newstring = ‘N’
oldstring = ‘Newton’
char = ‘e’
char + newstring = ‘e’ +’N’ = ‘eN’
Third time it loops,
newstring = ‘eN’
oldstring = ‘Newton’
char = ‘w’
char + news
On 29/01/18 06:42, vinod bhaskaran wrote:
> newstring = ''
> oldstring = 'Newton'
> for char in oldstring:
>newstring = char + newstring
> print(newstring)
>
> Could someone explain how it is traversing to get the string reversed?
print statements are your friend.
Add print statements everyw
On 04/04/2013 08:23 AM, Dave Angel wrote:
On 04/03/2013 09:53 PM, Steven D'Aprano wrote:
On 04/04/13 12:29, bessenkphilip wrote:
Hi all,
I'm having a doubt in the below program's 2n'd "for" loop.
for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
...
I believe Dave answered the OP's intended question.
On Apr 3, 2013 9:54 PM, "Dave Angel" wrote:
> On 04/03/2013 09:53 PM, Steven D'Aprano wrote:
>
>> On 04/04/13 12:29, bessenkphilip wrote:
>>
>>> Hi all,
>>>
>>> I'm having a doubt in the below program's 2n'd "for" loop.
>>>
>>> for n in range(2
On 04/03/2013 09:53 PM, Steven D'Aprano wrote:
On 04/04/13 12:29, bessenkphilip wrote:
Hi all,
I'm having a doubt in the below program's 2n'd "for" loop.
for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n, 'equals', x, '*', n/x
...
On 04/04/13 12:29, bessenkphilip wrote:
Hi all,
I'm having a doubt in the below program's 2n'd "for" loop.
for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n, 'equals', x, '*', n/x
... break
... else:
... # loop fell
On 10/23/2012 04:14 PM, Nitin Ainani wrote:
Dear Sir/Madam,
I am new to python I have a question. It is as follows:
Suppose *s* is a variable and *s* stores empty string
s=""
Now if we write following statement
print(s[0]) # it gives error
print(s[0:])# it does not give error
wh
On 24/10/12 10:14, Nitin Ainani wrote:
Dear Sir/Madam,
I am new to python I have a question. It is as follows:
Suppose *s* is a variable and *s* stores empty string
s=""
Now if we write following statement
print(s[0]) # it gives error
print(s[0:])# it does not give error
why?
On 10/23/2012 07:14 PM, Nitin Ainani wrote:
> Dear Sir/Madam,
>
> I am new to python I have a question. It is as follows:
>
> Suppose *s* is a variable and *s* stores empty string
>
> s=""
> Now if we write following statement
>
>
> print(s[0]) # it gives error
There is no 0th character, so
> You are confusing me for the OP. Please read carefully next time before
> you respond to the wrong person.
>
> I bumped because the OP's question was not specific and I thought I
> talked about people making their requests or questions very specific if
> they expect any useful replies.
Hi E
Luke take note; the message was not from me!
- Original Message -
From: "Luke Paireepinart" <[EMAIL PROTECTED]>
To: "Evans Anyokwu" <[EMAIL PROTECTED]>;
Sent: Sunday, June 25, 2006 10:26 PM
Subject: Re: [Tutor] doubt in Regular expressions
> Post Scr
Post Script: Sorry for the double e-mail, Evans. I forgot to forward
it to the list the first time.
Also, why don't replies automatically forward themselves to the list
like the pygame mailing list does?
For privacy reasons, in case you want to reply to someone separately?
End of P.S.
-
bump
- Original Message -
From:
ravi
sankar
To: tutor@python.org
Sent: Sunday, June 25, 2006 9:17 PM
Subject: [Tutor] doubt in Regular
expressions
hello all, i want to search strings in the database
available and return the link of the string instead simply
Siddhart:
Kent is correct, I tried the os.system('clear')
on my Debian linux box and the screen clears. Don't forget to use
import os. Also, I 'm new to Python. Hello community.
Ezra Taylor
On 6/6/06, soumitr siddharth <[EMAIL PROTECTED]> wrote:
>
> how do i clear the sc
soumitr siddharth wrote:
> how do i clear the scseer ??
> suppose i have two pages to display one
> after the other ,how should i do it ?
It depends on the OS and the type of display. For a console application
on Windows, use
os.system('cls')
On Linux I think the corresponding command is
os.syst
>> Try to rephrase that question. I don't think I was the only one not
understanding what you are asking?
Try to rephrase that response. I'm sure that you understand the double
negative in the second sentence, but many who speak English as a second
language (including, possibly, the original poste
Try to rephrase that question. I don't think I was the only one not
understanding what you are asking?
>how do i clear the scseer ??
>suppose i have two pages to display one
>after the other ,how should i do it ?
--
This email has been scanned for viruses & spam by Decna as - www.decna.no
De
Hi Joaquin,
Remember to Reply-All for the whole list to receive the message.
Joaquin Sanchez Sanchez wrote:
> Im proving pickle in python.
> As I mentioned before, i do pickle.dump for two times,
> because I want to save two dictionaries.
>
> Then to save the dictionaries, with one pickle.load()
swaroop = Person('Swaroop')
swaroop.sayHi()
swaroop.howMany()
kalam = Person('Abdul Kalam')
kalam.sayHi()
kalam.howMany()
swaroop.sayHi()
swaroop.howMany()
#
MY OUTPUT
(Initializing Swaroop)
Hi, my name is Swaroop.
I am the only person here.
(Initializing Abdul K
Edgar Antonio Rodríguez Velazco wrote:
> Hi everybody,
> I've been reading the chapter of classes of Byte of Python by Swaroop.
> There's an example with classes (11.4) that is below:
The example is depending on Person.__del__() being called on swaroop and
kalam when the intepreter exits. The Py
32 matches
Mail list logo