Declaring multiple variable types at a time

You can declare more than a single variable at a time, but only witha type comment. In order to nicely work with multiple assignment, youmust give each variable a type separately:

  1. i, found = 0, False # type: int, bool

You can optionally use parentheses around the types, assignment targetsand assigned expression:

  1. i, found = 0, False # type: (int, bool) # OK
  2. (i, found) = 0, False # type: int, bool # OK
  3. i, found = (0, False) # type: int, bool # OK
  4. (i, found) = (0, False) # type: (int, bool) # OK