0

When I look into Python documentation, it states that Python is an interpreted language; but when I run any .py file, it automatically generates a .pyc file which is a compiled file.

So is python interpreted or compiled, or both?

ad absurdum
  • 19,498
  • 5
  • 37
  • 60
shanky
  • 11
  • 2
  • 7
    @sshashank124: Python is a language. Languages are not interpreted or compiled; their implementations are. – Jayanth Koushik Apr 23 '14 at 09:59
  • @jayanth I didn't get you. Machine understand binary language and to convert human understandable inputs to machine language a programming language requires an interpreter or compiler. Without interpreter or compiler how machine gonna understand the instructions? Python uses interpreter which reads python code line by line BUT when you execute your py file , on same directory .pyc file is generated which is byte code(compiled file). Why .pyc is generated if python uses interpreter!!! I hope you understand my question – shanky Apr 23 '14 at 13:14

0 Answers0