gt; >
> > doesn't work (not that I expected it to).
>
> Why not use a Set?
>
> s = Set([somefun(i) for i in some-iterator])
>
Alternatively, you could put the results as keys in a dictionary, then request
mydict.keys() to get a list of unique outcomes.
Yours,
An
ome webscraping if the files are not readily modifiable.
Its setup is about 350 kB.
In terms of installers, NSIS (with the package to make it look modern,
instead of that awful default look - forgot its name) or InnoSetup are
the usual suspects. NSIS has a smaller overhead, but an uglier langu
articular time?
Not as such. In your case, I think the task manager would be enough. You
only have this one demanding data structure I assume, so in a rough
approximation you can pretend that whatever the task manager reports
(have a look at VM and peak memory usage columns, not just memory u
.keys()
... [1,2,3,4]
The set solution is the Most Obvious Way to do it, but the dict one
doesn't require an understanding of list comprehensions.
--
Yours,
Andrei
=
Mail address in header catches spam. Real contact info:
''.join([''.join(s) for s in zi
r 'Name: %s' string and he gives you 'Borkbork: %s' or
whatever. The translation doesn't need to be modified if you decide to
make a user class and get rid of the username and userage vars.
- format strings give you more control, so you can e.g. specify how many
digits
ving to manually update who knows how many
translations whenever you decide to rename a variable
On the other hand, having the variable name in there may give the translator
useful information about the way he should translate a string, as the
translation may be in
and my app is yet another CDROM
> database program; more details available if it matters.)
--
Yours,
Andrei
=
Mail address in header catches spam. Real contact info:
''.join([''.join(s) for s in zip(
"[EMAIL PROTECTED] pmfe!Pes ontuei ulcpss edtels,s hr' on
yourself, movie stars, pets or other frivolities
- flattering as it may be - will become problematic when a couple of
months later you're wondering why the application crashes upon adding
Fido to DarthVader, appending the result to ApplePie and writin
es if you need getter/setter methods or simple attributes
otherwise. In your case, I would not make __filename etc. 'private'
(that's what the double underscore suggests), then write a getter method
for it - just call it FileName and be done with it. Python idiom here is
more flexi
owHelp()
else:
fileop.Perform()
Adding new operations would be a matter of implementing an appropriate class and
adding it to the operations dictionary. With a bit of Python magic you could
even get the operation classes to auto-register, so just writing an operation
class would
552211', '"/home/whoever"'),
('dir0.8258732656650.272559810163', '"/home/florian"'),
('dir0.6565224032210.703769464586', '"/home/john"')]
Note that it will do this for *all* options in your file, even
Hello,
I want to read from the standard input numbers until i reach a certain value
or to the end of the "file".
What is the simplest, straightforward, pythonic way to do it?
a sketch of how i tried to do it:
[code]
while 1 < 2:
x = raw_input()
if type(x) != int or x == 11:
break
write(number)
[/code]
Any alternatives for the personal rambling(if it's a wrong way to do it, of
course):
L = [1,2,[3,4],[5,5]]
for item in L:
if type(item) == list:
print L[item[0]], L[item[1]]
else:
print L[item]
Thanks,
Andrei
import sys
def write(numb
i'm thinking the same way Eric do.
On Wed, Feb 27, 2008 at 11:18 PM, Eric Brunson <[EMAIL PROTECTED]> wrote:
> Alan Gauld wrote:
>
> "bob gailer" <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote
>
>
>
> i don't really understand that. you are trying to say that the
> tests
> from the online judge
n
may consist of multiple characters". But I cannot figured out why this
simple example not working:
s = "spam;egg mail"
s.split("; ")
output: ['spam;egg mail']
instead of ['spam', 'egg', 'mail']
any suggestion is welcome,
andre
A good place to look at : http://www.norvig.com/sudoku.html
On Mon, Apr 7, 2008 at 6:53 PM, Luke Paireepinart <[EMAIL PROTECTED]>
wrote:
> W W wrote:
> > On 4/7/08, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> >
> >> W W wrote:
> >> What are you talking about? I don't understand what you mean
Thanks for sharing, will try it.
Cheers,
Andrei
On 9 May 2015 15:45, "Nym City" wrote:
> I am on the same boat. I have tried using online sites like codeacademy
> and courses on courser but now I am starting with this new book called
> "Automate The Boring Stuff with
Hi,
Anyone can recommend practical work on learning python.. seems reading and
reading does not helping.
Thanks in advance,
Andrei
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman
hi guys,
Thanks all for input, if anything else.. please let me know.
cheers,
Andrei
> On 03 Jun 2016, at 11:14, Alan Gauld via Tutor wrote:
>
> On 02/06/16 21:43, Andrei Colta wrote:
>> Hi,
>>
>> Anyone can recommend practical work on learning python.. seems readi
101 - 119 of 119 matches
Mail list logo