python-3.6

Loop through the list

There is a list with this structure: [('Броня', [2, 0.6747547826210327])] How can you loop through it, but at the same time, ... by type data[0], #Броня data[1] #[2, 0.6747547826210327] My attempt was not successful, it goes through each one separately.

How do I install python 3.8 on ubuntu mate?

The system already has two versions of python 2.7.17 and python 3.6 How to install version 3.8. separately, to switch or update version 3.6? Without breaking the system. Or with the installation in siblime.

TypeError: Expected cv::UMat for argument 'src'

I try to pull out the outline of the object contours from the photo, but I get an error: Ret,thresh = cv2.threshold(img, ... tam = len(contorno) cv2.drawContours(img,contornoGrande.astype('int'),-1,(0,255,0),2) cv2.waitKey() cv2.destroyAllWindows()

Translating code from pascal to python

There is code in pascal and you need to write code that also works in python: var a: array[1..10000] of integer; {исходные ... 1, N): if (a[i] * a[j] > maxvalue) and (a[i] * a[j] %14 == 0): maxvalue = a[i] * a[j] print(maxvalue)

Where can I write Python 3 programs with the interface?

I'm new to YAP Python. The second month of training. I learned all the basics, etc., I want more. Where I can write programs in python with the interface? Is there anything similar to Visual Basic? Thank you in advance

Help create a single key permutation cipher in Python

I'm just starting to learn python, I really need the help of tc. there is not much information on this topic on the Internet, ... (Key - Pelican) (Encrypt-TERMINATOR ARRIVES ON THE SEVENTH AT MIDNIGHT) (Result-GNWEP LTOOA DRNEV TEIO RPOTM BCHMOR SOYI)

How in pygame will reflect the image horizontally, rotate and change the transparency

How to flip an image horizontally in pygame, rotate it, and change the transparency. I still need to make an atlas and how d ... ow a guide or something at me. P.S. I'm a little silly and haven't learned how to Google the right information yet (^◕ ᴥ ◕^)

How do I update the browser in obs using python?

There is a source(browser) it displays the site, but when the site changes, it remains in the same place. I want the source to be updated every 20 seconds. How do I do this ?

Is there a strict comparison operator like ===in Python?

Just the usual comparison via == does not work as it should: >>> 0 == False True

vk.messages.getConversationMembers Why doesn't it work?

I wrote the code of the bases on VkBotLongPoll when adding to a conversation should print information about its participants ... == True: chat_id = int(event.chat_id) print(vk.messages.getConversationMembers(peer_id=200000000 + chat_id))

Connecting a VK bot to Wikipedia

Good time of day, I recently tried to connect my vk bot to the wikipedia module, but I didn't figure out how to do it. Here i ... r_id, message='Вот что я нашёл: \n' + str(wikipedia.summary(event.text)) ) break

Detect if there is a part of the picture in another picture

I have a photo of a piece of a button, how can I determine if this button is in another photo? I tried to get all the pixels ... n, and then check whether there is a list of these pixels in that picture, but all to no avail, maybe there is some option?

Access to ZIP archive folders in Google Colab

A zip archive has been uploaded to google colab "plates.zip", there are 2 directories inside it. How to get the output of t ... import os import zipfile data_root = '../plates.zip/plates/' print(os.listdir(data_root)) How do I do this correctly?

Python3 Site 127.0.0.1 sent invalid response

When I first started learning python socket . Then I immediately wrote my own tcp server similar to others. My old code, whic ... went to 127.0.0.1:порт and I already displayed that everything it works. Now, neither the server nor the client are working.

Python PyQt5 running Qt Designer on Windows 7

PyQt5 set this way: pip3 install PyQt5-installed normally. But how to run Qt Designer?

BeautifulSoup | Text parsing

import urllib.request from bs4 import BeautifulSoup def get_html(url): response = urllib.request.urlopen(url) return ... ames and years of the holidays from the site, the text I received. But only 3, and I can't get any years at all please help (

Modular writing of the Python Tkinter interface

Perhaps my question will seem strange, do not judge strictly, I encountered Python and programming in general a couple of mon ... ext="Notebook C") main_notebook_controll.grid(row=1, column=1) program = MainInterface() program.window.mainloop()

How can a python program output a random result on the same data?

There is a task on pythontutor called "Pedigree: ancestors and descendants". Condition: Two elements in the tree are gi ... 2 0 1 2 0 0 2 0 1 2 0 1 2 0 0 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 0 2 0 Please explain how this can be and what is the error?

Why is main at the beginning of the output?

I just started learning classes in Python and ran into this problem(or not) that when the result is output, the first line is ... <__main__.Restaurant object at 0x0042DE90> Clot monet classical Clot monet is open! Process finished with exit code 0