Hello Palmer,
>> I'm trying to write a program w/ python that runs once a day and every time
>> it does it adds 20 to a variable. How do I do this so it doesn't reset the
>> variable to the original value every time I run it?
>
>You have to read the variable from a file saved to disk, add 20,
>t
On 03/08/16 00:30, Alan Gauld via Tutor wrote:
>> if item == item.lower():
I meant to add that the string islower() method is probably
more readable:
if item.islower()
Also that you could use a list comprehension to do this without
converting to a list initially:
def conveert(text):
On Tue, Aug 2, 2016 at 7:59 AM, Chris Clifton via Tutor
wrote:
> My Logic: Since a string is immutable, I converted it to a list to separate
> out the characters and keep them in order. Idea is to change the case of the
> characters in the list then run a join to convert it back to a string.
On 02/08/16 15:59, Chris Clifton via Tutor wrote:
> My Logic: Since a string is immutable, I converted it to a list
That is certainly one approach but your solution has some snags.
In fact its probably not necessary unless you want to play with
big strings. You could just build a new string from
>Also, lookup cron. It will start your program at a certain time you select,
>every day
Linux system "crontab -l" to edit it "crontab -e"
Any doubts "man crontab"
This email is confidential and may be subject to privilege. If you are not the
intended recipient, please do not copy or disclose
Hello Everyone,
I have been practicing with strings. Splitting them, joining them, changing
case. All has been going well but came across a exercise in one of the code
practice sites that has you changing the case of different characters in a
string. Anything in upper case is converted to
On Aug 2, 2016 4:42 AM, "Justin Korn via Tutor" wrote:
>
> To whom it may concern,
>
> I need help on this assignment:
>
>
> Create a new class, SMS_store. The class will instantiate SMS_store
objects, similar to an inbox or outbox on a cellphone:
> my_inbox = SMS_store()
> This store can hold mul
Several of my messages via gmane seem to be bouncing so
I'm sending this direct to the tutor list.
Apologies if it arrives twice!
On 02/08/16 06:51, Justin Korn via Tutor wrote:
> Create a new class, SMS_store.
> This store can hold multiple SMS messages
> (has_been_viewed, from_number, time_ar
On Mon, Aug 1, 2016 at 10:15 PM, Steven D'Aprano wrote:
> On Mon, Aug 01, 2016 at 01:26:19PM -0600, Palmer Gutke wrote:
>> I'm trying to write a program w/ python that runs once a day and every time
>> it does it adds 20 to a variable. How do I do this so it doesn't reset the
>> variable to the or
To whom it may concern,
I need help on this assignment:
Create a new class, SMS_store. The class will instantiate SMS_store objects,
similar to an inbox or outbox on a cellphone:
my_inbox = SMS_store()
This store can hold multiple SMS messages (i.e. its internal state will just be
a list of me
10 matches
Mail list logo