Skip to content

Instantly share code, notes, and snippets.

@raeq
Last active May 5, 2020 07:55
Show Gist options
  • Save raeq/bf7a34d81b307b6564eef6ef67673f7a to your computer and use it in GitHub Desktop.
Save raeq/bf7a34d81b307b6564eef6ef67673f7a to your computer and use it in GitHub Desktop.
Named tuples
import collections
geolocation = collections.namedtuple("geolocation", ["latitude", "longitude"])
eiffel = geolocation(48.858093, 2.294694)
print(eiffel.latitude)
print(eiffel.longitude)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment