Re: [Tutor] How convert an int to a string

2013-06-23 Thread Jim Byrnes
On 06/22/2013 06:24 PM, Dave Angel wrote: On 06/22/2013 07:03 PM, Jim Byrnes wrote: On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes jf_byr...@comcast.net [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. a =

Re: [Tutor] How convert an int to a string

2013-06-23 Thread Dave Angel
On 06/23/2013 12:43 PM, Jim Byrnes wrote: On 06/22/2013 06:24 PM, Dave Angel wrote: On 06/22/2013 07:03 PM, Jim Byrnes wrote: On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes jf_byr...@comcast.net [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can

Re: [Tutor] How convert an int to a string

2013-06-23 Thread Jim Byrnes
On 06/23/2013 06:50 PM, Dave Angel wrote: On 06/23/2013 12:43 PM, Jim Byrnes wrote: On 06/22/2013 06:24 PM, Dave Angel wrote: On 06/22/2013 07:03 PM, Jim Byrnes wrote: On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes jf_byr...@comcast.net [2013-06-22 16:01]: I need to convert a series

[Tutor] How convert an int to a string

2013-06-22 Thread Jim Byrnes
I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. a = 060713 a[:2] Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object has no attribute '__getitem__' b = str(a) b[:2] '25' b '25035' I was

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Peter Otten
Jim Byrnes wrote: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. a = 060713 a[:2] Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object has no attribute '__getitem__' b = str(a)

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Albert-Jan Roskam
--- Original Message - From: Jim Byrnes jf_byr...@comcast.net To: tutor@python.org Cc: Sent: Saturday, June 22, 2013 11:01 PM Subject: [Tutor] How convert an int to a string I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Mark Lawrence
On 22/06/2013 22:44, Albert-Jan Roskam wrote: --- Original Message - From: Jim Byrnes jf_byr...@comcast.net To: tutor@python.org Cc: Sent: Saturday, June 22, 2013 11:01 PM Subject: [Tutor] How convert an int to a string I need to convert a series of digits like 060713 to a string so I

Re: [Tutor] How convert an int to a string

2013-06-22 Thread David Rock
* Jim Byrnes jf_byr...@comcast.net [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. a = 060713 a[:2] Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object has no

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Dave Angel
On 06/22/2013 05:01 PM, Jim Byrnes wrote: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. Where is this series of digits coming from? Is it in the source code, or in a file, or coming from the user, or what? If it's in source code,

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Jim Byrnes
On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes jf_byr...@comcast.net [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. a = 060713 a[:2] Traceback (most recent call last): File stdin, line 1, in module

Re: [Tutor] How convert an int to a string

2013-06-22 Thread Dave Angel
On 06/22/2013 07:03 PM, Jim Byrnes wrote: On 06/22/2013 05:10 PM, David Rock wrote: * Jim Byrnes jf_byr...@comcast.net [2013-06-22 16:01]: I need to convert a series of digits like 060713 to a string so I can make it look like a date 06-07-13. a = 060713 a[:2] Traceback (most recent