+ 8

SOME TIPS AND TRICKS FOR PYTHON PROGRAMMERS

Tips (python) 1-don't use a lot of default arguments like: my_func(art=None) 2-for styling your code use pip 8 but for easy install pip 9.0.1 3-always make try and except and don't forget to train on the elif statement of the nested statements (try with except and else,for loop and if statement e.g) 4-be careful most of SoloLearn Python Programmers are using the random module for password and that is wrong use the secrets module for security stuff for more: https://code.sololearn.com/cTfvPJTjmFTx/?ref=app

25th Nov 2017, 7:53 PM
warlord
warlord - avatar
2 Antworten
+ 8
CONTINUING THE TIPS (BE CAUSE THE POST DOESN'T HAVE MORE SPACE) 5-for random accessing objects and modules read about lambdas and property of objects and key methods to access the private methods 6-nested random.choice will return None in the result 7-you can access an attribute from a function while printing it like this: import socket s = socket.socket( socket.AF_INET, socket.SOCK_STREAM) print(s.gethostname()) because you can also access it even if it some nested value printing or nested result 8-for better customization use the other programming languages parsers like bs4 , lxml , cython 9-use the distutils.core instead of setup tools its better 10-ask for the user customization for better rating and make more ways to make your program better like making it a light weight or (if it a big program try make it a tools program like each part of the program is an application 11-be careful with processing in background sometimes if you don't get a permission that will be considered an offensive to security 12-for better projects make these projects: Normal Level Programmer : networking games and services High Level Programmer : self deciding programs (Object-Oriented Program) Advanced Level Programmer : Data Analysis and Machine Learning Especially Price and Stocks Predictions 13-if you are a networker when the server/client send a message try to make the message include more attachments especially the is and sys or sl4a.Android attachments to make an easier control and don't forget the ×86 with windows especially the bash and sh scripts 14-if you need a long writing for multiple lines something like 2 lines and more use nested values that prints other values or make it an object like this: list = [ hello, hey, bye] Don't Forget To Like :)
25th Nov 2017, 8:13 PM
warlord
warlord - avatar
4th Apr 2018, 5:18 PM
Mitali
Mitali - avatar