Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. pairs = (
  2.     (self.text, ContentType.TEXT),
  3.     (self.audio, ContentType.AUDIO),
  4.     (self.animation, ContentType.ANIMATION),
  5.     (self.document, ContentType.DOCUMENT),
  6.     (self.game, ContentType.GAME),
  7.     (self.photo, ContentType.PHOTO),
  8.     (self.sticker, ContentType.STICKER)
  9. )
  10.  
  11. return next(i[1] for i in pairs if i[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement