Sunday 13 November 2016

How to run python code?

For running a python code you must have python installed in your system.

After that use these following:

1. open a file using "vi" if you are working in linux terminal or "start" in windows followed by filename (eg. hello_world.py).

2. Write your code in that file. NOTE: do not forget the tabs/space for indentation, it's important for a script.

3. close that file.

4. python hello_world.py


That's it. Done.

No comments:

Post a Comment