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 in Python by neppoliean
• 120 points
106 views

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
510 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,530 points
38 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
58 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,850 points
599 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
221 views
+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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 936 views
0 votes
0 answers