Again, another hard question. So Ive got a function, and ive got a couple of try and exception in it, and basically what i need is, if those exception give me an error, i want that function to go to an end. So, how am i suppose to do this. I have tried "break", but it only works for "while", am i right? I also tried "pass" but it also doesnt work, so how can i do this? Thanks everyone.
Dan08 8 Junior Poster
Recommended Answers
Jump to PostAs ultimatebuster explain return get you out of a function and break get you out off a while loop.
An example.def find_father(): pass def main(): '''Main menu and info ''' while True: print 'Father finder' print '(1) 1 - Find a Father' print '(Q) Quit' choice …
All 3 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.