linusgroh’s Twitter Archive
—№ 1,741
⇤ Newest
Tweet
⇠ Newer
Tweet
Older
Tweet
⇢
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 🙃
On twitter.com
❤️ 1
Favorite
2020 Aug 11
Mood +
1
🙂