Hey look,

I'm back with a new post so in this post we will learn about how to start python programming in termux. By doing this you will be able to create python programs in termux like chatbots and termux tools and yeah you dont need a computer to do this things. We will be doing all this stuff on android smartphone okae.

You know most of the termux tool are written in python language. Python is useful to create ai chatbots. It's one of the demanding languages today.    

so without any delay lets go..


First open termux app





Then type apt update






Then apt upgrade





Now we will install python in termux to do so type pkg install python



You should also install python2 & python3 it could be helpful later.









Then type python3





Now it's time to install python modules. Python modules are a batch of files that contains codes. There are lots of python modules to use.

To install python modules in termux type


Pip install requests



Our python installation has been completed.


Now you will need to install nano to do this type

Pkg install nano



Nano is a text editor for termux to start with nano type nano in termux 

Type nano 'yourfilename'.py to edit file 






Here you can type anything you want it's like notepad to save the file tap ctrl + x then press y to save file.



To read the file again just type 

nano 'yourfilename'. Extension you have given.

Now our installation has been done so now we can write our first python program in termux. do as i do.



Type nano then specify your program name and use .py extension.

We will create a program that will convert number of days to years and month. 

Code link is given below




Then hit ctrl + x and press y to save program.

It's time to run our newly created program to do so type python 'yourprogramname.py' then hit enter take a look.




Hurray! We have written our first python program successfully.



Hope this post would be helpful for you readers. See y'all in next post.

Adeus..