Python 3 – Configurando Variáveis de Ambiente no Windows 10

Este artigo trata de um guia passo a passo de como configurar as variáveis de ambiente no windows 10

ENC: 🐍PyTricks: Pythons built-in HTTP server

```bash # Python has a HTTP server built into the # standard library. This is super handy for # previewing websites. # Python 3.x $ python3 -m http.server # Python 2.x $ python -m SimpleHTTPServer 8000 # (This will serve the current directory at # http://localhost:8000) ``` If you think your friends would find this … Continue lendo ENC: 🐍PyTricks: Pythons built-in HTTP server

🐍PyTricks: Dicts can be used to emulate switch/case statements

Fonte: RealPython # Because Python has first-class functions they can # be used to emulate switch/case statements def dispatch_if(operator, x, y): if operator == 'add': return x + y elif operator == 'sub': return x - y elif operator == 'mul': return x * y elif operator == 'div': return x / y else: return … Continue lendo 🐍PyTricks: Dicts can be used to emulate switch/case statements