Saturday, April 4, 2020

How to Check and Verify Python on CentOS7


Run CenOS7

Open Terminal:

# python --version

[root@localhost ~]# python --version
Python 2.7.5


Run Python:

#python

root@localhost ~]# python
Python 2.7.5 (default, Aug  7 2019, 00:51:29) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 



Help Command:

>>>help()

>>> help()

Welcome to Python 2.7!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/2.7/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help>


Quit from help command line:

help> quit

help> quit

Simple Program:

>>>print ("Hello World")

>>> print ("Hello World")
Hello World
>>> 


Quit from Python:

>>>quit()

>> 
>>> quit()
[root@localhost ~]# 



=== End ===


1 comment:

  1. The best casino slots: the best games, jackpots and slots
    Slots.lv Casino – Best Online 포천 출장안마 Slots Casino · Wild Casino – Best Casino Slot 김천 출장샵 Games · 서산 출장안마 Bovada – 순천 출장안마 Top Casino for Real 아산 출장마사지 Money · LeoVegas – Best

    ReplyDelete