Last active
May 27, 2021 09:28
-
-
Save KevinLiebergen/b898f12295386f7df04d45741ff9fd86 to your computer and use it in GitHub Desktop.
Declare python types
This file contains 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
>>> t = [25, "mayo", 19] | |
>>> type(t) | |
<class 'list'> | |
>>> t = (25, "mayo", 19) | |
>>> type(t) | |
<class 'tuple'> | |
>>> t = {25, "mayo", 19} | |
>>> type(t) | |
<class 'set'> | |
>>> t = {'precio': 25, 'mes': 'mayo', 'dia': 19} | |
>>> type(t) | |
<class 'dict'> | |
import os | |
print(__file__) | |
print(os.path.realpath(__file__)) | |
print(os.path.dirname(os.path.realpath(__file__))) | |
$ python3 rutas.py | |
rutas.py | |
/home/kevinvanliebergen/rutas.py | |
/home/kevinvanliebergen | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment