Python Documentation
Python Documentation
Python Introduction :
- Get out of the shell this is not where we are writing our python code
- In order to work with python we need to be in conda pkg manager env for this we need to
activate default env on our windows command prompt: Activate Base (base is default virtual
env )
- Activate base allow us to work with conda package , work with python
- Bring up the Jupiter notebook – this is the browser based interactive shell (Kind of IDE)
- The code written in Jupiter notebook will save in our local machine and it will have .ipynb
ext .
- For new note book – new – select python 3 – rename the
- Write the code in cell and – Shift+Enter in order to execute the code
- !python –version – this is not a python cmd instead it is a shell cmd
On Mac Machine :
.
- ls to see the list of directories
Jupyter norebook will run the server in mac machine – open up new browser
BADMOS
Functions :
- Jupyter notebook echo whaterver you type number or string
- If you want to write code – print (“Hello ”) – function
- Strings can be defined by using “ or ‘
- len function to calculate the length of Character in a string
Variables:
Assign values to Variables: