Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inputting a varible
#1
Say I had a list called 'rade' and in it was [1,2, 3, 4, 5,] and I also had another list called 'spam' and in it was  [6,  7, 8, 9, 10,]
I want to input that I want to use the list 'rade'. How can I input it so it would work?

rade = [1, 2, 3, 4, 5, ]
spam  = [6, 7, 8, 9, 10]
choice = input("Chose a list")
if choice[1] == 2:
    print("Congratulations")
else:
    print("Sorry...")
Reply


Messages In This Thread
Inputting a varible - by BlathaBlather - Apr-05-2017, 06:24 PM
RE: Inputting a varible - by Larz60+ - Apr-05-2017, 06:29 PM
RE: Inputting a varible - by wavic - Apr-05-2017, 06:34 PM
RE: Inputting a varible - by Ofnuts - Apr-05-2017, 08:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  local varible referenced before assignment SC4R 6 1,574 Jan-10-2023, 10:58 PM
Last Post: snippsat
  Python 3.8 Nested varible not updating Teknohead23 6 2,491 Oct-02-2021, 11:49 AM
Last Post: Teknohead23
  Unable to understand how given code takes a fixed input value, without inputting. jahuja73 4 2,776 Jan-28-2021, 05:22 PM
Last Post: snippsat
  Argparse error when inputting values tqader 2 2,917 Sep-11-2020, 07:42 PM
Last Post: buran
  Letters with Accents Not Inputting Phylus 0 1,480 Jun-12-2019, 04:05 PM
Last Post: Phylus

Forum Jump:

User Panel Messages

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