Python Forum
Changing Variables within Variables?
Thread Rating:
  • 4 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Variables within Variables?
#9
You are missing something.
When you do
y = '1'
x = 'hello'+y
y = '2'
the result of the 'hello' + y is stored, not the expression itself. And x is a pointer to the address in the memory.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
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 251 Apr-12-2024, 12:03 AM
Last Post: deanhystad
  importing variables from module 8376459 1 310 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  Checking for Validity of Variables RockBlok 2 584 Dec-17-2023, 05:50 AM
Last Post: Gribouillis
  Create X Number of Variables and Assign Data RockBlok 8 1,040 Nov-14-2023, 08:46 AM
Last Post: perfringo
  mypy, type aliases and type variables tomciodev 1 754 Oct-18-2023, 10:08 AM
Last Post: Larz60+
  Unchangeable variables in a class? Calab 12 1,674 Sep-15-2023, 07:15 PM
Last Post: deanhystad
Question How create programmatically variables ? SpongeB0B 6 1,417 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,361 Aug-18-2023, 02:06 PM
Last Post: deanhystad
  Variables in a SCPI string thomaswfirth 3 981 May-22-2023, 05:04 PM
Last Post: thomaswfirth
  Advancing Through Variables In A List knight2000 0 543 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