I am working on a program where I found the line:
x,y,z = np.loadtext('abcabc.txt', unpack= True, skiprows =1)
What does the x, y, z thing mean?
What does the unpack= True mean?
Thank you
--
Khabbab Zakaria
Dept of Power Engineering
Jadavpur University
Calcutta
India
Thanks a lot.
that helped me to understand that behaviour.
Best regards.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Hi,
I am playing with python3.6 and i noticed a change in the behaviour of the
open() builtin function.
The file opened using open() is closed automaticaly after iterationg over it in
the python shell
Here is the dummy code i am using:
# Beggin
testfile = open('test.txt')
for line in
Basically, what that said is the global interpreter lock is something that
allows only one thread at a time to be executed when you launch a python
program in opposition of executing multiple threads at the same time
(parallelism). when you launch a python program it create a process in
memory.
Is there any practical usage of using reference cycling?
On Sat, 2016-09-03 at 14:56 +0100, Alan Gauld via Tutor wrote:
> On 03/09/16 04:25, monik...@netzero.net wrote:
>
> >
> > Is this what you mean?
> > a = 5
> > b = a
> > a = b
>
> No, you are confusing variable names with objects.
>
Hi,
Composition is a technique that allows you to express the 'has a'
relationship between your object.
I'm not a specialist of the OOP but I can see some issues in the model that
you expose in your mail.
Encapsulation and abstraction are all about designing an API. It allows you
to expose
Let me clarify some ideas that I spoke about in my last email.
I talked about extending exception and linearization from the perspective
of inheriting from a class without adding behavior or some extra
attributes, because the code you provided was doing that.
Reading the Alan response made me
Assignment and inheritance are not comparable at all
In the inheritance you are extending the base class (a) and in "a=b()" you
are instantiating it - you create an object according to the blueprint that
you difining.
To understand the difference.
Inheritance:
Say you defined a costume type (a
The " {} " is the place holder of the values of a, b and c argument
passed to format.
this example maybe can help to understand
print('I like the python {}'.format('mailing-list'))
will output
>>> I like the python mailing-list
The format methode will substitute the {} with the argument it
if you print the values of a, b ,c that satisfy and don't satisfy the
condiction cm == 50 at the same time, you can't know what works and
what did not work.
here is the code that i wrote and worked well
for a in range(1, 11): # i replaced 10 by 11 to include the 10
for b in range(1,
Just replace r.iter_content(...) By response.iter_content(...)
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
I noticed that you didn't store what requests downloaded in a new file you
created. The usual pattern to use is to download a file and writing it to
the HD drive. You have to create a file with "With
open(file_name.extention, "wb") as f: " and write to that file.
Here is the code that I suggest
Steven D'Aprano wrote:
> On Wed, May 11, 2016 at 02:00:47PM +0100, khalil zakaria Zemmoura wrote:
>> Hi,
>>
>> Suppose we have a dict
>> Dic = { True: 'yes', 1: 'No'}
>>
>> According to the Python 3 documentation, the keys must have a unique
>>
Hi,
Suppose we have a dict
Dic = { True: 'yes', 1: 'No'}
According to the Python 3 documentation, the keys must have a unique value
so True is converted to integer because of the type coercion (boolean are
subtype of integer) so boolean are winded to integer to be compared.
Am I missing
Hi,
there is one place i think you have to have a look at it and it's the
python official site.
One thing i love about python is the so well written documentation, i
remember when i was learning ruby and had to go to the official doc! it was
hard to understand for the beginner how i was. so, here
Hi,
I think your function runs forever because the only thing it done is
calling it self when entering the for loop
when you call your function in the for loop it jump to the definition (def
howMany(aDict)) then initialise count and bond the value 0 to it then enter
a for loop then call the
Hi,
Other_hand seems to be a tuple object which is immutable (unchangeable) so
you can't alter it.
By the way, what other_hand is supposed to be?
A variable that you declared as tuple?
An instance of a class?
As other people said to you, we can only guess because we don't see where
"other_hand"
-- Forwarded message --
From: Abhishek Kumar
Date: 2016-03-29 7:15 GMT+01:00
Subject: Re: [Tutor] How python keeps track of data types
To: Tutor@python.org
Thanks everyone for answers and links.I wasn't aware of fact that python
names are just references
18 matches
Mail list logo