This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Different ways to test multiple | |
# flags at once in Python | |
x, y, z = 0, 1, 0 | |
if x == 1 or y == 1 or z == 1: | |
print('passed') | |
if 1 in (x, y, z): | |
print('passed') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass | |
from getpass import getpass | |
def demo(argument): | |
options = { | |
1: one() , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I want to import a library that manages time | |
import time | |
#I want to import a library that can help me define regular expressions | |
import re | |
#I want to import a library that tells me about the operating system I'm using and more! | |
import os |
NewerOlder