Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: python nonetype variable
Post: RE: python nonetype variable

(Nov-12-2020, 01:35 AM)Larz60+ Wrote: you could use: try: profit += result except TypeError: profit = 0But it's much better pre-initialize both variables to zero: result = 0 profit = 0 # .....
fabiodurgante General Coding Help 5 2,179 Nov-12-2020, 06:23 PM
    Thread: python nonetype variable
Post: python nonetype variable

hello I have the following in a threaded function executes several at the same time profit is global variable profit += result profit = round (profit, 2) and there is no way to get it when you run 2...
fabiodurgante General Coding Help 5 2,179 Nov-12-2020, 12:29 AM

User Panel Messages

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