Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: "add to list" function
Post: RE: "add to list" function

Thanks! Lost the bracket while pasting the code in here.
P13N General Coding Help 2 2,770 Jan-11-2019, 08:44 PM
    Thread: "add to list" function
Post: "add to list" function

The following function should generate a list from my class - right? def to_list(self): return [self.customer_id, self.firstname, self.lastname, self.born, self.zip_code
P13N General Coding Help 2 2,770 Jan-11-2019, 08:26 PM
    Thread: Generate list in class
Post: RE: Generate list in class

Thanks all for the replies!
P13N General Coding Help 7 4,367 Dec-28-2018, 10:08 PM
    Thread: Generate list in class
Post: RE: Generate list in class

Thanks for the input. Shouldn't it work with one class (Phonebook) only? class Phonebook: def __init__(self, name, id, age, contact): self.name = name self.id = id self.ag...
P13N General Coding Help 7 4,367 Dec-27-2018, 11:24 AM
    Thread: Generate list in class
Post: RE: Generate list in class

I need to generate a list (with command line input) similar to an address book/ phone book, where you can add, print, search and update information. Goal from that assignment should be to get familiar...
P13N General Coding Help 7 4,367 Dec-27-2018, 05:46 AM
    Thread: Generate list in class
Post: Generate list in class

Is it possible to generate a list with the inputs in my function addperson, which I can print then with my function printperson? I'm a bit confused with that assignment at the moment. Thanks a lot! c...
P13N General Coding Help 7 4,367 Dec-26-2018, 10:09 PM
    Thread: Use variable from one function in another without return
Post: RE: Use variable from one function in another with...

Sorry, didn't post the code from the class before - I use the following: class.py class tclass: def __init__(self, tid, ttext, tdate): self.tid = tid self.ttext = ttext ...
P13N General Coding Help 3 2,758 Dec-25-2018, 05:37 PM
    Thread: Use variable from one function in another without return
Post: Use variable from one function in another without ...

I'm having those two functions in my code and want to be able to use the variable tdate from the function def todos_new(): in my second function def todos_print():. def todos_new(): tid = 1392839...
P13N General Coding Help 3 2,758 Dec-25-2018, 04:10 PM
    Thread: Printing class instance
Post: RE: Printing class instance

Okay. Thanks a lot!
P13N General Coding Help 2 2,670 Dec-23-2018, 10:28 PM
    Thread: Printing class instance
Post: Printing class instance

I have a class with todo's (text and id) and import that class in my main program where I want to print it. classtodo.py: class ToDo: def __init__(self, todo_id, todo_text): self.todo_id ...
P13N General Coding Help 2 2,670 Dec-23-2018, 09:55 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020