How can we pass a variable value in python GOTO statement

0 votes
Alias is a runtime argument the value may be anything at the run time like dev, prod, pre-prod.

I need to pass that Alias value into goto like as follows.

Alias = Input()

goto Alias

label: dev
do something

label: prod
do something

label: pre-prod
do something

Can anyone clarify this? Thanks in advance
Feb 5, 2020 in Python by neppoliean
• 120 points
657 views
Hi, @Neppollean,

There are three possible ways to arrive at the "end". According to the condition it is going to either dev or prod or pre-prod.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

How can I change the iteration variable inside a for loop in python?

Assume you have a list of lists: my_list ...READ MORE

answered Jun 10, 2019 in Python by Shubham Bansal
5,305 views
0 votes
0 answers

How can we read a text file in a list in python?

Can you give the sample code as ...READ MORE

Jun 18, 2019 in Python by Waseem
• 4,540 points
373 views
0 votes
1 answer

How can I make a variable private in python?

Python does not have any private variables like C++ or ...READ MORE

answered Aug 2, 2019 in Python by Mohammad
• 3,230 points
605 views
+3 votes
7 answers

How can I rename a file in Python?

yes, you can use "os.rename" for that. ...READ MORE

answered Mar 31, 2018 in Python by DareDev
• 6,890 points
19,357 views
+2 votes
2 answers

How can I create a new file in Python?

You can try the below code which ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,440 points
978 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,070 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP