Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Insert a sequence of same numbers, unpacking
#python 3.5.2 def get_nums(n, freq): l = [n] * freq return l # TEST CASE 1 ELEV = [1.2, 3.2, *get_nums(0.0, 2) ,3.9, *get_nums(0.0, 3)] print(ELEV) print() # newline # TEST CASE 2 arr = [45, *get_nums(1, 4), *get_nums(9, 3), 34, 99, *get_nums(7, 1), 12, 21, *get_nums(-1, 5)] print(arr)
run
|
edit
|
history
|
help
0
kawaii
Minesweeper
metods.py
Bucket sort using LinkedList for each bucket
Ej2_python_204676887
square function
Linear search
Game4
guess123
print("Hello, world!")