Posts for: #Telegram

Telegram Queries - Interesting Questions

Last week I had the opportunity to see three interesting questions discussed in the Telegram groups, but the explanation would be too long for a chat.

  1. Why True, True, True == (True, True, True) returns True, True, False?

  2. Why -2 * 5 // 3 + 1 returns -3?

  3. How to add times in Python?

Why True, True, True == (True, True, True) returns True, True, False?

This question was presented as a weird syntax of Python, but it’s actually a visual trap. Look at the operator == (equal equal).

Read more

Telegram Queries - Interesting Questions

Last week I had the opportunity to see three interesting questions discussed in the Telegram groups, but the explanation would be too long for a chat.

  1. Why True, True, True == (True, True, True) returns True, True, False?

  2. Why -2 * 5 // 3 + 1 returns -3?

  3. How to add times in Python?

Why True, True, True == (True, True, True) returns True, True, False?

This question was presented as a weird syntax of Python, but it’s actually a visual trap. Look at the operator == (equal equal).

Read more

A bot for Telegram with Tic-Tac-Toe.

This post is a reissue of the article published in the magazine Portugal a Programar number 55 from March 2017, pages 26 to 34.

In a world with so many instant messaging applications, Telegram stands out for the rich API it provides for creating bots. Bots are small programs that can interact with users and provide services, such as executing commands, managing files or images, and even proposing games!

The Python community has long explored libraries like Telebot and more recently, Telepot. Although the difference in the names of the two is just one letter, the design of Telepot seems more robust to me, and best of all: it integrates asynchronous calls!

Read more

A bot for Telegram with Tic-Tac-Toe.

This post is a reissue of the article published in the magazine Portugal a Programar number 55 from March 2017, pages 26 to 34.

In a world with so many instant messaging applications, Telegram stands out for the rich API it provides for creating bots. Bots are small programs that can interact with users and provide services, such as executing commands, managing files or images, and even proposing games!

The Python community has long explored libraries like Telebot and more recently, Telepot. Although the difference in the names of the two is just one letter, the design of Telepot seems more robust to me, and best of all: it integrates asynchronous calls!

Read more