Python Forum
Changing Variables within Variables?
Thread Rating:
  • 4 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Variables within Variables?
#1
How do I make variables within variables modifiable?

y = '1'
x = 'hello'+y
y = '2'

If I print <x>, it will only give me  'hello1' not 'hello2'. 

Is there an easy way to make <y> modifiable within <x>?
Reply


Messages In This Thread
Changing Variables within Variables? - by dave925 - Apr-20-2017, 05:38 AM
RE: Changing Variables within Variables? - by Kebap - Apr-20-2017, 04:33 PM
RE: Changing Variables within Variables? - by wavic - Apr-21-2017, 08:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Very Beginner question on simple variables Harvy 1 205 Apr-12-2024, 12:03 AM
Last Post: deanhystad
  importing variables from module 8376459 1 290 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  Checking for Validity of Variables RockBlok 2 563 Dec-17-2023, 05:50 AM
Last Post: Gribouillis
  Create X Number of Variables and Assign Data RockBlok 8 979 Nov-14-2023, 08:46 AM
Last Post: perfringo
  mypy, type aliases and type variables tomciodev 1 721 Oct-18-2023, 10:08 AM
Last Post: Larz60+
  Unchangeable variables in a class? Calab 12 1,557 Sep-15-2023, 07:15 PM
Last Post: deanhystad
Question How create programmatically variables ? SpongeB0B 6 1,341 Aug-19-2023, 05:10 AM
Last Post: SpongeB0B
  How to store columns of a .csv in variables (when the .csv has no headers) ? hobbyist 6 1,276 Aug-18-2023, 02:06 PM
Last Post: deanhystad
  Variables in a SCPI string thomaswfirth 3 933 May-22-2023, 05:04 PM
Last Post: thomaswfirth
  Advancing Through Variables In A List knight2000 0 530 May-13-2023, 03:30 AM
Last Post: knight2000

Forum Jump:

User Panel Messages

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