Python Forum
Calling on a Variable using other Variables
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling on a Variable using other Variables
#1
Question 
Is it possible to call upon a variable using other variables? For example if you have the name of a variable stored in another variable, could you call upon the first variable using the name of the variable stored in the other variable?

# The original variable
var1 = 'Z26'

var2 = 'Z'
var3 = '26'

# Is there a way to make this be equivalent to var1 = 'A1'?
var2 + var3 = 'A1'
Thanks!
Reply


Messages In This Thread
Calling on a Variable using other Variables - by jacknewport - Jul-22-2021, 12:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling functions by making part of their name with variable crouzilles 4 937 Nov-02-2023, 12:25 PM
Last Post: noisefloor
  Calling a base class variable from an inherited class CompleteNewb 3 1,825 Jan-20-2022, 04:50 AM
Last Post: CompleteNewb
  Create new variable dependent on two existing variables JoeOpdenaker 6 3,197 Oct-25-2020, 02:15 PM
Last Post: jefsummers
  Print variable values from a list of variables xnightwingx 3 2,721 Sep-01-2020, 02:56 PM
Last Post: deanhystad
  Calling Variables from Other Files in Different Folders illmattic 14 5,820 Aug-01-2020, 07:02 PM
Last Post: deanhystad
  Function Recognises Variable Without Arguments Or Global Variable Calling. OJGeorge4 1 2,339 Apr-06-2020, 09:14 AM
Last Post: bowlofred
  calling a variable in a for loop in windows dwaynes 1 1,865 Apr-02-2020, 05:21 PM
Last Post: mcmxl22
  setting pythonpath variable in environment variables saisankalpj 3 3,566 Dec-05-2018, 10:33 PM
Last Post: Gribouillis
  2D Array/List OR using variables in other variable names? IAMK 4 3,973 Apr-16-2018, 09:09 PM
Last Post: IAMK
  calling an object variable in a dictionary sunhear 3 4,396 Dec-30-2016, 05:28 PM
Last Post: sunhear

Forum Jump:

User Panel Messages

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