now we should use just what we studied, if than,
> > else, sequences, etc.!
> >
> > ^Bart
>
> Hint: you can iterate over the characters of a string
>
> >>> for c in "hello":
> ... print(c)
> ...
> h
> e
> l
> l
> o
>
>
> space = (' ')
>
> if text.count(' ') in text:
> space=\n
>
> rightText = text-space
>
> print(rightText)
>
> I should have an output like this:
> The
> best
> day
> of
> my
> life!
>
> --
> https://
space=\n
>
> rightText = text-space
>
> print(rightText)
>
> I should have an output like this:
> The
> best
> day
> of
> my
> life!
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computational Materials
n
>
> rightText = text-space
>
> print(rightText)
>
> I should have an output like this:
> The
> best
> day
> of
> my
> life!
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computational Materials Physics at
t. Ltd. Before opening attachment(s), please scan
> for viruses.
>
> NCrypted is a registered trademark of NCrypted Technologies Pvt. Ltd. in
> India and other countries.
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computatio
ld not
> happen. If you can reproduce that (for any value of i, not necessarily
> 2049), please reply.
>
> See also http://bugs.python.org/issue24546 for more details.
>
>
>
> --
> Steven
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-
python-books
-
> --
> http://mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computational Materials Physics at University
Wien, Sensengasse 8/12, A-1090 Wien, AUSTRIA
http://cmp.univie.ac.at/
http://homepage.univie.ac.at/michael.poeltl/
using elinks-0.12, m
.
yeah - that's also my opinion!
Michael
>
> http://pyfound.blogspot.com/2013/02/asking-for-civility-during-our.html
>
>
>
> --
> Steven
>
> --
> http://mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computational Materials Physics v
d to see the code
is it available for 'download'?
thx
Michael
>
>
> > What language was the web page hosted in? It comes up completely blank
> > for me. :)
>
> Yep, same here. Hidden behind a flash wall, it seems.
>
> Stefan
>
>
> --
with both MinGW and Visual Studio
> - PostgreSQL 8.4, 9.0 and 9.2 32 and 64bit
> - Python 2.5, 2.6 and 2.7 32 and 64bit
>
> --
> D'Arcy J.M. Cain
> PyGreSQL Development Group
> http://www.PyGreSQL.org IM:da...@vex.net
> --
> http://mail.python.org/mailman/listin
mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computational Materials Physics voice: +43-1-4277-51409
Univ. Wien, Sensengasse 8/12 fax: +43-1-4277-9514 (or 9513)
A-1090 Wien, AUSTRIA cmp.mpi.univie.ac.at
; imp.find_module(), but
> it didn't find any module name containing a '.'
>
> Am I doing anything wrong?
>
> Is there another existing implementation, that helps.
>
> I could do this manually, but this is something I'd just like to do
> if necessary
explain what an if..then..else statement is?
>
> Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list
--
Michael Poeltl
Computational Materials Physics voice: +43-1-4277-51409
Univ. Wien, Sensengasse 8/12 fax: +43-1-4277-9514 (or 9513)
A-1090 Wien,
hi,
* Dave Angel [2012-03-28 04:38]:
> On 03/27/2012 06:27 PM, Michael Poeltl wrote:
> >hi,
> >
> >can anybody tell why this 'little stupid *thing* of code' let's
> >python-3.2.2, 2.6.X or python 2.7.2 segfault?
> >
> >>
ntation fault
?>
funny, isn't it?
I was able to reproduce this segfault on various machines (32bit 64bit),
ubuntu, slackware, debian
python.X segfaults on all of them
thx
Michael
--
Michael Poeltl
Computational Materials Physics voice: +43-1-4277-51409
Univ. Wien, Sensengasse 8/
s = list(string.ascii_lowercase +
... string.ascii_uppercase +
... string.digits)
... coll_rand = []
... for i in range(6):
... random.shuffle(characters)
... coll_rand.append(characters[0])
... return ''.join(coll_r
* Nikhil Verma [2012-03-26 08:09]:
> Hi All
>
> How can we generate a 6 digit random number from a given number ?
what about this?
>>> given_number=123456
>>> def rand_given_number(x):
... s = list(str(x))
... random.shuffle(s)
... return int(''.join(s))
...
>>> print (rand_given_nu
rect, the language is terribly archaic. I suggest you switch to
> Ruby ASAP.
why there is only one possibility to do so? in a second i found this
''.join(open('test').readlines()).split('\n')
and if you don't like python, then stick to ruby. who cares???
e.
> In GNU Bash, the command is something like "chown myusername:users".
> What's the equivalent Python command? I know that there is a command
> that uses numbers for the username and group, but is there a command
> that would allow me to use "myusername" and "users&
* 守株待兔 <1248283...@qq.com> [2011-08-01 06:22]:
> from matplotlib.matlab import *
> Traceback (most recent call last):
> File "", line 1, in
> ImportError: No module named matlab
is this what you were looking for?
>>> from matplotlib.pylab import
//matplotlib.sourceforge.net/index.html
choose the graph (click it) you need, and there you can browse the
source-code (python-code)
this is maybe the best starting-point, I guess.
cheers
Michael
--
Michael Poeltl
Computational Materials Physics voice: +43-1-4277-51409
Univ. Wien, Sensengas
* Michael Torrie [2011-07-31 03:44]:
> On Jul 29, 2011 6:33 PM, "Michael Poeltl"
> wrote:
> >
> > what about this?
> > >>> ' '.join('/home//h1122/bin///ghi/'.split('/')).split()
> > ['home', 'h1122
gt; * sys
> * warnings
>
>
> Note: i did not check the Unix version of os.path for this.
>
> ~
> 4. Duplicated functionality.
> ~
>
> >>> os.path.lexists.__doc__
> 'Test whether a path exists. Returns F
that something like a split_all() function should be available in
> the stdlib, no?
>
> Actually, it isn't the first time, where I wonder why os.path.split()
> doesn't do this already. I mean, str.split() doesn't only split on the
> first part, right?
> --
> http://mail.
A big help for 'easily" learning python was and is
"Learning Python"
(a book written by Mark Lutz)
after having studied this book you are able to "think in python"
another book I like very much is
"Core Python Programming"
(written by Wesley Chun)
regards
michael
On Thursday 21 February 2008
hi,
what about this
>>> 'exe.torrent'.split('.')[0]
'exe'
>>> 'exe.torrent'.rstrip('toren').rstrip('.')
'exe'
>>>
that's what you need, isn't it?
On Friday 23 November 2007 05:09:50 am kyo guan wrote:
> Hi :
>
> Please look at this code:
> >>> 'exe.torrent'.rstrip('.torrent')
>
> 'ex'
On Saturday 17 November 2007 01:32:52 pm Cope wrote:
> On Nov 17, 5:00 pm, "Amit Khemka" <[EMAIL PROTECTED]> wrote:
> > On 11/17/07, Cope <[EMAIL PROTECTED]> wrote:
> > > In our place we eat pythons for curry. Its delicious.
> > > And how about your python?
> > >
> > > Cope
> >
> > Not much of the
27 matches
Mail list logo