Hey,
I made a programm that looks like this, but I have a problem.
So what I need is a function that gets the item of a list which has the index 1 and the item with the index 2.
How does that work?
Peter
I made a programm that looks like this, but I have a problem.
Code:
command = raw_input(">")
fullcommand = command.split(" ")
#example user input: >add 10 15
if fullcommand.index("add") == 0:
#how I want the rest to work:
* * *a= fullcommand.getItem(1)
* * *b= fullcommand.getItem(2)
* * *c= a + b
* * *print ("Result: *" + c)
How does that work?
Peter
Comment