filmov
tv
Python useful Modules and Functions

Показать описание
Here are some useful python modules and functions which are very useful while working on projects. Stay connected and share.
10. eval
This inbuilt function help us to calculate multiple mathematical calculations in one line with string as a parameter.
a=eval('10+2/2*5-6+5*59')
9. getpass
this function help us to get the password without showing it into a screen
Syntax
import getpass
8. console
To set the size of a console of your program just import os module and type
7. ASCII
to get ascii characters in python just type ord('character-name') to print ascii and chr(ascii-no) to print it.
6. range
To store and print a number just type a=range(0,100)
5. Strip
4. lambda
To call multiple function create lambda, a=lambda x,y:x+y , it return x+y
3. Threading
To execute multiple things simultaneously you can use this, see the documentation and explore it.
2. progressbar
To show progressbar in your program just install the module and pass it in your program
1. Tables
To store your values in a table format python has a module named as prettytable and store the value according to format and print it.
So these are some useful modules and functions in python.
If you have any, let me know in comments.
10. eval
This inbuilt function help us to calculate multiple mathematical calculations in one line with string as a parameter.
a=eval('10+2/2*5-6+5*59')
9. getpass
this function help us to get the password without showing it into a screen
Syntax
import getpass
8. console
To set the size of a console of your program just import os module and type
7. ASCII
to get ascii characters in python just type ord('character-name') to print ascii and chr(ascii-no) to print it.
6. range
To store and print a number just type a=range(0,100)
5. Strip
4. lambda
To call multiple function create lambda, a=lambda x,y:x+y , it return x+y
3. Threading
To execute multiple things simultaneously you can use this, see the documentation and explore it.
2. progressbar
To show progressbar in your program just install the module and pass it in your program
1. Tables
To store your values in a table format python has a module named as prettytable and store the value according to format and print it.
So these are some useful modules and functions in python.
If you have any, let me know in comments.
Комментарии