Programming
Python for loop (10 easy examples with syntax)
The Python for loop is also referred to as the for…in loop. This is due to its unique syntax that differs a bit from for loops in other languages. We use range, …
How to create, read, append, write to file in Python
use open() or with open() function with different modes to create, write, append content to a text or binary file. Python write to file by overwriting the …
Mastering Python subprocess Module [In-Depth Tutorial]
The different functions available with python subprocess are Popen(), call(), run(), check_call(), check_output(). What is the difference between these …
Use Python Logging Like a PRO: Don't be a Rookie
Learn how to use python logging module with examples. Write to console, stdout, stderr, to log file or syslog. Create single or multiple handlers using …
How to use python if else in one line with examples
Learn how to use python if else statement in one line using ternary operator. You can also hack your way to use nested if else or if elif else in single line
