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)
merging two lists of tuples in python
let's assume these are my lists:
oracle_files = [
(1, "__init__.py"),
(2, "price_calc.py"),
(3, "lang.py")]
predicted_files = [
(5, ["random.py"...
nic
Votes: 0
Answers: 2
Tuples without dictionaries
I want to make a python function.
My solution, which I know is incomplete and wrong, is as follows:
s = [11.3, 16.1, 7.5, 4.3, 12.4, 10.3, 18.7, 9.3, 18.5]
x = dict([(a, 'Pass' if a>9.5 else 'Fail...
fpb_i
Votes: 0
Answers: 1
Scala: Set of tuples doesn't allow me to add a "straight" tuple
I have this code of a mutable Hashmap with a mutable Set with tuples:
val field = mutable.HashMap[String, mutable.Set[(Pos3, Pos3)]]()
In foreach loop I'm populating the field
scanner.combinations(...
dr jerry
Votes: 0
Answers: 1
How to print all the permutations of two lists in a custom format?
P = [(2, 2, 3), (2, 3, 2), (3, 2, 2)]
X = [[(1, 2, 4), (1, 4, 2), (2, 1, 4), (2, 4, 1), (4, 1, 2), (4, 2, 1)], [(1, 2, 6), (1, 6, 2), (2, 1, 6), (2, 6, 1), (6, 1, 2), (6, 2, 1)], [(1, 3, 6), (1, 6, 3...
Umesh N
Votes: 0
Answers: 1