I just started Python and have some questions about arrays. I don't understand them at all. I was given a project and was wondering if someone could help. I have to make a 1x4 box. The user gets to pick one of the four boxes where an A will then appear. The other three boxes then fill up with B C D.
somearray = []
index= input("")-1
char = raw_input("")
somearray[] = char
This is what i was given to work with. I also know that an input or raw_input
will be needed.
def drawArray():
somearray = []
index = input("1 , 2 , 3 , 4") - 1
char = raw_input("A , B , C, D ")
somearray[] = char
This is what I have put in. I am not sure where I should go from here. If someone could help that would be much appreciated.