How do I write code of more than 1 line in the Python interpreter?
Posted
by
Sandro Dzneladze
on Super User
See other posts from Super User
or by Sandro Dzneladze
Published on 2012-01-24T08:58:00Z
Indexed on
2013/07/01
23:09 UTC
Read the original article
Hit count: 242
I have a problem coding Python in terminal. I'm just learning basics so I have no need to create .py files.
In terminal I can run one line of code in the Python interpreter, but how do I write more than one line?
Obviously if I hit enter, it enters the command and doesn't go down a line.
I just want to test following in terminal:
my_age = 35
my_eyes = 'Blue'
print "my age is %d and my eye color is %s" % (my_age, my_eyes)
© Super User or respective owner