Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization of the output in Python projects. #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/sprint0/b.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ def read_input() -> Tuple[List[int], List[int]]:
return a, b

a, b = read_input()
print(" ".join(map(str, zipper(a, b))))
print(*zipper(a, b))
2 changes: 1 addition & 1 deletion python/sprint0/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ def read_input() -> Tuple[List[int], int]:
return arr, window_size

arr, window_size = read_input()
print(" ".join(map(str, moving_average(arr, window_size))))
print(*moving_average(arr, window_size))
2 changes: 1 addition & 1 deletion python/sprint0/d.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def print_result(result: Optional[Tuple[int, int]]) -> None:
if result is None:
print(None)
else:
print(" ".join(map(str, result)))
print(*result)

arr, target_sum = read_input()
print_result(two_sum(arr, target_sum))
2 changes: 1 addition & 1 deletion python/sprint0/e.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def print_result(result: Optional[Tuple[int, int]]) -> None:
if result is None:
print(None)
else:
print(" ".join(map(str, result)))
print(*result)

arr, target_sum = read_input()
print_result(two_sum(arr, target_sum))
2 changes: 1 addition & 1 deletion python/sprint1_nonfinals/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def read_input() -> Tuple[List[List[int]], int, int]:
return matrix, row, col

matrix, row, col = read_input()
print(" ".join(map(str, get_neighbours(matrix, row, col))))
print(*get_neighbours(matrix, row, col))
2 changes: 1 addition & 1 deletion python/sprint1_nonfinals/j.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ def factorize(number: int) -> List[int]:
pass

result = factorize(int(input()))
print(" ".join(map(str, result)))
print(*result)
2 changes: 1 addition & 1 deletion python/sprint1_nonfinals/k.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ def read_input() -> Tuple[List[int], int]:
return number_list, k

number_list, k = read_input()
print(" ".join(map(str, get_sum(number_list, k))))
print(*get_sum(number_list, k))