I want to print below matrix.
can any one suggest me the method for the same
1 2 3
4 5 6
7 8 9
Thanks
--
Viral Shah
IT Department,
E-mail : shahviral...@gmail.com
Mobile : (+91) 9722312220
--
Viral Shah
IT Department,
E-mail : shahvi
On 30/04/12 08:00, viral shah wrote:
I want to print below matrix.
can any one suggest me the method for the same
1 2 3
4 5 6
7 8 9
print '''
1 2 3
4 5 6
7 8 9
'''
But I suspect yo
On 30/04/2012 08:00, viral shah wrote:
I want to print below matrix.
can any one suggest me the method for the same
1 2 3
4 5 6
7 8 9
Thanks
___
Tutor maillist - Tutor@python.org
To unsubscr
What does your input look like?
Please provide that information.
Regards,
- SWP
On Mon, Apr 30, 2012 at 12:30 PM, viral shah wrote:
>
>
> I want to print below matrix.
>
> can any one suggest me the method for the same
>
> 1 2 3
> 4 5 6
> 7 8
Hi
I'm new in the learning of python
I want to make simple code for two variable addition
Please help me in the following code
*x = 12
print x
y =20
print y
z = x+y
print 'Addition of above two numbers are : ' + int.z
*
when I run this same I got an error message :
*AttributeError: type object
Viral
You should be doing this
"Addition of two numbers is" + str(x+y)
+ operator works on same datatypes and int being one of the built in objects in
python does not have a method z
U shld use str() or int() to do type conversion
-Kapil
कपिल शुक्ला
-Original Message-
From: viral s
On 04/30/2012 05:50 AM, viral shah wrote:
> Hi
>
> I'm new in the learning of python
>
> I want to make simple code for two variable addition
>
> Please help me in the following code
>
> *x = 12
> print x
> y =20
> print y
> z = x+y
> print 'Addition of above two numbers are : ' + int.z
> *
> when
I am using imaplib module for connecting to Gmail Imap, and i am getting
the below mentioned error.
I am using select command to connect
Labelname is **LabelName
I Get this Error:
resp, data = self._imap.select("**LabelName")
File "/usr/lib/python2.6/imaplib.py", line 642, in select
On 30/04/12 11:00, Kapil Shukla कपिल शुक्ला wrote:
Viral
You should be doing this
"Addition of two numbers is" + str(x+y)
There is no need for str() since print implicitly calls string to
convert objects to string format. Also the addition is not needed since
print takes a comma separated l
On 30/04/2012 18:36, Alan Gauld wrote:
On 30/04/12 11:00, Kapil Shukla कपिल शुक्ला wrote:
Viral
You should be doing this
"Addition of two numbers is" + str(x+y)
There is no need for str() since print implicitly calls string to
convert objects to string format. Also the addition is not needed
On 30/04/12 19:27, Mark Lawrence wrote:
print 'Addition of above two numbers are : ', z
Except that you'll get two spaces after the colon :)
OK thats true,
Try this:
print 'Addition of above two numbers are :', z
for one. :-)
But if the number of spaces is critical string formatting is be
Hi,
I have a newbie type question. Say I have started a python (or
ipython) session and have done some imports and have also defined some
new variables since the session started. So, I have in my current
namespace a bunch of things. Suppose I want to list just those
variable names which have b
On 30 April 2012 23:25, Comer Duncan wrote:
> Hi,
>
> I have a newbie type question. Say I have started a python (or
> ipython) session and have done some imports and have also defined some
> new variables since the session started. So, I have in my current
> namespace a bunch of things. Suppose
On 30/04/2012 19:40, Alan Gauld wrote:
On 30/04/12 19:27, Mark Lawrence wrote:
print 'Addition of above two numbers are : ', z
Except that you'll get two spaces after the colon :)
OK thats true,
Try this:
print 'Addition of above two numbers are :', z
for one. :-)
But if the number of sp
Mark Lawrence wrote:
On 30/04/2012 19:40, Alan Gauld wrote:
But if the number of spaces is critical string formatting is better
still. And better than string addition.
True indeed, but which of the three versions of string formatting that
I'm aware of?
Any of them.
--
Steven
__
On 01/05/2012 00:35, Steven D'Aprano wrote:
Mark Lawrence wrote:
On 30/04/2012 19:40, Alan Gauld wrote:
But if the number of spaces is critical string formatting is better
still. And better than string addition.
True indeed, but which of the three versions of string formatting that
I'm awa
On 30/04/12 22:25, Comer Duncan wrote:
I have a newbie type question. Say I have started a python (or
ipython) session and have done some imports and have also defined some
new variables since the session started. So, I have in my current
namespace a bunch of things. Suppose I want to list ju
Comer Duncan wrote:
Hi,
I have a newbie type question. Say I have started a python (or
ipython) session and have done some imports and have also defined some
new variables since the session started. So, I have in my current
namespace a bunch of things. Suppose I want to list just those
variab
> What's "who and whos"?
They're matlab functions:
who lists the variables currently in the workspace.
whos lists the current variables and their sizes and types. It also
reports the totals for sizes.
--
best regards,
Robert S.
___
Tutor maillist - Tu
Robert Sjoblom wrote:
On 30 April 2012 23:25, Comer Duncan wrote:
Hi,
I have a newbie type question. Say I have started a python (or
ipython) session and have done some imports and have also defined some
new variables since the session started. So, I have in my current
namespace a bunch of t
Anurag Maherchandani wrote:
I am using imaplib module for connecting to Gmail Imap, and i am getting
the below mentioned error.
I am using select command to connect
Labelname is **LabelName
I Get this Error:
resp, data = self._imap.select("**LabelName")
File "/usr/lib/python2.6/imaplib
21 matches
Mail list logo