Value In Brief – by Abanoub Hanna
All You Need To Know Explained In Brief

Posts Tagged with Python

How to Shutdown your PC using Python ?

If you want to shutdown your Windows PC from your Python code, just use this code snippet. import os os.system("shutdown /s /t 1") That’s it. I hope this helps. Do you recommend reading this blog post? share it!

Python Cheatsheet

Python sys Variables variable meaning argv Command line args builti­n_m­odu­le_­names Linked C modules byteorder Native byte order check_­int­erval Signal check frequency exec_p­refix Root directory executable Name of executable exitfunc Exit function name modules Loaded modules path Search path platform Current platform stdin, stdout, stderr File objects for I/O versio­n_info Python version info winver Version number Python sys.

Why built-in functions in python are faster ?

Because Python is sitting of the shoulders of giants. Built-in functions are written in C and C++ under the hood. C and C++ languages are efficient and fast, so their functions will be faster than the functions you write in Python. So it is recommended to use built-in functions instead of creating new ones.