@bot.message_handler(content_types= ["photo"])
def getphoto_left_c(message)
@bot.message_handler(content_types= ["photo"])
def getphoto_left_c(message, random_code=None):
start(update, context)
textMessage(bot, update)
import telebot
import config
from telebot import types
bot = telebot.TeleBot(config.TOKEN)
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton("Ссылка на наш Вк")
item2 = types.KeyboardButton("Ссылка на наш Инстаграмм")
item3 = types.KeyboardButton("Ссылка на наш Ютуб")
item4 = types.KeyboardButton("Ссылка на наш Телеграмм")
markup.add(item1, item2, item3, item4)
@bot.message_handler(commands=['start'])
def start_message(message):
bot.send_message(message.chat.id, "Добро пожаловать, {}!\nЯ - {}, бот который даст вам ссылки на соц-сети.".format(message.from_user, bot.get_me()), reply_markup=markup)
@bot.message_handler(content_types=['text'])
def lalala(message):
if message.text == 'Ссылка на наш Вк':
bot.send_message(message.chat.id, 'https://vk.com', reply_markup=markup)
elif message.text == 'Ссылка на наш Инстаграмм':
bot.send_message(message.chat.id, 'https://www.instagram.com', reply_markup=markup)
elif message.text == 'Ссылка на наш Ютуб':
bot.send_message(message.chat.id, 'https://youtube.com', reply_markup=markup)
elif message.text == 'Ссылка на наш Телеграмм':
bot.send_message(message.chat.id, 'https://web.telegram.org', reply_markup=markup)
bot.polling(none_stop=True)
a = [1,2,3]
b = a
b.append(4)
print(a)
print(b)
c = 1
d = a
d+=1
print(c)
print(d)
def test(mass):
print("До рекурсии:",mass)
print(id(mass))
if len(mass)==1: return
del mass[0]
test(mass)
print("после рекурсии:",mass)
test([4,3,2,1])
До рекурсии: [4, 3, 2, 1]
1844131787784
До рекурсии: [3, 2, 1]
1844131787784
До рекурсии: [2, 1]
1844131787784
До рекурсии: [1]
1844131787784
после рекурсии: [1]
после рекурсии: [1]
после рекурсии: [1]