Dear all-
I want to do some loops. Each loop will generate a tuple. Eventually I want
to put tuples together in a higher level of tuple. Do you know how to do
this?
Say a=(1,2,3), b=(4,3,2),c=(9,5,6). I want to get a tuple as ((1,2,3),
(4,3,2),(9,5,6)).
If there are just 2 tuples, I can write x
Dear all-
Let a=(3,4,7), b=[3,4,7].
If I type
print '%d + %d = %d' %(a)
I get
3 + 4 = 7
But if I type print '%d + %d = %d' %(b), I get errors.
If there is a way for doing this kind of type dirrectly from array.
Thank you!
Fangwen
___
Tutor maillist
Dear all-
If I have an array array([1, 2, 3, 4, 5, 6]), and I want to get
((1,2),(3,4),(5,6)). What should I do?
Thank you!
Fangwen
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dear all-
I want to get a histogram. And I did the following.
from pylab import *
x=(1,1,2,2,2,2,3,4)
hist(x)
Then I get
(array([2, 0, 0, 4, 0, 0, 1, 0, 0, 1]), array([ 1. , 1.3, 1.6, 1.9, 2.2,
2.5, 2.8, 3.1, 3.4, 3.7]), )
But actually I want to get a picture.
What
Dear all-
I am a new-comer to [EMAIL PROTECTED] I guess a lot of my future questions may
have been asked by others already.
As I am a new-comer, I don't have the previous emails.
I wonder whether there is a way for searching for previous questions and
answers so that I don't need to ask si