Hi,
I did some modification on ex13.py, the same I did when I was studying the python2 book.
I ran the code below without any arguments after the call (python3 ex13.py) and this
won’t work as it did in (python ex13.py) call.
In python 3 the code runs but none arg is printed. Why?
Appreciate any help.
Python 2.7: (It works)
from sys import argv
script = argv[0]
first = argv = raw_input("> “)
second = argv = raw_input(”> “)
third = argv = raw_input(”> ")
print “The script is called:”, script
print “Your first variable is:”, first
print “Your second variable is:”, second
print “Your third variable is:”, third
Python 3.7: (it runs but wont print args I entered in input fields)
from sys import argv
script = argv[0]
first = argv = input("> “)
second = argv = input(”> “)
third = argv = input(”> ")
print (“The script is called:”), script
print (“Your first variable is:”), first
print (“Your second variable is:”), second
print (“Your third variable is:”), third