What is the correct way to make a method call in Python? As in the example below.
def __init__(self):
mtd([1, 2, 2, 3, 3, 3, 4, 4, 4, 4])
def mtd(data):
for value in data:
print(value)
def recur_fibo(n):
"""Recursive function to
print Fibonacci sequence"""
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))
This code makes the recursive fibonacci "simple" ... Imagine that I called...
I would like to make a program that detects the change in the Entry text and changes the Label to the same Entry text, how can I do this?
from tkinter import *
# Configurações da Tela
window = Tk()
window.title("Hello World")
window.resizab...
I'm studying about sets ( set ) in Python because I'm going to use an algorithm to find paths in a graph, it's for a college discipline I'm having.
I created two assembly examples using two different notations. Look at the illustration...
I wonder if there is a way to mask character entry in input() of python.
Ex:
Senha = 1234
Entrada = int(input("Digite sua senha: "))
In the above entry I wanted to change the letters entered by asterisks.
Is there any way to...
For example, in the documentation for the module pickle it is common to see such notation:
pickle.dump(obj, file, protocol=None, *, fix_imports=True)
pickle.dumps(obj, protocol=None, *, fix_imports=True)
pickl...
I already know the result, but I would like to understand what happens, why this result ...
For example:
>>> a = True
>>> b = not a
>>> print(b)
False
It's a simple thing, but I feel annoyed to use somethin...