Thanks Alan
I noticed that I was using some double ' to encircle some things and
some single ' for apostrophes in contractionsand fixed those...but
apparently since you could run it, that part didn't matter. The problem
was ultimately caused by a stray ''' which was a fragment of me messin
Running Linux Mint
The YouTube Sentdex Video tutor I am following.
He is working in Python3.4 and I am running Python3.4.3
He's demonstrating some Regular Expressions which I wanted to test out.
On these test scripts, for future referrence, I have been putting my
notes in Tripple Quotes and nam
Thanks Japhy Bartlett!
[[0] for i in range(5)]
Works! I converted to fit into my routine as:
lens = [[] for i in range(len(catalog2[0]))] << the new statement
for row in catalog2:
for col, item in enumerate(row):
lens[col].append(len(item))
lens = [max(col) for col in lens]
lens = [max(col) for col in lens]
--Terry
IT WORKS!
I just don't know how to automatically format lens with enough [] like I
was able to tell
On 08/20/2014 02:56 PM, Marc Tompkins wrote:
On Wed, Aug 20, 2014 at 1:38 PM, Terry--gmail wrote:
Marc, my understanding
Terry
On 08/20/2014 02:26 PM, Marc Tompkins wrote:
On Aug 20, 2014 12:07 PM, "Terry--gmail" <mailto:terry.kemme...@gmail.com>> wrote:
>
> Alan Gauld
>
> Hi!
> We are not quite out of the woods on this last example you gave me.
It now seems to be complaining
>
Alan Gauld
Hi!
We are not quite out of the woods on this last example you gave me. It
now seems to be complaining
that it doesn't want to append an integer to the list or that this isn't
the place to use '.append' -- I am probably interpreting it's complaint
wrong:
Python 3.3
If I run this
(semi-)decent mail
client.
The original poster uses NinjaIDE and Thunderbird, and his code was
being persistently flattened when he copied/pasted. I believe I've
just tracked it down to an incompatibility between the two (which also
happens to extend to Ninja/Gmail.) I'm not sure how Google
I'm copy and pasting from Ninja-IDE, which I thought was created
specifically to do python programming...so I never checked to see if it
needs to have the tab set to enter 4 spaces, as it appeared visually to
be doing that. But, I don't remember whether I used their tab or
manually typed 4 spa
I found another place in Thunderbirdy to set 'plain text'.
This is a test.
Does the below code look correct now?
--And did I reply correctly this time? (Reply-All and keep only
tutor@python.org address...)
for line_number, row in enumerate(catalog2):
for col, item in enumerate(row):
if le
WOW! There is a lot of help on this mailing list! I want to thank
everyone for their valuable input! Thanks! (I am working my way through
the replies.)
Sorry about the HTML. I think I have it turned off now in Thunderbirdy
for this address. If so, then what follows should not be flat. If it i
Thanks for your response JL.
I added the following Exception to the code snippet:
for line_number in range(len(catalog2)):
for col in range(len(catalog2[line_number])):
try:
if lens[col] < len(catalog2[line_number][col]):
lens[col] = len(catalog2[line_number][col])
except TypeError:
print(
Python 3.3
This has something to do with the nature of FOR statements and IF
statements, and I am sure it must be a simple mistake...but I seem to be
stumped.
I am writing a starship encounter program as my first real python
programwhere the user gets a random amount of credits to design
On Dec 10, 2011, at 12:04 PM, Alan Gauld wrote:
> On 10/12/11 16:46, Steven D'Aprano wrote:
>
>> ...the alternative would also have caught out everybody at some point.
>> Consider a hypothetical Python where mutator methods returned a result:
>>
>> a = [1, 2, 3]
>> b = a.append(4)
>>
>> Does t
In some cases, it is a useful fact that Python only shows error messages when
they are encountered. For example, I can test a program while keeping away
from an area that still doesn't work, rather than having to make it work
flawlessly before my first test.
Python *can* generate executables w
Thank you. This will work perfectly.
On Nov 18, 2011, at 11:58 AM, Prasad, Ramit wrote:
> Hi. I've been using a lot of text files recently, and I'm starting to worry
> about a user hacking some element by editing the text files. I know that I
> can pickle my data instead, creating less easil
Thank you, Wayne! This helps a lot.
On Nov 4, 2011, at 5:38 PM, Wayne Werner wrote:
> On Fri, Nov 4, 2011 at 4:21 PM, Max S. wrote:
> Is it possible to create a variable with a string held by another variable in
> Python? For example,
>
> >>> var_name = input("Variable name: ")
> (input: 'var
Thanks Steven.
On Nov 4, 2011, at 6:45 PM, Steven D'Aprano wrote:
> Max S. wrote:
>> Is it possible to create a variable with a string held by another variable
>> in Python? For example,
>
> Yes, but you shouldn't do it. Seriously. Don't do this, you will regret it.
>
>var_name = input("Var
Heh, yeah. It's usually a bad idea to do stuff like that (I know a guy
(Windows) who deleted his OS of his system).
On Nov 1, 2011, at 7:40 PM, Joel Montes de Oca wrote:
> I just discovered that it is a bad idea to complete uninstall Python 2.7 on
> Ubuntu 11.10. If you do, expect a lot of thi
I feel like I'm missing something simple, but I have now spent hours
googling for an answer. I think I must not be searching for the right terms,
or else this is something I'm not supposed to be doing - but it seems
straightforward to me.
Here's my test code (condensed from the actual much long
If there's an easy way to do this, I'd like to have a pointer to it (i.e.
what functions would deal with this - not wanting my code written for me...)
Right now, I have written code to generate a list of strings that happen to
be a range of numbers. (The fact that they're strings is actually desir
First, thank you VERY much for your help! That's amazingly much easier than
I thought it would be... I was considering looping through and generating
nested for loops, then exec'ing the whole mess.. UGH, and security risk, to
boot...
Couple of questions:
> Make a list containing all the steps:
>
Hi Mike,
I use Eclipse for Java development with a very nice plugin for Python
programming. Check out the PyDev plugin I think its for eclipse only - not
sure if there's something for Netbeans.
http://pydev.sourceforge.net/
--
Evans
http://www.javawug.com
- Original Message -
From:
On 11/12/05, John Walton <[EMAIL PROTECTED]> wrote:
Hello again! I'm still working on that instant messenger
(for science fair), and I have been reading about networking in some
Java tutorials. In one part of it, it said to have a connection with
another computer, you need to know the IP name of t
23 matches
Mail list logo