Py Notes
Py Notes
timeit module
put all the codes in timeit.timeit("""here""",number = no of times)
in list comprehension u can use the some variable and it will not be stored
but in regular for loop it is stored and overwrite the orignal value
logging.debug("code")
logging.info("code")
logging.warning("code")
logging.error("code")
logging.critical("code")
its better
logging.basicConfig(filename = "",level = logging.warning)
import json
k = json.dumps(dictionary) => convert into json string
p = json.loads(k) => convert back into dict