How do I start coding with python

How do I start coding with Python

Python in Linux

Check version
python -V

How to use the python 3.5 version as default

rm /usr/bin/python
cd /usr/bin
ln -s python3.2 python

How to create list

tecHouse = []
tecHouse.append("he is a hero")
tecHouse[1]    #to see the attribute
tecHouse[0].upper()    #convert the attribute to the upper case

How write the script (chirag.py)

vi script.py

#!/usr/bin/env python
print “Hello Python”

#permission

chmod u+x hello.py

How to run the python scripts

./chirag.py
OR
python chirag.py

chirag.tomer

I provide help to beautiful people like you. I love hanging out with my dog

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

× How can I help you?