On 27/05/2019 23:44, Mats Wichmann wrote:
> and, if you meant problems for practicing... there are a lot of those
> around. Most courses have problems for you to solve, naturally, and a
> brief hunt around turned up some sites like these that are not courseware:
And don't forget the wonderful Py
On 5/27/19 11:43 AM, boB Stepp wrote:
> On Sun, May 19, 2019 at 12:55 PM bijaya dalei <2212bij...@gmail.com> wrote:
>>
>> Hii, Good morning. I am a new user of python programming language. I have a
>> small query on "where to get python recepies for practices".plz
>> suggest.Thanks.
>
> It is not
On Sun, May 19, 2019 at 12:55 PM bijaya dalei <2212bij...@gmail.com> wrote:
>
> Hii, Good morning. I am a new user of python programming language. I have a
> small query on "where to get python recepies for practices".plz
> suggest.Thanks.
It is not very clear to me what you are asking for, which
On 14/08/18 22:38, Cameron Simpson wrote:
> If you're trying to partition words into values starting with "x" and values
> not starting with "x", you're better off making a separate collection for the
> "not starting with x" values. And that has me wondering what the list "b" in
> your code was
On 14/08/18 23:16, Peter Otten wrote:
> For a simple solution you do need a and b: leave words unchanged, append
> words starting with "x" to a and words not starting with "x" to b.
>
> Someone familiar with Python might do it with a sort key instead:
Or, for one definition of simple, a list co
Deepti,
What you’re seeing happens because you are making changes (words.remove(z)) to
the list while you are iterating over it (for z in words). If your goal is to
print the original words, removed words and original words without removed
words, you could do something like this using sets:
wo
Thanks all. This is very helpful. I am new to Python :)
Sent from my iPhone
> On 15 Aug 2018, at 8:16 am, Peter Otten <__pete...@web.de> wrote:
>
> Alan Gauld via Tutor wrote:
>
>>> On 14/08/18 09:11, Deepti K wrote:
>>> when I pass ['bbb', 'ccc', 'axx', 'xzz', 'xaa'] as words to the below
>>>
Alan Gauld via Tutor wrote:
> On 14/08/18 09:11, Deepti K wrote:
>> when I pass ['bbb', 'ccc', 'axx', 'xzz', 'xaa'] as words to the below
>> function, it picks up only 'xzz' and not 'xaa'
>
> Correct because
>
>> def front_x(words):
>> # +++your code here+++
>> a = []
>> b = []
>> f
On 14Aug2018 18:11, Deepti K wrote:
when I pass ['bbb', 'ccc', 'axx', 'xzz', 'xaa'] as words to the below
function, it picks up only 'xzz' and not 'xaa'
def front_x(words):
# +++your code here+++
a = []
b = []
for z in words:
if z.startswith('x'):
words.remove(z)
b.append(z)
On 14/08/18 09:11, Deepti K wrote:
> when I pass ['bbb', 'ccc', 'axx', 'xzz', 'xaa'] as words to the below
> function, it picks up only 'xzz' and not 'xaa'
Correct because
> def front_x(words):
> # +++your code here+++
> a = []
> b = []
> for z in words:
> if z.startswith('x'):
>
On 04/23/2018 01:00 AM, Hemendra Singh Rathod wrote:
> Hello Tutor Members,
>
>
> I want to import the big Data’s from InfluxDB database. Could anyone please
> guide me on how can I do it in Python 3.x?
>
> Please help me on this. Thank you in advance.
There is a project listed on PyPi which mi
2017-06-29 15:55 GMT+02:00 shubham goyal :
> Thanks all
> Great place to learn Python.
>
> On Jun 29, 2017 7:24 PM, "shubham goyal" wrote:
>
> Thankyou all.
>
> Great place to learn.
>
> On Jun 29, 2017 5:55 PM, "Mats Wichmann" wrote:
>
> > On 06/29/2017 03:02 AM, Alan Gauld via Tutor wrote:
> >
Thanks all
Great place to learn Python.
On Jun 29, 2017 7:24 PM, "shubham goyal" wrote:
Thankyou all.
Great place to learn.
On Jun 29, 2017 5:55 PM, "Mats Wichmann" wrote:
> On 06/29/2017 03:02 AM, Alan Gauld via Tutor wrote:
> > On 29/06/17 03:14, shubham goyal wrote:
> >
> >> This Question
On 06/29/2017 03:02 AM, Alan Gauld via Tutor wrote:
> On 29/06/17 03:14, shubham goyal wrote:
>
>> This Question is asked in some exam. i am not able to figure it out.
>>
>> a = [0, 1, 2, 3]
>> for a[-1] in a:
>> print(a[-1])
>>
>> its giving output 0 1 2 2
>>
>> it should be 3 3 3 3 as a[-1]
for a[x] in a:
print(a)
Except for when x = 0, a[x] never takes on its original value throughout
the iterations
So for x = 0, we get:
[0, 1, 2, 3]
[1, 1, 2, 3]
[2, 1, 2, 3]
[3, 1, 2, 3]
For x = 1:
[0, 0, 2, 3]
[0, 0, 2, 3]
[0, 2, 2, 3]
[0, 3, 2, 3]
For x = 2:
[0, 1, 0, 3]
[0, 1, 1, 3]
[0, 1
Alan Gauld via Tutor wrote:
> On 29/06/17 03:14, shubham goyal wrote:
>
>> This Question is asked in some exam. i am not able to figure it out.
>>
>> a = [0, 1, 2, 3]
>> for a[-1] in a:
>> print(a[-1])
>>
>> its giving output 0 1 2 2
>>
>> it should be 3 3 3 3 as a[-1] belongs to 3.
>> can
On 29/06/17 03:14, shubham goyal wrote:
> This Question is asked in some exam. i am not able to figure it out.
>
> a = [0, 1, 2, 3]
> for a[-1] in a:
> print(a[-1])
>
> its giving output 0 1 2 2
>
> it should be 3 3 3 3 as a[-1] belongs to 3.
> can anyone help me figuring it out.
This is q
On 28/06/17 21:27, cookiestar227 - Cookie Productions wrote:
> So far have understood everything except for the following example:
>
t = "A fat cat doesn't eat oat but a rat eats bats."
mo = re.findall("[force]at", t)
> What I don't understand is the [force] part of the Regular Expr
On 13/06/17 10:09, Muddunuri Mahesh wrote:
> Where can i get the perfect tutorials for black scripting using python
I'm not sure what you mean by black scripting - and
neither does google apparently... Other than that
it is a gothic style of typescript font...
But the perfect tutorial for anythin
I have been told that in gmail it is simple, but far from obvious
to get your mail to open so you add to the bottom. There are three
tiny dots which conceal the previous text. Click on that, and then
add below. I am also told that if you open your mail message with
'control A' (hold the contro
Alan has pointed out the string/int problem with your code.
Your code has a different problem, as well.
># User enters a number between 1 - 5
># Computer generates random number until an equivalent number is achieved
>
>import random
>computerNumber = 0
Ok, now you have set computerNumber to 0
On 29Aug2015 22:37, Martin Mwaka wrote:
I would be grateful for some help please. I have recently started learning
python and I am attemping to write a programme where a user enters a number
between 1 and 5, and the computer generates random numbers until an
equivalent number is achieved. The
On 29/08/15 22:37, Martin Mwaka wrote:
myNumber = input("Input a number between 1 and 5: ")
myNumber is now a *string* representing a number from 1-5.
while computerNumber != 0:
if myNumber != computerNumber:
computerNumber = random.randint(1,5)
computerNumber is now a random
Vishakh Rameshan wrote:
> i have downloaded and installed python 3.4.3
> and when i just type print "with message to display" it shows missing
> paranthesis error
> but what i have learnt is that inorder to display message onle print
> command and message in "msg"
In Python 2 you would write
pri
On 02/05/13 23:13, Karthik Sharma wrote:
This doesn't have much to do with learning Python and a lot to do with
SqlAlchemy so you'd be better off asking on a SqlAlchemy forum I suspect.
However, some basic debugging investigation first may help your cause.
For example...
Traceback (most
On 05/03/2013 06:13 AM, Karthik Sharma wrote:
from sqlalchemy import create_engine, ForeignKey
from sqlalchemy import Column, Date, Integer, String
This list is mostly for standard library questions (though there may be
some that can help here too). Did you know there is an sqlalchem
On 19/02/13 11:35, eryksun wrote:
On Tue, Feb 19, 2013 at 4:14 AM, Alan Gauld wrote:
https://www.google.co.uk/#hl=en
Just to clarify, using a fragment (#) like that isn't a standard
query.
Yes I noticed the anomaly but I chose that particular query for a reason :-)
--
Alan G
Author of th
On Tue, Feb 19, 2013 at 4:14 AM, Alan Gauld wrote:
>
> https://www.google.co.uk/#hl=en
Just to clarify, using a fragment (#) like that isn't a standard
query. It's a JavaScript trick for manipulating browser history based
on location.hash, so one can do AJAX page refreshes without breaking
the ba
Thank you Alan.
On Tue, Feb 19, 2013 at 2:44 PM, Alan Gauld wrote:
> On 19/02/13 07:30, Sunil Tech wrote:
>
>>
>> Here i request, can you tell me what is Query String with some examples?
>>
>
> It depends on the context but I suspect you mean in the context of a web
> app? In that case a quer
On 19/02/13 07:30, Sunil Tech wrote:
Here i request, can you tell me what is Query String with some examples?
It depends on the context but I suspect you mean in the context of a web
app? In that case a query string is the bit at the end of a URL that
includes the search parameters etc. Thus
spa...@gmail.com wrote:
Hello,
The point of good-bad-ness of global variables aside, if I needed to use
them, which is a better place to put them.
1. In the __init__ function of a class? So they are available at the time
an object is initialized or
2. In the actual function of the class where th
Hi Spawgi,
On 15 June 2012 12:44, wrote:
> Hello,
>
> The point of good-bad-ness of global variables aside, if I needed to use
> them, which is a better place to put them.
> 1. In the __init__ function of a class? So they are available at the time an
> object is initialized or
Firstly note as a
On 15/06/2012 12:44, spa...@gmail.com wrote:
Hello,
The point of good-bad-ness of global variables aside, if I needed to use
them, which is a better place to put them.
1. In the __init__ function of a class? So they are available at the time
an object is initialized or
2. In the actual function
On 23/05/2012 08:17, Ataulla S H wrote:
We can try suds its very lightweight soap client.
Thanks
Ataulla SH
On Wed, May 23, 2012 at 9:43 AM, ankur ~ अंकुर wrote:
Dear Pythoneers,
We want to butile the SOAP request request in below manner. -
In header we want to pass the wsse auth part and
When starting a new subject, please start with a new email. Do not
"hijack" an existing one, as that causes your query to appear as part of
the hijacked thread.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To uns
On Mon, Nov 08, 2010 at 05:58:36PM -0800, Shawn Matlock wrote:
> I am able to successfully query a MySQL database using zxJDBC but the result
> set seems odd to me. It returns the following:
>
> [(u'envDB', u'systest2'), (u'envDir', u'st2'), (u'envCellName',
> u'Systest2Cell'), (u'envFrontEnd',
','v','vv','i','ii','d','dd']
> and then i wana replace all non 'd' characters with '.' a dot
>
> i know how replace a specific character, but i don know how to replace
> all characters other than a sp
> i just don wana index all the characters rather i wana double it too like
> ['d','a','v','i','d']
> would b
> ['d','dd','a','aa','v','vv','i','ii','d','dd']
> and then i wana replace all non 'd' characters with '.' a dot
> i know how replace a specific character, but i don know how to
> rep
27;dd']
and then i wana replace all non 'd' characters with '.' a dot
i know how replace a specific character, but i don know how to replace all
characters other than a specific character
thanks
> Subject: Re: [Tutor] query
> From: grigor.ko...@gmail.com
> To
В 21:21 + на 31.01.2010 (нд), invincible patriot написа:
> Hi
> can any one tel me how can i do indexing of individual characters in
> python
> like if i hav a word eg david
> a='david'
> b=list(a)
> # this will give ['d','a','v','i','d']
> not i want to print the index of each character
> how
On 31 January 2010 22:21, invincible patriot
wrote:
> can any one tel me how can i do indexing of individual characters in python
> like if i hav a word eg david
> a='david'
> b=list(a)
> # this will give ['d','a','v','i','d']
> not i want to print the index of each character
> how can i do that
>
raghu raghu wrote:
> i am following 'dive into python' for learning. i dont know whether i am
> following the right book. as i
> am a beginner is it right to follow this book?or is there any other
> book which is best for beginners?
I don't think Dive Into Python is a great book for beginners
raghu raghu wrote:
> Actually i installed python 2.5 i ran this script and its showing error
> it could not import statsout. why is it so?
statsout is a *hypothetical* module used for an example only. The
statsout module does not actually exist. When Dive Into Python wants you
to type in an exa
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote
> The dialog box, what I think is better than a 'visual warning' ;
> because it
> forces the user to correct the input error that he has made. A
> visual
> warning might be omitted by the user.
I disagree. A dialog box in this situation has two bad
Hey Luke,
The dialog box, what I think is better than a 'visual warning' ; because it
forces the user to correct the input error that he has made. A visual
warning might be omitted by the user.
REgards,
Asrarahmed
On 1/7/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
Alan Gauld wrote:
> "Luk
On 07/01/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> I don;t have PMW installed. I tend to use Tix now that its part
> of standard Python. However Grayson says this:
Does Tix work with py2exe? That's why I gave up on it, a while ago..
> So it seems you need
>
> def numeric(val):
> try: float
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote
>> Its easier for the programmer but much worse for the user.
>> We should always catch erroneous input as early as possible.
>
> The difference between a webpage and an application here is that if
> the
> user enters something incorrectly, he'll know
Alan Gauld wrote:
> "Luke Paireepinart" <[EMAIL PROTECTED]> wrote
>
> OP>> Can some one help me how to add validation : only integers are
> allowed
> OP>> and minimum value should be 1.
> OP>>
> OP>> timeInterval = Pmw.EntryField(label_text='Time Interval(in
> OP>> sec.):',labelpos='w',validate =
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote
OP>> Can some one help me how to add validation : only integers are
allowed
OP>> and minimum value should be 1.
OP>>
OP>> timeInterval = Pmw.EntryField(label_text='Time Interval(in
OP>> sec.):',labelpos='w',validate = 'numeric')
I don;t have PMW ins
Asrarahmed Kadri wrote:
> Hello Folks,
>
> I am using Pmw mdoule to develop a User interface and in that I am
> using entry widget.
>
> Can some one help me how to add validation : only integers are allowed
> and minimum value should be 1.
>
> timeInterval = Pmw.EntryField(label_text='Time
> newbie book, there certainly wouldn't be as many. but speaking of
> learn how to program... is there a 2nd edition coming soon? :-)
Unlikely. The sales have been steady (surprisingly so given its age
now)
but not exactly stellar so Addison Wesley aren't too excited about
it I suspect. To be h
On 8/25/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
>> > i put a significant number of exercises in "Core Python," some which
>> > ...
>> > there are about 260 exercises in the 1st ed., and the upcoming 2nd
>> > ed. will have well over 300. i believe this is more than any other
>> > Python book out
Alan Gauld wrote:
> However one badly missed Python resource that used to help
> a lot was the Useless Python web site. Alas it seems to have
> dissappeared fromthe web.
It's back!
http://www.uselesspython.com/
Kent
___
Tutor maillist - Tutor@py
> i put a significant number of exercises in "Core Python," some which
> ...
> there are about 260 exercises in the 1st ed., and the upcoming 2nd
> ed.
> will have well over 300. i believe this is more than any other
> Python
> book out there.
Certainly more than mine Wes!
I got a lot of flack
> On 8/24/06, John Fouhy <[EMAIL PROTECTED]> wrote:
>> On 25/08/06, Joe Gamman <[EMAIL PROTECTED]> wrote:
>> > Anyway, would appreciate any comments on the idea.
>>
>> It seems like the sort of thing you find in textbooks or "learn to
>> program" books -- most books of this nature have suitable exe
On 8/24/06, John Fouhy <[EMAIL PROTECTED]> wrote:
> On 25/08/06, Joe Gamman <[EMAIL PROTECTED]> wrote:
> > Anyway, would appreciate any comments on the idea.
>
> It seems like the sort of thing you find in textbooks or "learn to
> program" books -- most books of this nature have suitable exercises
On 25/08/06, Joe Gamman <[EMAIL PROTECTED]> wrote:
> Anyway, would appreciate any comments on the idea.
It seems like the sort of thing you find in textbooks or "learn to
program" books -- most books of this nature have suitable exercises at
the end of each chapter, or spread throughout each chapt
[snip]
> Script abc.py imports xyz.py.
> Now when I execute abc.py from commandlline all unittestcases of
> xyz.py are also executed.
> Why is this happening and what can be the solution to this.
anything that's in the global scope of an imported module gets executed.
For example...
-- a.py
From: Alan Gauld
Date: 05/08/06 06:20:42
To: Kermit Rose; tutor@python.org
Subject: Re: [Tutor] query python mastery via programming exercises
The nearest to that is the Python Challenge 'game' web site.
It presents a series of challenges to be solved in Python. Each
chal
Hello again,
> Has someone organized a set of exercises that when solved in the
> order
> presented teaches mastery of Python programming.
The nearest to that is the Python Challenge 'game' web site.
It presents a series of challenges to be solved in Python. Each
challenge uses a specific featur
Rob Lane wrote:
> Hey,
>
> I am currently working on a final year project in college building a 3-D
> virtual model of a building in a python based program called Vizard. I
> have prepared a set of tutorials on powerpoint which i would like to
> access by clicking on various objects in the buil
On Fri, 3 Feb 2006, deepak.gupta wrote:
> I did my script like this for backing my max_everest_2006 mysql database
>
> error: 1044: Access denied for user 'MAX_USER'@'%' to database
> 'MAX_EVEREST_2006' when using LOCK TABLES
Your question doesn't have to do with Python. Ask your MySQL
admini
> > os.system("mysqldump --add-drop-table -c -u root -pmysql
> > max_everest_2006 > "+target_dir+"/table.bak.sql")
>
> root is my user name,mysql is my password
You shouldn't use root to adnin a database, it leaves you open to
all sorts of security holes.
And you shouldn't post your root passwo
> I'm trying to migrate a lot of data from an accounting
> system software to another using Python.
he easiest way to do this is usually to create a set of
views using SQL in one database that map to the schema
in the other. You can then read the table data out of
the views and export it into
Negroup - wrote:
> Anyway, I'm learning Python and just for exercise I'll try to
> implement a simple sql-like interface for querying dictionaries!
It might be a better use of your time to learn about Python's built-in
abilities to manipulate lists and dictionaries, which are powerful and simple.
2005/7/13, Sandip Bhattacharya <[EMAIL PROTECTED]>:
> Negroup - wrote:
[cut]
>
> Why dont you use python-sqlite to dump your data? You might need to
> modify your sql slightly(depending on your current db), but rest is all sql.
Thanks for the suggestion, I didn't even know about python-sqlite
exi
Negroup - wrote:
> Hi all, I hope my questions makes sense..
> I'm trying to migrate a lot of data from an accounting system software
> to another using Python. Software A stores datas inside sql tables,
> software B too, with a different db structure.
>
> My idea has been to export sensible table
67 matches
Mail list logo