I'm completely new to python, I just started about 3 days ago. I've requested some books from my library on python, so I hope I'm headed in the right direction. I hate to ask this because I'm sure it's been asked before, but I don't know what it is called so I don't even know where to begin. Is it possible to edit the code of a python program, while executing it.
I want to change the places where it says "there is no information" to whatever I want, without having to edit the code manually, instead I would like to enter the information with the program itself. Almost like changing the value of a variable, except, making it permanent, so it will be like that next time I run the program.
Again, sorry if this has already been asked, but What is this called and How do I do it?
Code:
if loop == 2:
def menu(list,question):
for entry in list:
print 1+list.index(entry),
print ") " + entry
return input (question) - 1
CEF = ['CURRENT OBJECTIVES','CURRENT TARGET','CURRENT MISSION','Exit']
name = raw_input("Please insert your name: ")
print "Hello", name,"Welcome to the Information Desk"
print ""
while loop == 2:
choice = menu(CEF, "Please Select: ")
if choice == 0:
Print "There is no information"
if choice == 1:
print "There is no information"
if choice == 2:
print "There is no information"
if choice == 3:
print "Thank You",name
sleep(2)
loop = 4
Again, sorry if this has already been asked, but What is this called and How do I do it?
Comment