python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Could someone explain what the use for this piece of code is?
I started this pixel art project using turtle in Python, and I used some code online to help me out, and it works, but I am not sure why it works and what it does. Could someone help me out here? Than...
Jacob Voss
Votes: 0
Answers: 1
Function that returns the sum of the product of a list plus one
I'm trying to solve the following exercise:
Write a function called enum_sum which takes a list of numbers and returns the sum of the numbers multiplied by their corresponding index incremented by one...
Antonio Di Fenza
Votes: 0
Answers: 2
enumerate causes incompatible type mypy error
The following code:
from typing import Union
def process(actions: Union[list[str], list[int]]) -> None:
for pos, action in enumerate(actions):
act(action)
def act(action: Union[str,...
James Roberts
Votes: 0
Answers: 3