Python Forum
Print variable values from a list of variables
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print variable values from a list of variables
#2
'vin1' is a string. It is not the variable you initialized to 100. To put the variable values in the list you do this:
vin_numbers=[vin1, vin2, vin3, vin4]
You don't need need to make the variables and can put the values directly in the list.
vin_numbers=[100, 200, 300, 400]
Reply


Messages In This Thread
RE: Print variable values from a list of variables - by deanhystad - Aug-30-2020, 02:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Copying the order of another list with identical values gohanhango 7 1,171 Nov-29-2023, 09:17 PM
Last Post: Pedroski55
  Search Excel File with a list of values huzzug 4 1,265 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Comparing List values to get indexes Edward_ 7 1,185 Jun-09-2023, 04:57 PM
Last Post: deanhystad
  How do you get Python to print just one value in a list? 357mag 3 1,031 May-17-2023, 09:52 PM
Last Post: rob101
  Advancing Through Variables In A List knight2000 0 528 May-13-2023, 03:30 AM
Last Post: knight2000
  Print names in x-axis of a time-series values hobbyist 4 1,245 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  Print variable without '' and spaces arnonim 1 735 Jan-30-2023, 05:23 PM
Last Post: deanhystad
  Adding values with reduce() function from the list of tuples kinimod 10 2,677 Jan-24-2023, 08:22 AM
Last Post: perfringo
  How to print variables in function? samuelbachorik 3 918 Dec-31-2022, 11:12 PM
Last Post: stevendaprano
  user input values into list of lists tauros73 3 1,077 Dec-29-2022, 05:54 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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