x = 1 # int y = 0.73 # float z = 'Hi there' # string # a = x + y # float # x = z # x jetzt string # a = x + y # Fehler: string + float geht nicht
Python ist eine
dynamically-typed language, die Variablenzuordnung erfolgt zur Laufzeit, aus dem Context.
Gegensatz
statically-typed language wie C, JAVA:
Typzuordnung fix, explizite Typ–Angabe erforderlich.