Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1898190
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:44:08+00:00 2026-05-17T06:44:08+00:00

for example i have def Hello(): and here is the code def Hello(): F

  • 0

for example i have def Hello():
and here is the code

def Hello():
 F = 'Y'
 if F == 'Y':
   #here i want get out of the Hello() to Hey()! by how!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:44:09+00:00Added an answer on May 17, 2026 at 6:44 am

    To exit the ‘Hello’ function:

    def Hello():
     F = 'Y'
     if F == 'Y':
       return
    

    You can use ‘return’ to exit a function before the end (though there is a school of thought that frowns on this, as it makes it slightly harder to form a solid picture of the execution flow).

    This will go on to the ‘Hey’ function if you called it with e.g.:

    Hello()
    Hey()
    

    Or, to ‘jump’ to the ‘Hey’ function, use:

    def Hello():
     F = 'Y'
     if F == 'Y':
       Hey()
    

    …but this means the call stack will still contain the data for the ‘Hello’ function – so when you return from the ‘Hey’ function, you will be returning to within the ‘Hello’ function, and then out of that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ruby file as follows: module Example class Myclass def t_st Hello
I have a hello function and it takes n arguments (see below code). def
I have a model, for example : class Account < ActiveRecord::Base before_create :build_dependencies def
I have a generator that generates a series, for example: def triangle_nums(): '''Generates a
Here's the problem. I ,for example,have a string 2500.Its converted from byte array into
I currently have the below function within my code:- def openFiles(): file1 = open('file1.txt',
there is a nice waf vala example here: https://code.launchpad.net/~asabil/vala/vala-project-template.waf and it shows a library
I have modified the example found here to use two io channels. None of
Suppose we have the following class hierarchy: class ClassA: @property def foo(self): return hello
Hello everybody, I have this problem (title of the post). Failure/Error: get :create, :user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.