├── README.md ├── main.py └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # chistacca 2 | python, subito 3 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from pyscript import document 2 | 3 | def cambia(event): 4 | bottone = document.querySelector("#bottone") 5 | testo = bottone.innerText 6 | bottone.innerText = cicla(testo) 7 | 8 | def cicla(testo: str) -> str: 9 | if testo == "questa": 10 | return "this" 11 | elif testo == "this": 12 | return "chistaccà" 13 | else: 14 | return "questa" 15 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |