linusgroh’s avatarlinusgroh’s Twitter Archive—№ 1,741

  1. TIL #Python's str.{starts,ends}with() also accepts a tuple of string prefixes: mystring.startswith(("foo", "bar", "baz")) I always did this: any(mystring.startswith(prefix) for prefix in ("foo", "bar", "baz")) I should actually RTFM more often 🙃