Форум 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, вопрос, python3, pip, работа
Python how to derive the result (it works in the console, but not in Pycharm)
When starting in the console, everything works, everything disperses, & GT; python3
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ошибка, проект
Importerror: Attempted Relative Import with No Known Parent Package Python
I have such a project structure --- Package1/code.py --- paccage2/ext.py how to import me variable from Ext.PY to Code.Py? from ext import var - it does not work, say...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, помощь, ии
How to imagine Float in the form of Integer without loss of information?
There is a task of transforming float in the values ​​of the type int (one float value in one int value) without loss of information, i.e., then the reverse transformation...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Typeerror: Object of type is not json serializable
I am trying to record a Person class object like this: def postusertojson ( user ): filiname = str (user.fullname) + "" "" + +
аватар форума question@mail.ru · 0000-00-00 00:00:00 · вопрос, ии
Code execution when importing a module in Python is a bad practice?
Several times I met the mention that the fulfillment of the code when importing module is poor practice. At the same time, I could not find explanations to this statement anywhere...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · пример, ии, новичок, проект
The use of recursion is more than 1000 times
I am a beginner in programming on Python (my 1 programming language). He solved the problem No. 12 from the Euler project. I used a recursion in functions, but unfortunately, to s...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, пример, ии, работа
Coding of the text into an arbitrary binary code and vice versa. Example: "A" <-> "01100011"
I need to convert the line, for example "A" ", into a line of binary code, for example " "01100011" ", then process a slightly binary code, passing it according to the function" ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, ошибка, пример, ии
The numerical solution of the thermal conductivity problem
It is necessary to solve the problem of thermal conductivity on the segment The solution used an explicit schemeN = 10> # maximum number of steps in x# boundary coditionsux_0 = 1 #...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python, вопрос
Comparison of 2 lists in Python
Hello, there are two lists anti = [ 'Red' , '"blue' , 'green' , 'White' ] word = [ '' red ', 'White' ] you need to compare two lists and the matching elements to bri...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример
The number of repeated elements in the list
There is an array in which a bunch of repeated elements. I need to derive the contents of a particular element of this array and how many of the same elements in it (derive the fi...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, пример, django, боты
Why are the lines with Fuzzy in Django.po are not transferred?
I update the Django.po file in this way: $ python manage.py makemessage $ python manage.py CompileMessages -l ru After that, part of the lines in Django.po are marked as F...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, numpy, ии
Quick methods of finding all simple numbers less than n
What are the most rapidly finding algorithms of all simple numbers less than all known: and what are the quick implementations on Python, Numpy, etc.)? de ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ошибка
What values ​​can be dictionary keys?
The documentation says that only unchanged data types can be keys. Why in this case there is no error? class test : pass t = test () print ({t: 1 })
аватар форума question@mail.ru · 0000-00-00 00:00:00 · ооп, метод, инкапсуляция, python, совет, ии, урок
When to use classes (OOP)?
I study/program on Python for a year, but I still can’t understand when to use the classes. Reading books and watching video lessons, I am aware of things such as encapsulation ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
Python Skripte?
The computer science teacher said that he is script. Is it so? He is kind of compiled. I'm 15, I'm not a Senior developer, so the question is stupid. I don’t even write on Python....
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос, помощь, пример, боты, ии
How to search for an object on the image using a full -bearing neural network
Hello, the task of finding an object using a full -bearing neural network is worthwhile using Keras, Theano, in Python. At the moment, this is the following network configuration:...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · пример
Search for tuning in a line
You need to find in the line: whether this line includes in the line or not. For example, there is a string sdfssf sddff svvsef XBSDF SDFWWWWW you need to find out if it is incl...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · пример
Search for tuning in a line
You need to find in the line: whether this line includes in the line or not. For example, there is a string sdfssf sddff svvsef XBSDF SDFWWWWW you need to find out if it is incl...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · lambda, python, пример, ии
Why do you need Lambda functions?
Studying the python , I came across lambda -functions. But nowhere I have not found an example of where they are really - only elementary examples of the species printa (lamb...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
Hiding the login and password in the Python code
How can you encrypt a login with a password in the code itself? Well, or in any other way, to make it possible to get them to other people, since the code itself should be open an...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
Hiding the login and password in the Python code
How can you encrypt a login with a password in the code itself? Well, or in any other way, to make it possible to get them to other people, since the code itself should be open an...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
Coding problem when writing to the file: Unicodeencodeerror: 'Charmap' Codec Canat Encode Character '\ U039a'
It is required to pair vk according to the specified parameters and write the result to the file on the python 3.5. Search_Result = " API.USERS.SEARCH (sort = sort_index, se...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to break the number into categories
There is a number of 1234567 .
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to break the number into categories
There is a number of 1234567 .
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, django
How to change the language to the user on the Django website?
I am the opportunity to switch between the Russian, English and Ukrainian version on the site. He wrapped the lines in the templates that must be translated into the { % Trans %}...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
How to check the number for parity?
I understand what must be divided into 2 and look at the remainder. Here's what I tried to do. IF ( not line% 2 2 ): print 'chek true'
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список
Can I get a list of all chat participants in Telegram?
Tell me, please, can you somehow get a list of all participants in a certain chat in Telegram? Interested in precisely "useame" users.
аватар форума question@mail.ru · 0000-00-00 00:00:00 · метод, python, пример, requests, ии
How to get user comments left in a particular community in VK
How to get all the comments of a particular user left on the wall under posts in a particular community in VK? I examined all the methods that exist in the VK API and have not ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, новичок
Using Global in Python
Hello, I meet Python and after C ++ I categorically do not understand the principle of using Global variables. If you indicate Global in the variable in Def, whether it can be use...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
Python alphabet
Is it possible to somehow increase the symbol of the Latin alphabet? You need to go through the alphabet in Python, or by the number to receive any specific symbol, are there such...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · функция, пример
How to remove all spaces from a line in Python?
I wentogled the f`s strip () , but it removes only the first and last gap, but I need everything. For example, if a = 'sd dfsdf dfsfs' , then you need to get a = 'SDDFSDFDFSFS'...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список
Break the elements of the list
Hello! Tell me, please, how can you break the catch list ['1', '22', '333'] by symbols, i.e. To get a list of ['1', '2', '2', '3', '3', '3'] thanks in advance!
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
Fixed number of signs after aim in Python
Is there an analogue of the function & nbsp; toofixed () in JS? I need something like this: & gt; & gt; a = 12.3456789 & gt; & gt; & gt; a.tofixed ( 2 ) '' 12.35 ' ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · список, python
List of lines to the list of numbers
a - List of lines: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'] for el
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, python3
How to create a DEB package?
I am writing on Python3 under Ubuntu, I want to create a DEB package, tell me how, or where is there available information?
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python
What does it mean ... (Troetogo) in Python?
I saw the following design: class badtatus ( Exception ): ... What does it mean? Are there any differences from: class Badstatus ( Exception ): pass
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ии
How to remove the symbol of the new line (\ n) when reading the lines from the file
when using File.Readlines () we get something like this: & gt; & gt; & gt; file.readlines () [ '12 \ n' , '10 \ n' , '' 9 \ n ', '' 15 \ n ', ' '10 \ n' , '120' ] ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, вопрос
How to write in Stdout and a file at the same time?
There is a Python script: import syssys.studout = open ( 'my_log.log' , 'w' ) print 'test' he writes the entire standard output to the file. Question: How can I...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · python, ошибка, пример
How to remove a meaning from a dictionary during a cycle for
I somehow suddenly ran into such a problem. During the & nbsp; for I need to remove the records from it, but how can I tu out the error: Runtimeroror: Dictionary CHANGED SIZ...
аватар форума question@mail.ru · 0000-00-00 00:00:00 · помощь, python3, django, ии, проект
Unicodeedecodeerror when starting a new Django project on Windows
I create a new project on Django using Pycharm. I do not change anything. When starting the project, the error knocks out: "" C: \ Program Files (x86) \ Jetbrains \ Pycharm 5...

Интересное