Форум Python: Вопросы и Ответы

#проект
#работа
#книга
#урок
#debug
#jupyter
#venv
#pip
#оптимизация
#интервью
#продвинутый
#новичок
#игра
#автоматизация
#базы_данных
#ии
#парсинг
#боты
#веб
#asyncio
#tkinter
#requests
#matplotlib
#pandas
#numpy
#flask
#django
#python3
#python2
#совет
#обсуждение
#пример
#ошибка
#помощь
#вопрос
#python
#метакласс
#асинхронность
#многопроцессорность
#многопоточность
#контекстный_менеджер
#assert
#logging
#исключение
#try_except
#итератор
#генератор
#строка
#кортеж
#множество
#словарь
#список
#полиморфизм
#инкапсуляция
#метод
#ооп
#декоратор
#lambda
#рекурсия
#функция
#match_case
#тернарный
#break_continue
#Циклы
#Условия
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, строка, python
Line conversion to sorting in lexicographic order
How to convert a string consisting of words separated by spaces, and sort the resulting list in a lexicographic order? is given a line from words separated by spaces: S = ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · вопрос
Record to a specific line line on Python
There was a need to write data in a certain line in a large file for a couple of gigs. More specifically, now you need to read the line, then process it, and then delete it from t...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · вопрос
How to get ID user Aiogram
You need to get the user ID who uses the bot. How can this be done in Aiogram?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, django, проект
CSS connection to Django template
Good day to everyone! I have a “proj” project on Django, the “BLOG” application has been created in it. In the file "" ..../Proj/Blog/Templates/Page.tpl "you need to connect the" ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · работа
How does Qscrollarea work?
Please explain how you can work with qscrollarea . He did in the designer, but does not work. I did not find normal solutions on the Inteet
аватар форума question@mail.ru · 0000-00-00 00:00:00 · ооп, python, пример
The meaning of this in C ++ / Self in Python
What is the essence of Self in the OOP of the Python and this in C ++ (better in examples)?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Cyrillic in Python
Is there an analogue in Python for string.Askii_letters , only for the Cyrillic alphabet? & gt; & gt; & gt; Import string & gt; & gt; & gt; string.Askii_letters '' 'Ab...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, работа
How to make friends Python and C ++ | Python to Bin/EXE
Hello again. is the task of rewriting the existing classes/structures of data in Python to C. I have little idea how to work, but the task is set, it is necessary to study. Ple...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, совет, python3, requests, работа
python download VK files
connected the VK API. It is necessary to send files to the server as this is described on this page - P.S. Downloading files to the user wall import vk from time Import ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, помощь, пример, ии
Load the number of numbers
from the user, using the input function, I get a six -digit number. After that, you need to divide it into 6 independent numbers, for example, the list. how can this be ac...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, совет, ии
Recursionerror: Maximum Recursion Depth Exceleded - How to overcome?
There is a task in; There is a decision, where, according to the grace of Python, “defeated” “C#, but the recursionerror flies out on x = 512: What do you advise, fathers? How to ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример
Assignment of values ​​in Python. The difference in methods
Why are different results in 2 cases get? Example 1: a = 1 b = 2 c = 3 d = 4 e = 5 f = 6 a, b, c, c, d = d = E, f, a, B print a, b, c, d, e, f result 1...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Determination of the number with the largest sum of numbers
Three whole numbers are given. Determine which of them has more the sum of numbers. Calculation of the amount of numbers to organize through the function. I determine the amoun...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · метод
How to implement a function that works at a certain time?
The task is to make a method that works at a certain hour. I suppose you need to do this in the asynchronous method (so as not to interfere with the main program). There is onl...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример
How to accurately calculate the root n degree of number
For example, it is necessary to calculate the root of the 3rd degree out of 27000. I recorded the following ways a = pow ( 27000 , 1 / 3 ) # The answer is approximately 29....
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
While cycle "Summer of the number of numbers"
Python began to study, sometimes terrible stupids attack. A number of tasks with this cycle, it seems, is solved and understandable, I can’t understand how to formulate the solu...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
F-String transfer by PEP
I decided to follow the writing of my code and faced the problem of how to make the transfer of lines and expressions in Python. def get_message ( self ) -& gt; Def ge...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример, ии
How to generate an image in Python?
I can load the image and display it as follows: import cv2img = cv2.imread ( "" 1.jpg "" ) cv2.imshow ( "" Original "" , img) for example, I can load any, draw a white ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, numpy, pip
Python and FFMPEG: Create a video with audio in one pass or otherwise speed up the process
Trying to make friends Python and FFMPEG under Windows. It is necessary from a set of images and sound paths (stored in the memory of the program as Numpy Array) to make one lo...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Python lists synchronous sorting
There are two lists a and b you need to syntil them on the list a , i.e. The first element of the list a corresponds to the first element of the list b , etc. a =...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Make the first letter of each word large (title)
Suppose I have a line: stroka = input () introductory introductory inputs Data: qwertyu Iopasd fghjklz xcvbnm how to make all the words all words with a title. ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python
How to change lists in Python 3.X
There is a text file with this content "" D11I14V17A8N7R11H16R18P18E5H18I18X8O16Y5S13D1X6U4A20C 2P2O14J5I11L5K6Y4X19N17H1E17Q5Z1U1K6U8L11N14K6 ". I wrote a code that divides the ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, работа
How to change values ​​in the list without creating a new list?
The standard method through the list inclusion ( LIST COMPREHENSION ): My_LIST = [ 1 , 2 , 3 , 4 5 , 6 ] my_list_1 = [i* 5 for i in my_list] Print (my_list_1) ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Filling the array with random values
IMPort RANDOM import timeli = [] tmp = 100000 for i in range ( 0 , 100000 ): if tmp! = 0 : x1 = radom.randint ( 0 , tmp) Li.ppend (x1) tmp = x1 else : bre...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, пример
Redirecting terminal output into a variable
Help to understand the redirect CMD output to the variable, because The variable is assigned only the Exit_code of the process. For clarity, there are a couple of examples: an exa...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · многопроцессорность, python, пример
How to introduce multi -traffic in Pyqt?
For example, there is such a code: import sys
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример
How to withdraw an even number from the list if all other values ​​are odd, and vice versa?
lists can be two types, with all the even numbers and one odd, and with all the odd numbers and one one. There can be at least three values ​​in the list. lists for example: ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, пример, работа, проект
How to check a few values ​​of the variable operator if?
Hello! I work on a large project. But I will explain my question on a different example ... Suppose I need to create a program that only knows how to get out of his temper)...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · вопрос, ии
How to write a site on Python without using frameworks? [closed]
. The answers to it are not accepted at the moment.
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
Calculate the number of numbers in a given range of the cube of which ends by 4 or 9
The number of numbers Two integers of A and B (A& le; b) are presented at the input program. Write a program that calculates the number of numbers in the range from A to B in...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · строка, python, пример
The task is "palindrome". Python
Task: on this line, determine whether it is a palindrome (that is, it is true that it is equally read from left to right and right to left) Entry on the input is supplied w...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
How to draw a brick wall on Python in a Forb cycle
There is a library simple_DRAW for drawing simple graphic primitives. I can’t understand how to draw a cycle of vertical lines, more precisely, I get in each row one line with a...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to find a number in the Python line?
We need in a line similar to 1a3bcf2bnklopy5T to find the number.
аватар форума question@mail.ru · 0000-00-00 00:00:00 · функция, python, боты
How to numb each conclusion of Print?
I have a function that takes into the terminal during operation: print ( "" "" ") I need to ensure that each new print numbered: Print ( "" "[1] ..." ")
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, строка, python, пример
How to divide the whole number into separate numbers, and bring them through a comma?
For example, there is a line a = 987 how to conclude in this format:? 9 , 8 , 7 it is possible like through a cycle for () and then write it to the list and disp...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, работа
Is there a strict comparison operator in Python like ===?
Just a conventional comparison through == does not work as it should be: & gt; & gt; 0 == false true
аватар форума question@mail.ru · 0000-00-00 00:00:00 · строка, python, работа
How to trim the line in Python to the desired symbol from the end
Given line: a =
аватар форума question@mail.ru · 0000-00-00 00:00:00 · словарь, python
How to get all the keys with the same values?
There is such a dictionary: mydict = {'Main': 'Open', 'Second': 'Close', 'Third': 'Open'} . It is necessary to get all the keys to the values ​​of 'open' . Class = ""> 'Main' : ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример, работа
Determine the sequence of 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 on Python 3
I try to solve the problem: Write a program that displays part of the sequence of 1 2 2 3 3 4 4 4 4 5 5 5 5 5 ... (the number is repeated so many times, which is equal). The ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
replace the number in the line
x = ['27342837429']. Replace any digit in a line below 5 by & laquo; 0 & raquo;, and any number 5 or higher on & laquo; 1 & raquo;.

Интересное