#software-engineering
Read more stories on Hashnode
Articles with this tag
A context manager in Python is an object that enables the management of resources and defines the setup and cleanup actions associated with those...
Tuples Slicing I'm going to walk through this with an example Write a function that adds 2 tuples. Prototype: def add_tuple(tuple_a=(),...
>>>from datetime import date >>>now = date.today() >>>now datetime.date(2003, 12, 2) >>>now.strftime("%m-%d-%y. %d %b %Y is a %A on the %d day of...
What's the difference between "import os" and "from os import *" and which should I adopt? In Python, both import os and from os import * are used to...
__name__ == "__main__": The line if __name__ == "__main__": is a common idiom used in Python to check whether the current script is being executed as...
we were given a python bytecode and asked to figure out the equivalent code in python. at first, it wasn't easy for me to understand, but I got over...